Changing color of a single data point in a bar chart using Google Apps Script

85 views
Skip to first unread message

Rohan Madtha

unread,
Jun 24, 2019, 2:58:29 AM6/24/19
to Google Visualization API
Hello,

I know that I can assign a color to an entire series using setOption like so:

.setOption('series',{'0':{'color':'0000ff'},'1':{'color':'red'}, '2':{'color':'775baf'},'3':{'color':'green'}})

or directly with

.setOption('series.0.color', 'blue')

Sometimes I run into a case where I want to call attention to only a single data point in the series, and not the entire series. How can I set this color in script? I know there is an option to do it in the Edit Chart UI, but I was hoping to do it in code.
Reply all
Reply to author
Forward
0 new messages