In general, you should be able to execute the JS code from inside another function, but how and when that function is called could make a difference for the end result. If it is called more than once, for example, then you might be loading the library more than once, which is probably going to confuse things. So we would need to see a more complete example to tell for sure what is going on, or if you can, it is best to point at your page directly.
On Tue, May 26, 2020 at 8:47 AM piano lab <[email protected]> wrote: > Thank you for this answer, is it possible that it causes a conflict with >> the rest of my code, because I put it in this >> > > public function widget( $args, $instance ) { > //charts here > } > > > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/google-visualization-api/77f3008a-051a-4ac3-b661-92fa7a6ff6e8%40googlegroups.com > <https://groups.google.com/d/msgid/google-visualization-api/77f3008a-051a-4ac3-b661-92fa7a6ff6e8%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2> [email protected] <[email protected]> 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 view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJO7cKBVJMuA%2B8JJPr8i-8YScZoq_8Sh_ER0PZn9TMuEtg%40mail.gmail.com.
