mages / googleVis

Interface between R and the Google Chart Tools
https://mages.github.io/googleVis/
360 stars 155 forks source link

Change the chartArea background color of gvisAnnotationChart #98

Closed ghost closed 2 years ago

ghost commented 2 years ago

How to change the chartArea background color of gvisAnnotationChart? I tried this but didn't work

gvisAnnotationChart(
...,
options = list(
    ...,
    chart = list(
      backgroundColor = "#D3D3D3"
    )
  )
)
mages commented 2 years ago

Unfortunately, the Google chart API doesn't have an option to change the background colour: https://developers.google.com/chart/interactive/docs/gallery/annotationchart

ghost commented 2 years ago

I think that it can be done. See this answer

mages commented 2 years ago

It is not officially supported by Google. I suggest you ask the Google developers directly on the Google Chart API Forum: https://groups.google.com/g/google-visualization-api

ghost commented 2 years ago

That's the way https://stackoverflow.com/a/71739376/299077

mages commented 2 years ago

That's great news! I shall include it into the examples of the gvisAnnotationChart help file.