[visualization-api] Re: Making a pivot LineChart

2013-02-06 Thread asgallant
To get the min/max values, call the control's #getState method. This will return an object with "lowValue" and "highValue" properties, which contain the min/max values, respectively. On Wednesday, February 6, 2013 11:21:03 AM UTC-5, Workaholic wrote: > > The best way to do it is with adding a l

[visualization-api] Re: Making a pivot LineChart

2013-02-06 Thread Workaholic
The best way to do it is with adding a listener to changes in the range filter? How can I get the min and max values of filter's state? Thanks again. On Friday, February 1, 2013 7:52:50 PM UTC+2, Workaholic wrote: > > Hi all, > I'm making a pivot chart from a given datasource added as "table.jp

[visualization-api] Re: Making a pivot LineChart

2013-02-06 Thread asgallant
You'll have to apply the filter to the base data, re-pivot, and then redraw. On Wednesday, February 6, 2013 6:38:49 AM UTC-5, Workaholic wrote: > > Thanks, > I'm trying to defined the range filter on the third column of the table in > "table.jpg" (called in my code visualDataSecondChart). > The t

[visualization-api] Re: Making a pivot LineChart

2013-02-04 Thread asgallant
You have to choose a column to filter (that error say your choice of a column with the label "colLabel" doesn't exist in the table). The filter can only operate on a single column of data, so if you want it to filter on all of the pivoted columns, you will have to apply it before the pivot. On

[visualization-api] Re: Making a pivot LineChart

2013-02-04 Thread Workaholic
Hi, Thanks a lot but it's still not working. It said Invalid column label:colLabel error. I understand what the error, I want the range filter work on the values inside the pivot table in "customizePivot.jpg". How can I do such a thing? Maybe I need to build a column with all these values?(still

[visualization-api] Re: Making a pivot LineChart

2013-02-04 Thread asgallant
If you want to use the NumberRangeFilter on the chart, you should bind them together in a Dashboard: function drawSecondChart(TwoDTable) { var columnsTable = new google.visualization.DataTable(); columnsTable.addColumn('number', 'colIndex'); columnsTable.addColumn('string', 'colLabel'

[visualization-api] Re: Making a pivot LineChart

2013-02-03 Thread Workaholic
I'm trying to evade repivoting my data table On Friday, February 1, 2013 7:52:50 PM UTC+2, Workaholic wrote: > Hi all, > I'm making a pivot chart from a given datasource added as "table.jpg". > I'm trying to draw a line chart like the one in "chart.jpg" and add a > string filter on it. > > Wh

[visualization-api] Re: Making a pivot LineChart

2013-02-03 Thread Workaholic
Hi again, I have a problem making the range filter work. Maybe it because the range filter works only with a given column and not with pivot table like I did? Here is my code: function drawSecondChart(TwoDTable){ var columnsTable = new google.visualization.DataTable(); columnsTable.addColumn

[visualization-api] Re: Making a pivot LineChart

2013-02-01 Thread Workaholic
Great, thanks again. On Saturday, February 2, 2013 12:41:39 AM UTC+2, asgallant wrote: > > There are different ways to approach adding a range filter here, and the > "best" one is going to depend on how everything else is set up. If you add > it prior to the pivot, then you would need to re-piv

[visualization-api] Re: Making a pivot LineChart

2013-02-01 Thread asgallant
There are different ways to approach adding a range filter here, and the "best" one is going to depend on how everything else is set up. If you add it prior to the pivot, then you would need to re-pivot the data in a "statechange" event handler, but it could also be added after the pivot, in w

[visualization-api] Re: Making a pivot LineChart

2013-02-01 Thread Workaholic
Thanks! So I will work more on my pivoting method. Just wanted to make sure I'm on the right track. Your script works great! Just one more question: If I want to add a range filter beside the string filter, do I need to add a listener for it too? Thanks On Friday, February 1, 2013 8:37:25 PM UT

[visualization-api] Re: Making a pivot LineChart

2013-02-01 Thread Workaholic
Thanks! So I will work more on my pivoting method. Just wanted to make sure I'm on the right track. Your script works great! Just one more question: If I want to add a range filter beside the string filter, do I need to add a listener for it too? Thanks On Friday, February 1, 2013 7:52:50 PM UT

[visualization-api] Re: Making a pivot LineChart

2013-02-01 Thread asgallant
The API doesn't support pivoting data, so the only way to do it is to do it manually, which it looks like you are doing already. What would you like the StringFilter to do here? Do you want to change the countries displayed? If so, then you should apply the StringFilter to the base data set a