Juan Alberto
Juan Alberto

Reputation: 165

Google Chart Timeline - Defining the range

Is it possible to define the range of the timeline chart?

I see that the range is automatically defined according to the data (image 1) but I would like to have a wider range even if there is no data to display (image 2).

Image 1

enter image description here

Image 2

enter image description here

Upvotes: 0

Views: 1875

Answers (1)

WhiteHat
WhiteHat

Reputation: 61212

use the following chart options, provide a min and max date for the x-axis (hAxis)...

hAxis: {
  minValue: new Date(2018, 0, 1),  // example dates...
  maxValue: new Date(2018, 11, 1)
}

Upvotes: 4

Related Questions