how to code google chart in gwt using native javascript

前端 未结 2 1369
春和景丽
春和景丽 2021-01-26 19:12

I am trying to display google chart using gwt native javascript but i am not getting any output below is my code:

GwtChart.html


<         


        
相关标签:
2条回答
  • 2021-01-26 20:03

    What makes you want to do it native?

    I usually use wrapper from here

    Is that not working for you?

    0 讨论(0)
  • 2021-01-26 20:08

    1) try this:

    $wnd.google.load("visualization", "1.0", {packages : [ 'corechart' ], callback: drawVisualization});
    

    instead of these 2 lines:

    $wnd.google.load('visualization', '1', {packages: ['corechart']});
    
    
    $wnd.google.setOnLoadCallback(drawVisualization);
    

    or 2) call google.load in your HTML page with

    <script type="text/javascript"  src="http://www.google.com/jsapi"></script>     
    <script type="text/javascript">
        google.load("visualization", "1", {'packages' : ["corechart"] });
    </script>
    
    0 讨论(0)
提交回复
热议问题