Hi all,

Sorry if this is a newbie question, but I am stuck on it for quite some 
time.  
The question is why can't I get two different charts (tables in this case) 
to display at the same time. Each chart is receiving data from it's own 
dynamic datasource via polling. Only wrapper2 is being displayed on the 
page. 
What am I doing wrong?  

both datasources are working and returning data in proper format. 
separately I can display data from both sources, but together side by side 
only second one displays. 
In general I need to create a dashboard with various charts and tables 
displaying next to each other each powered by it's own datasource.  Is 
Google Visualization API the right choice? 
I also tried using "Dashboard" apis, but there ONE datasource should be 
shared between various charts , just this datasource can be manipulated 
differently for each display.
but what I need is each chart gets it's own data with it's own frequency of 
update and all working together. 

thank you in advance for help.

-Dima.


Here is my source:


<html>

  <head>

    <!--Load the AJAX API-->

    <script type="text/javascript" src="https://www.google.com/jsapi";></
script>

   

    <script type="text/javascript">


    google.load('visualization', '1.0',{'packages':['corechart']});  // 
Note: No need to specify chart libraries.

 

    var wrapper1;

    var wrapper2;

    function drawVisualization() {


        

        // Set chart options

        var options1 = {'title':'All Messages Queue Detail',

                       'width':600,

                       'height':400};


        // Set chart options

        var options2 = {'title':'Old (30 sec) Messages Queue Detail',

                       'width':600,

                       'height':400};


    

  

         wrapper1 = new google.visualization.ChartWrapper({

            "chartType": "Table",

            "containerId": "all_messages",

            "dataSourceUrl": 
"http://localhost:9999/chart?query-type=queue-detail&queue-name=test_client1&vpn=jack&timeDelay=0";
,

            "refreshInterval": 10,

             "options": options1

            

          });

 

         wrapper2 = new google.visualization.ChartWrapper({

            "chartType": "Table",

            "containerId": "old_messages",

            "dataSourceUrl": 
"http://localhost:9999/chart?query-type=queue-detail&queue-name=test_client2&vpn=dmitri&timeDelay=800";
,

            "refreshInterval": 5,

             "options": options2

            

          });


         wrapper1.draw();

          wrapper2.draw();

          

          

       

     }

    

    

    

  google.setOnLoadCallback(drawVisualization);


      

      </script>


 

  </head>


  <body>

       <h1>Messages Detail Monitor</h1>

     

    <!--Div that will hold the pie chart-->

       <table>

        <tr style='vertical-align: top'>

          <td '>

            <div id="all_messages"></div>

          </td>

         <td '>

            <div id="old_messages"></div>

          </td>

           </tr>

       

      </table>

       

 

    

  </body>

</html>

-- 
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 http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to