last series in a LineChart

22 views
Skip to first unread message

da

unread,
Nov 8, 2016, 1:46:07 AM11/8/16
to Google Visualization API
My line chart would have variable number of series. Sometimes 5, 10 or 100.

I need the last one to be highlighted, say, linewidth : 2, color : hotpink, or whatever.

How do I do that when the

var options={
  series : {
    N : {
...
    },
...
}

definition is pre-defined?

Any ideas?


Thanks.
Dale




Daniel LaLiberte

unread,
Nov 8, 2016, 10:15:28 AM11/8/16
to Google Visualization API
Can you assign to the options after having created them?  e.g.

options.series['99'] = { ... }


--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/7b113491-9092-4572-9521-808a845f676f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

da

unread,
Nov 8, 2016, 11:48:45 AM11/8/16
to Google Visualization API
Thanks, Daniel. I'll give it a try.

Second question,

In the LineChart, the first series gets drawn first. So, it's buried by all the other lines. Is there a way to draw it last to make it stand out.

Daniel LaLiberte

unread,
Nov 8, 2016, 12:02:09 PM11/8/16
to Google Visualization API
I was thinking of suggesting that you use an earlier series, but then thought you might not want to precisely because the later ones show up on top.  Sorry, we don't have a way of altering the layering at this time, though it would be useful for a variety of applications.  Maybe we should implement something similar to the html z-index.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
To post to this group, send email to google-visualization-api@googlegroups.com.
Visit this group at https://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