Sorry - i meant chartrangefilter  not range select

On Wednesday, May 21, 2014 11:39:54 AM UTC-4, Joey D'Anna wrote:
>
> Hi guys - I have a site that uses a php script to feed JSON data to a 
> google line chart.
> I would love to retrofit it to use the new ChartRangeFinder control so i 
> can zoom in and out of the chart, but I dont really know javascript very 
> well so im not sure how to go about it.
>
> Right now here is my javascript code:
>
> <script type="text/javascript">
>
>       $.ajaxSetup ({
>
>       // Disable caching of AJAX responses */
>
>       cache: false
>
>               });
>
>     google.load("visualization", "1", { packages: ["corechart"] });
>
>     google.setOnLoadCallback(drawChart);
>
>     function drawChart() {
>
>       var jsonData = $.ajax({
>
>                 url: "chartselect.php?limit=<?php echo $limit;?>&s1=<?php 
> echo $s1;?>&s2=<?php echo $s2;?>&s3=<?php echo $s3;?>&s4=<?php echo 
> $s4;?>&s5=<?php echo $s5?>&s6=<?php echo $s6?>",
>
>                 dataType: "json",
>
>                 async: false
>
>       }).responseText;
>
>       var obj = jQuery.parseJSON(jsonData);
>
>       var data = google.visualization.arrayToDataTable(obj);
>
>       var options = {
>
>           theme: 'maximized'
>
>             };
>
>             var chart = new 
> google.visualization.LineChart(document.getElementById('chart_div'));
>
>           chart.draw(data, options);
>
>     }
>
>               function refreshChart() {
>
>               setInterval(function() { drawChart() }, 60000);
>
>               };
>
> $(document).ready(function() {
>
>     refreshChart();
>
> });
>
> </script>
>
>
>
> and in the HTML i have a div for the chart:
> <div id="chart_div" style="width: 850px; height: 500px;"></div>
>
>
> Is there an easy way to add the RangeSelect to this? I haven't been able 
> to find an example of one where it pulls JSON data from another php page 
> yet.
> 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 [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to