Forcing ChartRangeFilter range to snap to start of week.

161 views
Skip to first unread message

Yoram

unread,
Dec 20, 2012, 9:57:51 AM12/20/12
to google-visua...@googlegroups.com
Hi all

I have a ChartRangeFilter (of dates) that filter data of a ColumnChart.
I also have 3 buttons, week, month and quarter to programmatically change the ChartRangeFilter range (each button triggers a function that set the ChartRangeFilter state range).

Is there a way to force the ChartRangeFilter range to begin on the first day of the week and when I drag the range right ,for example, snap the range to the first day of the next week??

Thanks,
Yoram

asgallant

unread,
Dec 20, 2012, 2:13:49 PM12/20/12
to google-visua...@googlegroups.com
You can programmatically snap the range filter by setting the state of the filter in a "statechange" event handler.

Yoram

unread,
Dec 23, 2012, 5:32:49 AM12/23/12
to google-visua...@googlegroups.com
If I change the state in the "statechange" event handler wouldn't that cause an endless loop??

asgallant

unread,
Dec 23, 2012, 10:51:16 AM12/23/12
to google-visua...@googlegroups.com
As I recall, manually changing the state does not fire the statechange event.

Yoram

unread,
Dec 24, 2012, 8:06:13 AM12/24/12
to google-visua...@googlegroups.com
Thanks again,
I'l check that
Reply all
Reply to author
Forward
0 new messages