Google chart timeline change graph

Im using the Google timeline to display employee hours of work every day. I want the x axis to always be displayed 24 hours, but I cannot find how to do this, or if it is possible. it automatically changes it to display only the earliest and last points.

Example:

enter image description here

+6
source share
1 answer

Google Charts version 43 (released October 2, 2015) supports minValue and maxValue for the horizontal axis:

.... var options = { hAxis: { minValue: new Date(1785, 0, 0), maxValue: new Date(1816, 0, 0) } }; .... 

You should load it through the frozen version loader , although it does not appear to have been successfully deployed by the normal process .

It seems that minValue and maxValue only work to set the interval at the beginning and end of the timeline. Therefore, if you specify minValue, which is later than the start date of one of your data points, the timeline still starts from that data point, not minValue.

Here is a jsfiddle that shows that minValue and maxValue provide an interval at the beginning and end of the first Google Timeline example: https://jsfiddle.net/o27ttyy3

+1
source

All Articles