There is no way to force a continuous axis to display any particular value.

On Wednesday, May 2, 2012 12:56:53 PM UTC-4, Indrayani Dixit wrote:
>
> 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});
>
> }​
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/msRt7BOqp6UJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to