The bug I mentioned was probably fixed in version 45.2. which is also
'current' at this time.  Please try it and let me know.

On Wed, Aug 29, 2018 at 4:53 PM channa <[email protected]> wrote:

> Hi Daniel,
>
> Can you comment on whether or not the bug identified in this thread will
> be fixed in the next release?
>
> Thanks,
>
> Chad
>
> On Friday, November 4, 2016 at 10:54:59 AM UTC-4, Daniel LaLiberte wrote:
>>
>> Your ChartWrapper looks like it could work, though it is order dependent
>> on first calling draw() before setRefreshInterval() can be called, and
>> draw() assumes there is a query.   So just a note for anyone else thinking
>> of using this code, it might not work for you.
>>
>> On Thu, Nov 3, 2016 at 9:07 PM, channa <[email protected]> wrote:
>>
>>> Hi Daniel,
>>>
>>> Thanks for letting me know that it will be sorted in a few weeks!  I
>>> went ahead and implemented a bare minimum ChartWrapper class so that I can
>>> minimize code changes (just a find and replace) once it is fixed upstream.
>>> Forgive my javascript.  This is my first time really using it :)  I have
>>> verified that this works as I would hope and doesn't create new queries
>>> each time draw() is called.
>>>
>>> function ChartWrapper(obj) {
>>>
>>>         this.chartType = obj.chartType;
>>>         this.dataSourceUrl = obj.dataSourceUrl;
>>>         this.query = obj.query;
>>>         this.query_object = null;
>>>         this.refreshInterval = obj.refreshInterval;
>>>         this.options = obj.options;
>>>         this.containerId = obj.containerId;
>>>         this.container = document.getElementById(this.containerId);
>>>
>>>         command = "this.chart = new google.visualization." +
>>> this.chartType  + "(this.container)";
>>>         eval(command);
>>>
>>>         this.clear = function() {
>>>                 this.query_object && this.query_object.abort();
>>>                 this.chart.clearChart();
>>>         }
>>>
>>>         this.draw = function() {
>>>                 this.query_object && this.query_object.abort();
>>>                 this.query_object = new
>>> google.visualization.Query(this.dataSourceUrl + "&tq=" + this.query);
>>>
>>> this.query_object.setRefreshInterval(this.refreshInterval);
>>>                 var queryWrapper = new QueryWrapper(this.query_object,
>>> this.chart, this.options, this.container);
>>>                 queryWrapper.sendAndDraw();
>>>         }
>>>
>>>         this.setRefreshInterval = function (refreshInterval) {
>>>                 this.refreshInterval = refreshInterval;
>>>
>>> this.query_object.setRefreshInterval(this.refreshInterval);
>>>         }
>>> }
>>>
>>>
>>>
>>> On Thursday, November 3, 2016 at 1:26:18 PM UTC-4, Daniel LaLiberte
>>> wrote:
>>>>
>>>> It might not be worth the trouble to implement your own ChartWrapper,
>>>> and I'm not sure it is possible to do that well enough, depending on your
>>>> needs.  I have checked in a fix for this bug, and I expect I will have to
>>>> update v45 for another more serious reason, so you should see this in a
>>>> week or two.
>>>>
>>>> But in the short term, rather than replacing the ChartWrapper entirely,
>>>> I would recommend just replacing its use of the refreshInterval on the
>>>> query that you provide it.  Just set up your own Query, handle the
>>>> response, set the ChartWrapper's dataTable, and draw() again.
>>>>
>>>> On Thu, Nov 3, 2016 at 12:54 PM, channa <[email protected]> wrote:
>>>>
>>>>> Hi Daniel,
>>>>>
>>>>> I am trying to work around this bug and was wondering if you or anyone
>>>>> could offer a bit of advice.  Ideally, I would like to implement my own
>>>>> ChartWrapper class that supports the minimum feature set I need so that I
>>>>> have an easy code change to make once the class is fixed upstream.  I
>>>>> started to try to do this using the QueryWrapper class, but I am beginning
>>>>> to think that might also not be the best idea.  Does anyone have any 
>>>>> advice
>>>>> on this?
>>>>>
>>>>> thanks in advance,
>>>>>
>>>>> Chad
>>>>>
>>>>> On Thursday, October 27, 2016 at 11:55:00 AM UTC-4, Daniel LaLiberte
>>>>> wrote:
>>>>>>
>>>>>> It doesn't appear to be difficult to fix, and it is a rather serious
>>>>>> problem when it occurs, akin to an infinite loop.  So I would expect to
>>>>>> address it relatively soon.
>>>>>>
>>>>>> On Thu, Oct 27, 2016 at 11:41 AM, Chad Hanna <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Daniel,
>>>>>>>
>>>>>>> Thanks for confirming this. I thought I might need to rework things
>>>>>>> to use lower level classes.  It would be wonderful if this could be 
>>>>>>> fixed
>>>>>>> in ChartWrapper since I plan to make a lot of charts and ChartWrapper is
>>>>>>> otherwise entirely adequate and makes for simpler code.  Is there any
>>>>>>> chance it could be fixed in the coming weeks, months, years?
>>>>>>>
>>>>>>> Thanks again,
>>>>>>>
>>>>>>> Chad
>>>>>>>
>>>>>>> On Thu, Oct 27, 2016 at 11:32 AM, 'Daniel LaLiberte' via Google
>>>>>>> Visualization API <[email protected]> wrote:
>>>>>>>
>>>>>>>> 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
>>>>>>>>> [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/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]   5CC, Cambridge MA
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to a topic in
>>>>>>>> the Google Groups "Google Visualization API" group.
>>>>>>>> To unsubscribe from this topic, visit
>>>>>>>> https://groups.google.com/d/topic/google-visualization-api/wyYZue6b1iE/unsubscribe
>>>>>>>> .
>>>>>>>> To unsubscribe from this group and all its topics, 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
>>>>>>>> <https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJN4W7j1KydtddTW_1GYbZ_sPk-0WH04sERh6zWySqmHPA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> 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/CA%2B0a1yc7%3DiUo0LRpL2tnWS8smWy1hfT9gEWX1bvv2GbpHUeG1g%40mail.gmail.com
>>>>>>> <https://groups.google.com/d/msgid/google-visualization-api/CA%2B0a1yc7%3DiUo0LRpL2tnWS8smWy1hfT9gEWX1bvv2GbpHUeG1g%40mail.gmail.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]   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/93d28c96-ed57-4fc9-8c77-b8bc5c61ee49%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/google-visualization-api/93d28c96-ed57-4fc9-8c77-b8bc5c61ee49%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]   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/b80cd072-ec5f-4a70-8d60-14dee6ccabcc%40googlegroups.com
>>> <https://groups.google.com/d/msgid/google-visualization-api/b80cd072-ec5f-4a70-8d60-14dee6ccabcc%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]   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/8082da4f-e9f7-478c-8431-405da231b849%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/8082da4f-e9f7-478c-8431-405da231b849%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/CAOtcSJMkgHCSQkHqGpDrDk659UwPHPBK8T08VbbZJnW%2BAoY%3DLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to