Javascript 选择下拉菜单并在codeigniter中更改google可视化图表的值

Javascript 选择下拉菜单并在codeigniter中更改google可视化图表的值,javascript,php,jquery,codeigniter,Javascript,Php,Jquery,Codeigniter,这是timeline_chart.php文件,当我在下拉列表中选择项目时,值应该在这里更改,请帮助我!! 我已经使用jquery创建了show-hide-div,但它不起作用 <!--Div that will hold the pie chart--> <div id="chart_div" ></div> <!--Load the AJAX API--> <script type="text/javascript

这是timeline_chart.php文件,当我在下拉列表中选择项目时,值应该在这里更改,请帮助我!! 我已经使用jquery创建了show-hide-div,但它不起作用

<!--Div that will hold the pie chart-->
    <div id="chart_div" ></div>

    <!--Load the AJAX API-->
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">

      // Load the Visualization API and the piechart package.
      google.load('visualization', '1.0', {'packages':['corechart']});

      // Set a callback to run when the Google Visualization API is loaded.
      google.setOnLoadCallback(drawChart);

      // Callback that creates and populates a data table, 
      // instantiates the pie chart, passes in the data and
      // draws it.

            google.load('visualization', '1', {'packages':['gauge']});
            google.setOnLoadCallback(drawChart);

            function drawChart() {
        var time =<?php echo $time_count; ?>;
        var money = <?php echo $money_count; ?>;
        var hour = <?php echo $hour_count; ?>;
        var data = google.visualization.arrayToDataTable([
          ['Label', 'Value'],
          ['Time', time],
          ['Hours', money],
          ['Money', hour]
        ]);

        var options = {

          width: 300, height: 150,
          greenFrom: 0, greenTo: 100,max:200,min:0,redFrom:151,redTo:200,
          yellowFrom:101, yellowTo: 150,
          minorTicks: 5
        };

        var chart = new google.visualization.Gauge(document.getElementById('chart_div'));

        chart.draw(data, options);


      }

    </script>
  </head>

但是它不起作用!!你有什么错误吗???您是否遇到了一些问题???我在饼图中获得了值,但在刷新时,我希望进行更改,为此我使用了jquery show hide div