Nothing appears wrong from what you have posted.  But you haven't posted
all the details about what is going on, so we can't really tell.  If you
could point us at a web page showing the error, then we could debug it to
see what is going on.

There are some implicit ways to redraw a chart, by the way, but they end up
internally calling the draw() method anyway.  But the ChartWrapper doesn't
redraw implicitly (unless you use the refreshInterval option) by itself.

On Thu, May 4, 2017 at 10:24 AM, jose mendes <[email protected]>
wrote:

> drawChartSelected(chart?) {
> let loaded = false
> this.wrapper = new google.visualization.ChartWrapper({
> chartType: chart.options.chartType,
> dataTable: chart.data,
> options: chart.options || {},
> containerId: chart.id
> });
> setTimeout(() => {
> console.log(this.wrapper);
> this.wrapper.draw();
> }, 1000);
> loaded = true;
> this.events.publish('isLoaded', this.chartLoaded);
> }
>
> Here is the code I use to draw the graph again.
> Can you see if this is correct or not?
>
> This is where I get my error, when I try to do this.wrapper.draw ()
>
> quinta-feira, 4 de Maio de 2017 às 14:22:23 UTC+1, jose mendes escreveu:
>>
>> Hi all,
>> I'm working with the google charts on ionic 2 and by now I'm loving it.
>>
>> But I have a problem .. When I try to update the data in the graph it
>> gives me an error about the container.
>>
>> When the application starts I create 3 graphs dynamically, and what I
>> want to do is that when the user refreshes the page, the data of these
>> graphs are updated, without creating new graphs.
>>
>>
>> Error:
>>
>> ERROR Error: The container #3 is not defined.
>> at g (polyfills.js:3)
>> at gvjs_Z.gvjs_.getContainer (jsapi_compiled_default_module.js:240)
>> at gvjs_Z.gvjs_.draw (jsapi_compiled_default_module.js:236)
>> at google-chart-component.ts:63
>> at t.invokeTask (polyfills.js:3)
>> at Object.onInvokeTask (core.es5.js:4136)
>> at t.invokeTask (polyfills.js:3)
>> at n.runTask (polyfills.js:3)
>> at invoke (polyfills.js:3)
>> at e (polyfills.js:2)
>>
>>
>> Anyone have any idea what it might be?
>>
>> Thanks!
>>
>>
> --
> 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/19d3763b-c734-4c91-9340-
> 75ee90a84a8d%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/19d3763b-c734-4c91-9340-75ee90a84a8d%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/CAOtcSJPU87Q47siwZbq0U%3DCLsuav2uCBaoxOeOUgB4GsHFM%3D3Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to