I am using the google api line chart to display 4 data points. Since both x and y axes use the number format, the graph generated is continuous and I cannot specify the exact co-ordinates to display for both axes. Now, when I specify the datapoint [5,31], I expect to see the value 5 displayed somewhere on the x-axis, but its not. Please let me know if anyone has any solution for this.
Please see the code below to create a graph :
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Year', 'Baseline Percentage'],
[0, 100],
[1, 79],
[2, 63],
[5, 31]
]);
var chart = new
google.visualization.LineChart(document.getElementById('chart_div'));
chart.draw(data, {curveType: "function",
width: 500, height: 400, hAxis :{showTextEvery :1},
vAxis: {maxValue: 10}, interpolateNulls: true});
}