The charts have no contextual understanding of your data, so it is up to 
you to tell them what color everything should be.  If you change the order 
of series, you have to change the options to reflect the new order.

I have never seen the charts ignore the options set, so you will have to 
provide an example demonstrating the chart ignoring the colors after you 
change the view.

On Thursday, May 15, 2014 5:00:48 PM UTC-4, cyb wrote:
>
> Hi,
>
> ok another question.. i use a ChartWrapper and a view to hide and show my 
> columns..
>
>
>  if i use for this view, "columns :[0,1,2,3]" it shows me for example 
> column 1 in red, 2 in green and 3 in blue.. but if i use the same columns 
> in different order for example, "columns: [3,2,1,0]" then i have also 
> different colours but i want that column 1,2,3 has every time the same 
> colors.. how can i do that ? i have dynamic dataTable`s.. one table can 
> have 2 columns and one other can have 30 columns..
> i have tried to set the series options like this : 
>
> chartWrapper.setOption('series',{
>>                                 0: { color: '#10D2CB' },
>>                                 1: { color: '#136E09' },
>>                                 2: { color: '#B810D2' }
>>                             });
>
>
> first problem, this is static and i need dynamic color creation maybe the 
> same color function that google chart uses..
> problem 2 if i set the series option the color is only set  the first 
> time, if i change then my view i have different colors again.
>
> Am Montag, 5. Mai 2014 18:11:24 UTC+2 schrieb cyb:
>>
>> Hi,
>>
>> i use a chartWrapper to display different charts (Line,Colum,Area,Pie and 
>> so on) and i can filter dates and numbers without any problem but if i 
>> switch to discrete mode then the filtering did no longer work..
>>
>> i build the filter view for my DataWrapper like this:
>>
>> Data:
>>
>>> date,New York,San Francisco,Austin,Country
>>> 20111001,10,20,30,A
>>> 20111002,40,50,60,B
>>> 20111003,70,80,90,C
>>> 20111004,100,110,120,D
>>
>>
>> var dataTable=new google.visualization.DataTable(DATA);
>>>  var filteredView ={columns : 1,2,3, rows : 
>>> dataTable.getFilteredRows([{column:1, minValue: 40, maxValue: 70}])};
>>
>>
>> For example  i want filter on the xAxis (New York) all values between 40 
>> and 70.. this works if i have no discrete mode..
>>
>> but if i change the Column "New York" from type number to string (is this 
>> the only method to activate the discrete mode? or is there an option where 
>> i must not change the type ? ) the filtering did not work. I do the 
>> switching to discrete mode like that:
>>
>> var View =[
>>>                             {
>>>                                 type: 'string',
>>>                                 label: dataTable.getColumnLabel(1),
>>>                                 calc: function (dt, row) {
>>>                                     return dt.getFormattedValue(row, 1);
>>>                                 }
>>>                             }
>>>                         ];
>>>                         View .push.apply(View ,[2,3]); //Adds the values 
>>> from a second array to the first array
>>>                         var newView={columns: View }; /
>>
>>
>>
>>
>> i have the same problem with the PieChart, there is per default the first 
>> column a string so i can not do any filtering.
>>
>> how can i solve this problem ?
>>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to