You're welcome. On Thursday, August 23, 2012 1:23:01 PM UTC-4, Lionel Garnier wrote: > > Whaou! That's a very nice solution!! > Thanks a lot once again :) > > Le jeudi 23 août 2012 18:37:01 UTC+2, asgallant a écrit : >> >> Ahh...I think that was just an early version of the ChartRangeFilter. In >> any event, they used almost the exact same method I did to aggregate values >> over time. >> >> If you group the main dataTable by date, you can pass that grouped data >> to the filter instead of the main dataTable. Remove the "view" parameter >> in the control and it will draw the monthly totals: >> http://jsfiddle.net/asgallant/GAcab/2/ >> >> Note that depending on how your dates are input (ex, all the January data >> has different days of the month, or something like that) you may need to >> use a modifier function on column 0 when you group the data (see >> here<https://developers.google.com/chart/interactive/docs/reference#google_visualization_data_group>for >> instructions). >> >> On Thursday, August 23, 2012 2:43:26 AM UTC-4, Lionel Garnier wrote: >>> >>> Excellent! You are solving two of my issues :) >>> Thanks a lot >>> >>> Nevertheless, just one thing is differing from what I want: I would like >>> the graph of the ChartRangeFilter to show the overall sales per month. >>> But don't worry, I know how I can do it... I will do it without using a >>> dashboard. >>> >>> >>> Regarding the RangeSelector, I simply adapted the code that I found >>> behind this page: >>> http://google-visualization-io2011.googlecode.com/hg/iframes/geo/xkcd_dilbert.html >>> :P >>> After a few tries I could work with it. >>> >>> >>> Thanks again for your quick answer >>> >>> >>> Le mercredi 22 août 2012 21:59:01 UTC+2, asgallant a écrit : >>>> >>>> Where did you find information on a "RangeSelector" control? I haven't >>>> seen any mention of one (though experimental evidence seems to suggest >>>> that >>>> the control does exist, I just can't get it to work). >>>> >>>> You can make this work by using a ChartRangeFilter. Set up a >>>> "statechange" event handler for the control. In the handler, call the >>>> #getState method of the control - this returns an object with range.start >>>> and range.end properties. Use those values to filter your data table into >>>> a DataView, and then group the view into a new DataTable that you use to >>>> draw the GeoChart. Here's an example: >>>> http://jsfiddle.net/asgallant/Fs3Hb/ >>>> >>>> On Wednesday, August 22, 2012 10:40:37 AM UTC-4, Lionel Garnier wrote: >>>>> >>>>> Hello, >>>>> >>>>> I am trying to make a page with a geo chart and a selector showing the >>>>> overall evolution by month. >>>>> The geochart is here to show overall sales value by region. >>>>> The selector will let the possibility to filter based on a time >>>>> interval (can be up to several years). >>>>> >>>>> As the time is not visible in the Geochart (consolidated data over the >>>>> selected period), I cannot use a "dashboard" (if I understood properly). >>>>> >>>>> So I am now doing it manually... >>>>> >>>>> >>>>> I first tried with a ChartRangeFilter, but I don't know how to >>>>> retrieve the selected min and max after change. >>>>> => I used the event 'statechange' but then how can I get the min value >>>>> in the function that is called? >>>>> >>>>> I then used a RangeSelector and it works fine. But I don't know how to >>>>> set the minimum range size (to one month for example). >>>>> => Is it possible? >>>>> I could't find any documentation on the RangeSelector, so I don't even >>>>> know if this is an official control..! >>>>> >>>>> >>>>> Do anyone has a solution for one of my two problems? >>>>> Thanks in advance for your feed back >>>>> >>>>>
-- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/mX7xdI0WtqUJ. To post to this group, send email to google-visualization-api@googlegroups.com. To unsubscribe from this group, send email to google-visualization-api+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.