0

I have created a google line chart with the following option, but the first and last X-axis labels are NOT shown, how to fix it?

        hAxis: {
          gridlines: {
            count: 9,            
            units: {
              days: {format: ['MMM dd']},
              hours: {format: ['ha']},
            }
          },              
        },
        vAxis: {
          ticks: [0, 54, 70, 180, 250, 350]
        }

enter image description here

Azad
  • 5,144
  • 4
  • 28
  • 56

1 Answers1

1

try adding more space for the labels to be displayed,
using the chartArea, left & right options...

chartArea: {
  left: 40,   // <-- 40 is arbitrary, increase until they appear
  right: 40
}
WhiteHat
  • 59,912
  • 7
  • 51
  • 133