Scatter chart: how to use a different color only for 1 dot?

14 views
Skip to first unread message

Luigi Caradonna

unread,
Jul 26, 2014, 8:43:07 AM7/26/14
to google-visua...@googlegroups.com
I need to show a chart as a cartesian plane and to put dots on it.
No problem to do so, but now I need to use a different color for one of those dots and possibly put a label on its side.

Let's say that these are my data
var data = google.visualization.arrayToDataTable([
    ['1st param', '2nd param'],
    [ 8,     12],
    [ -4,    -5.5],
    [ 11,    14],
    [ 4,     -5],
    [ 3,     -3.5],
    [- 6.5,   7]
]);

at the moment they all are blue by default, is there a way to make only one of them red or any other color?

Luigi Caradonna

unread,
Jul 26, 2014, 9:49:11 AM7/26/14
to google-visua...@googlegroups.com
I've solved by using a second serie of data only for the dot which I wanted to display in another color


--
You received this message because you are subscribed to a topic in the Google Groups "Google Visualization API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-visualization-api/-Bbfhd8Zxfo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages