If you want the colors to remain consistent, you have to track which data series you are showing in the chart, and assign colors to them manually (using the series.<series index>.color option). Similarly, you can change the vAxis.max option when you change series.
On Wednesday, March 20, 2013 6:22:31 AM UTC-4, Vivek More wrote: > > Also is there any way to get change in scale(vAxis.max value) when we > enable/disable lines > > On Wed, Mar 20, 2013 at 10:36 AM, Vivek More <[email protected]<javascript:> > > wrote: > >> I have a customized line chart. I have provided some check box options to >> hide/show lines in chart (Similar to http://jsfiddle.net/asgallant/WaUu2/ >> ) >> >> So when I hide/disable any line, it changes color of other lines, as I am >> changing the order of other columns. So is there any way by which we can >> keep the order of columns same, so that it will not change the color of >> other lines when we hide some lines. >> >> >> >> On Sat, Jan 12, 2013 at 12:03 PM, Vivek More <[email protected]<javascript:> >> > wrote: >> >>> Thanks, >>> >>> This is exactly what i was looking for. >>> >>> >>> On Sat, Jan 12, 2013 at 1:02 AM, asgallant >>> <[email protected]<javascript:> >>> > wrote: >>> >>>> There are many different ways to do this. As one example, here's a >>>> hack that I wrote that turns a CategoryPicker control into a data series >>>> selector: http://jsfiddle.net/asgallant/WaUu2/ >>>> >>>> >>>> On Friday, January 11, 2013 5:32:21 AM UTC-5, Vivek More wrote: >>>>> >>>>> Hi All, >>>>> >>>>> I m trying to do some customization in line charts. I have 3-4 lines >>>>> in single chart. I want to provide some control to enable/disable >>>>> (show/hide) these lines individually. Also vAxis should auto scale based >>>>> on >>>>> the values of lines visible in charts. >>>>> >>>>> Thanks >>>>> Vivek >>>>> >>>>> >>>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Google Visualization API" group. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msg/google-visualization-api/-/z9HJeXOHM6gJ >>>> . >>>> To post to this group, send email to >>>> [email protected]<javascript:> >>>> . >>>> To unsubscribe from this group, send email to >>>> [email protected] <javascript:>. >>>> For more options, visit this group at >>>> http://groups.google.com/group/google-visualization-api?hl=en. >>>> >>> >>> >> > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
