Hi Chad,

Thanks for your report.

Sounds like you have found a bug, and from the looks of the code, I suspect
this has been around for a long time.   clear() should certainly reset
everything, but even just changing the refresh interval and drawing again
ought to be enough.  There should at least be a way to stop the refreshing,
which would then provide another way to work around the otherwise
uninterruptible extra refreshing.

The refreshing is actually being done by the internal refresh interval on
the Query, and for Query by itself, it appears that changing the refresh
interval should work properly.  So if you want to work around this, try
setting up your own query and then pass each DataTable to your
ChartWrapper.

On Thu, Oct 27, 2016 at 6:58 AM, channa <[email protected]> wrote:

> Hello,
>
> I have several ChartWrapper instances each connected to a data source with
> a nonzero refresh interval.  I draw the charts once on load and everything
> works fine.  I want to allow the user input to modify the refresh interval
> dynamically.  From the chartwrapper documentation I got the idea that it
> should be possible by calling
>
> my_chart_wrapper.setRefreshInterval(new_interval);
> my_chart_wrapper.draw()
>
> However, when I do that, the original query seems to continue and I end up
> with a new query with its own refresh interval set.  This quickly becomes a
> problem. I realized that this happens generically when .draw() is called
> regardless of whether or not a new refresh interval is set.  Is there a way
> to redraw the chart after updating the refresh interval and aborting the
> original query? It doesn't seem obvious from the exposed API.  I noticed
> that there is a .clear() method, which is undocumented, but that doesn't do
> the trick either.
>
> thanks,
>
> Chad
>
> --
> 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 google-visualization-api@
> googlegroups.com.
> Visit this group at https://groups.google.com/
> group/google-visualization-api.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/google-visualization-api/89974a7a-02d0-419e-b588-
> 1066f8152ada%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/89974a7a-02d0-419e-b588-1066f8152ada%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
[email protected] <[email protected]>   5CC, Cambridge MA

-- 
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJN4W7j1KydtddTW_1GYbZ_sPk-0WH04sERh6zWySqmHPA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to