Hi,
but if i set the series options like this:
chartWrapper.setOption('series',{
> 0: { color: 'red' },
> 1: { color: 'green' },
> 2: { color: 'blue' }
> });
and if i set my view like this :
view : {columns: [2,0,1]}
is then column 0 from my view column 1 in my series options ? or is column 0
from my view every time column 0 from the series options ?
the problem is, i use checkboxes where users can click which xSeries the
want to show.
so one user selects the first time 2,1,0 and the colors are for example 1=
green and 0=red then he deselects for example column 1 from the view so the
new view array looks like this: view: {columns :[2,0]} and now i want that0is
already red an not an other color..
hope you understand what i mean..
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.