Thank you for your quick reply. Probably I didn't describe my problem correctly. As I wrote I use google Spreadseet as data source. I have to visualize some data in different ways (stacked columns, etc.) by flipping header rows in data source (see attached pic). Now I can do this only if I double the data source area in Spreadsheet with TRANSPOSE function. Than I Query for two different area from the spreadsheet. This means two different Query and one unnecessary Transpose function in Spreadseet. It would be so much better to Query values once and than transpose data matrix in Javascript. What do you think it is possible?
2014. április 17., csütörtök 15:29:55 UTC+2 időpontban Andrew Gallant a
következőt írta:
>
> If by "switch axes" you mean choose which columns of data to use for each
> chart, then yes, you can do that, but not in the Query. Use DataViews to
> select columns from the DataTable:
>
> // create a DataView based on the DataTable "data"
> var view = new google.visualization.DataView(data);
> // tell the view to use columns 3, 4, and 8 from data
> view.setColumns([3, 4, 8]);
>
> Then when you draw the chart, use view instead of data:
>
> var chart = new
> google.visualization.LineChart(document.querySelector('#myChartDiv'));
> chart.draw(view, {/* options */});
>
> If you are using ChartWrapper objects, you can specify the view as a part
> of the object instead of creating discrete DataViews:
>
> var chart = new google.visualization.ChartWrapper({
> chartType: 'LineChart',
> containerId: 'myChartDiv',
> dataTable: data,
> options: {/* options */},
> view: {
> // use columns 7, 0, 2, and 5 for this chart
> columns: [7, 0, 2, 5]
> }
> });
>
> On Thursday, April 17, 2014 5:13:04 AM UTC-4, Németh Attila wrote:
>>
>> Hi,
>> I use Google Spreadsheet as data source in my visualisation reports. The
>> riport contains 40+ charts so it would be necessary to limit and optimize
>> Querys. I use some charts which use the same data with different axis. Now
>> use two different Querys to create these charts.
>> It is possibe to swich axis in google.visualization.Query() object? It
>> would dramatically decrease number of Querys.
>>
>> Thanks.
>>
>
--
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.
<<attachment: Screen shot 2014-04-17 at 4.57.30 PM.png>>
