POV
POV

Reputation: 12005

How show only integer values on axis Y?

There is a line chart shown on the pic:

enter image description here

And its code is:

var data = google.visualization.arrayToDataTable(data);
  var options = {
    title: settings.title,
    curveType: "function",
    legend: { position: "bottom" }
  };

  // Create and draw the visualization.
  new google.visualization.LineChart(
    document.getElementById("chart_div")
  ).draw(data, options);
}

How to show only integer values on axis Y? I have pointed by red what I need to remove.

Upvotes: 1

Views: 351

Answers (1)

WhiteHat
WhiteHat

Reputation: 61222

use the ticks option to show only integers

vAxis: {
  ticks: [0, 1, 2]
}

remove this option to remove the dip below the baseline

curveType: "function"

Upvotes: 1

Related Questions