Closed dwy904 closed 7 years ago
Here is an example which does just that:
library(googleVis)
df=data.frame(country=c("US", "GB", "BR"),
val=c(10,13,14))
barch <- gvisBarChart(df, xvar="country", yvar="val",
options=list(
title="Hello World",
titleTextStyle="{color:'red',
fontName:'Courier',
fontSize:16}",
backgroundColor="#D3D3D3",
hAxis="{gridlines:{color:'red', count:3}}",
hAxis="{title:'Country', titleTextStyle:{color:'red'}}",
legend="{position:'bottom', textStyle:{color:'blue'}}",
width=500,
height=300
))
plot(barch)
I am not able to edit the legend text color on the following graph (black is the default color):
Once I change my background into some darker colors, some of the texts will become invisible. However, I am not able to change the color of those text.