mages / googleVis

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

gvisGauge from googleVis package in R studio #90

Closed ZinebHasnaoui closed 4 years ago

ZinebHasnaoui commented 4 years ago

I am using gvisGauge function on R studio, can I change the needle red color to black?

mages commented 4 years ago

Yes, you can:

library(googleVis)
plot(gvisGauge(CityPopularity, options=list(min=0, max=800, greenFrom=500,
                     greenTo=800, yellowFrom=300, yellowTo=500,
                     redFrom=0, redTo=300, redColor="#000000")))

For more details visit the Google documentation: https://developers.google.com/chart/interactive/docs/gallery/gauge

ZinebHasnaoui commented 4 years ago

thank you for responding, but your code changes the red part on the gauge to black, not the needle. is it possible to change the needle color to black?

mages commented 4 years ago

Sorry, I misread your question. No, unfortunately there is no option to change the colour of the needle.