Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
103 - 1
<script type="text/javascript">
2
    google.charts.load('current', {'packages':['corechart']});
3
    google.charts.setOnLoadCallback(drawChart);
4
 
5
    // function draw chart
6
    function drawChart() {
7
        var data = google.visualization.arrayToDataTable([<?php echo $dataArr; ?>]);
8
        var options = {
9
            title: '<?php echo $graphTitle;?>',
10
            vAxis: {
11
                <?php echo !empty($reverseDir) ? "direction: -1," : ""; ?>
12
                viewWindow: {
13
                    <?php echo !empty($minValue) ? "min: $minValue," : ""; ?>
14
                    <?php echo !empty($maxValue) ? "max: $maxValue," : ""; ?>
15
                }
16
            },
17
            legend: { position: 'bottom' }
18
        };
19
 
20
        var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));
21
        chart.draw(data, options);
22
    }
23
</script>
24
<div id="curve_chart" style="width: 900px; height: 500px"></div>