ruby on rails - How to set the hAxis interval with Google Visualization -
i have used google visualization display chart, when multiple rows of data-table makes chart looks messy, how can set horizontal axis interval when there many columns of data?
example: have range of horizontal axis each month want set horizontal axis range in every 3 months.
you can use d3 time intervals generate clean ticks on google chart.
d3.time.intervals
generate list can pass in haxis.ticks
option.
for example:
ticks = d3.time.months( new date(2013, 5, 1), // start new date(2014, 2, 1), // stop 3) // step // set chart options var options = { title: 'your data', width: 400, height: 300, haxis: {ticks: ticks} };
Comments
Post a Comment