Hi,
and what is the best way to change options dynamicly ? i want to change add
or remove options dynamicly from a chart.
at the moment i do it like this:
var options = {
> title: 'New Values',
> animation:{
> duration: 1000,
> easing: 'in'
> },
> isStacked: false,
> pointSize: 3
> };
>
options.istStacked=true; //Set Stacket to true
> chart.draw(dataView, options); // redraw chart
>
is there a better way ? how can i set,add and remove options dynamicly ?
Am Montag, 24. März 2014 17:03:13 UTC+1 schrieb cyb:
>
> Hi,
>
> i have the following code:
>
>
> var data = new google.visualization.arrayToDataTable([
> ['date','column1','column2'],
> [20111001,2,3],
> [20111002,5,6],
> [20111003,8,9],
> [20111004,11,12] ]);
>
>
> var dataView = new google.visualization.DataView(data);
>
> var chart = new
> google.visualization.LineChart(document.getElementById('chart_div'));
>
> chart.draw(dataView, options);
>
>
> This draws me a line chart but if i replace the LineChart with this: chart
> = new google.visualization.PieChart(document.getElementById('chart_div'));
> i get this error: "Pie chart should have a first column of type string"
> What is now the best an easiest way to convert the data from a line in a
> pie chart? I want switch between a pie and a line chart and all should use
> the same data-array. Or can i disable the check that the first value must
> be a string !?
> And then i want select different values with dataView.setColumns(); so
> that i can determine which data is showing in my chart.
>
> And second question can i convert the date- column to a real date !?
> 20111001 is Year 2011 Month: 10 and Day: 01 ?
>
>
>
> Best regards cyb
>
>
>
>
>
>
>
>
>
>
--
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.