react-google-charts icon indicating copy to clipboard operation
react-google-charts copied to clipboard

Haxis styling not working

Open Mittuanand opened this issue 6 years ago • 1 comments

I am trying to change the color of xAxis line, xaxis label color etc. But it does not seem to be working. Where am I going wrong?

options={{ allowHtml: true, timeline: { colorByRowLabel: true }, backgroundColor: '#ffd', colors: ["#ff9999", "#abcee4", "#61bb72", "#d8d641", "#f9b93a", "#f97b3a", "#b36ec7", "#504a8c", "#2499af", "#a3c112"], hAxis: { format: 'dd.MM.yyyy', textStyle: { color: "red" }, gridlines: { color: "red" }, baselineColor: 'red' } }

Mittuanand avatar Dec 05 '19 14:12 Mittuanand

incase anyone else is wondering why this isn't working for timeline charts, it's because Google Charts doesn't natively support those config options. For a full list of config options, see here: https://developers.google.com/chart/interactive/docs/gallery/timeline#configuration-options

It supports it on other charts, but not timelines. It's dumb.

One work around is just to use css selectors to style parts of the timeline. It's a little out there but it works.

Blackglade avatar Jun 14 '20 21:06 Blackglade