Hi there,

I'm using a line chart and I want to be able to change the x-axis.
For now the API gives me [0,10,20,30] I want to change it to [0,5,10,15,20]

I know there is the chxr parameter which is exactly what i am looking for:  
https://developers.google.com/chart/image/docs/chart_params#axis_type

The problem? I'm probably stupid but I'm stuck to find how to use it with 
the line chart API. 

function drawVisualization() {
  // Create and populate the data table.
  var data = google.visualization.arrayToDataTable([
    ['in_rate', 'MeansHDS', 'MeansHDS'],
                [ 23.37,  90.04   ,null ],
                [23.8   ,  159.53 ,null],
                [24.67 ,  97.08   , null],
                [34.82 ,330.77  ,null],
                [36.53 , null       , 66.76],
                [45.39 , null       ,74.29],
                [53.95 , null       ,90.27 ],
                [62.48 , null       ,111.78],
                [70.55 , null       ,132.32]
  ]);

  // Create and draw the visualization.
  new google.visualization.LineChart(document.getElementById('visualization'
)).
      draw(data, {curveType: "function",
                  width: 500, height: 400,
                  vAxis: {maxValue: 400}};
          );
}

Where I have to code it? 

Oe do I need to use ImageChart? I know with this one I can use chxr but 
this feature seems to be deprecated since April so...

Thanks a lot,

-- 
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/-/lla8Bk2mxJMJ.
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