Dear Users,

I have the following code to draw a graph from a DB query in my html-body:

<div id="chart_neo_div">
    <script>
    function drawChart() {
      var jsonData = $.ajax({
          url: "Antwortzeiten_.php?seite=Neo",
          dataType:"json",
          async: false
          }).responseText;
       
      // Create our data table out of JSON data loaded from server.
      var data = new google.visualization.DataTable(jsonData);

      // Instantiate and draw our chart, passing in some options.
      var chart = new google.visualization.LineChart(document.getElementById
('chart_neo_div'));
      chart.draw(data, {width: 1000, height: 240});
    }
    window.setTimeout(drawChart(), 10000);    
    </script>
</div>

The width is 1000 fixed. The source of the data is a database, that is 
growing. Thus the amount of data points to be displayed is increasing each 
time the LineChard is drawn.

1. To display more and more data points in this graph its width should 
dynamically grow with the data.
2. As the width of the html-page is limited, I need a scroll-bar for this 
at some limit.
3. Ideally the y-axis label and the legend is fixed outside the scroll-able 
area, so that this information is always seen (When I make the whole div 
scroll, the legend and the x-axis is also shifted out of the displayed 
area).

I would be pleased, if you have some hints how to do this, as I am a total 
beginner in this field.

Best regards and thank you!  

-- 
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/67f7eeba-2a0c-4456-bb6e-940e092a38b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to