    <!--script src="<?php echo THEME_BASEURL; ?>assets/vendor/daterangepicker.js"></script>

    <script src="<?php echo BASEURL; ?>js/highcharts/new2/amcharts/amcharts.js" type="text/javascript"></script>

    <script src="<?php echo BASEURL; ?>js/highcharts/new2/amcharts/serial.js" type="text/javascript"></script>

    <script src="<?php echo BASEURL; ?>js/highcharts/js/highcharts.js"></script>

    <script src="<?php echo BASEURL; ?>js/highcharts/js/highcharts-more.js"></script>

    <script src="<?php echo BASEURL; ?>js/highcharts/js/modules/exporting.js"></script>

    <script src="<?php echo BASEURL; ?>js/highcharts/amcharts/gauge.js" type="text/javascript"></script-->

    

<script>
          $(function () {
            

          });
          
          function myMap() {
            var mapProp= {
              center:new google.maps.LatLng(<?php echo number_format($rowInfo['lat'],6,'.',',');?>,<?php echo number_format($rowInfo['lng'],6,'.',',');?>),
              zoom:16,
              mapTypeId:google.maps.MapTypeId.HYBRID,
              disableDefaultUI: true
            };
            var map = new google.maps.Map(document.getElementById("googleMap"),mapProp);
            var marker;
            var popup;

            var noPoi = [{
                          featureType: "poi",
                          elementType: "labels",

                          stylers: [{
                            visibility: "off"
                          }]
                        }];

            map.setOptions({
              styles: noPoi
            });

            infowindow = new google.maps.InfoWindow;

            var aha = '0';
            var icourl = '<?php echo BASEURL; ?>images/maps/';
            $.get("<?php echo BASEURL; ?>data/getlok.php?id=<?php echo $rowInfo['id_lokasi']; ?>", {aha:aha},function(res) {
              var d = res.data;
              for (var i = 0; i < d.length; i++) {

                html = '<div style="width:260px; padding-left:10px;">';
                html += '<table border="0" cellspacing="0" cellpadding="0" style="font-size: 13px; width:100%; margin-bottom:10px;">';
                html += '<tr><td colspan="2" style="width:100px; vertical-align:top; font-size: 16px;"><b>' + d[i].nama + '</b></td></tr>';
                html += '</table>';
                html += '<table border="0" cellspacing="0" cellpadding="0" style="font-size: 13px; width:100%; margin-bottom:10px;">';
                html += '<tr><td rowspan="4" style="width:100px; border:4px solid #' + d[i].color + ' !important;"><div style="display:block; clear:both; width:100px;">&nbsp;</div><div style="font-size:48px; line-height: 36px; display:block; clear:both; width:100px; text-align:center;">' + d[i].measure_num + '</div><div style="font-size:12px; display:block; clear:both; width:100px; text-align:center;">' + d[i].measure_uom + '</div><div style="font-size:16px; display:block; clear:both; width:100px; text-align:center; color:#' + d[i].color + ';">' + d[i].siaga + '</div><div style="display:block; clear:both; width:100px;">&nbsp;</div></td><td style="font-size:14px; padding-left:20px;"><img src="' + d[i].image + '" / style="width:100px; height:100px; border:2px solid #9e9e9e !important;"></td></tr>';
               
                html += '<tr><td style="font-size:14px; padding-left:20px;">&nbsp;</td></tr>';
                html += '</table>';
                html += '<table border="0" cellspacing="0" cellpadding="0" style="font-size: 13px; width:100%">';
                html += '<tr><td style="width:80px; vertical-align:top;">Last update</td><td style="width:5px; vertical-align:top;">:</td><td style="padding-bottom:5px;">' + d[i].last_update + '</td></tr>';
                html += '<tr><td style="width:80px; vertical-align:top;">Position</td><td style="width:5px; vertical-align:top;">:</td><td style="padding-bottom:5px;">' + d[i].lat + ',' + d[i].long + '</td></tr>';
                html += '<tr style="border-bottom: 1px solid #dddddd;"><td style="width:80px; vertical-align:top;">Address</td><td style="width:5px; vertical-align:top;">:</td><td style=" padding-bottom:10px;">-</td></tr>';
                html += '</table>';
                html += '</div>';

                

                marker = new google.maps.Marker({
                  position: new google.maps.LatLng(d[i].lat, d[i].long),
                  map: map,
                  title: d[i].nama,
                  icon: icourl + d[i].icon,
                });

                google.maps.event.addListener(marker,'click', (function(marker,html,infowindow){ 
                    return function() {
                        infowindow.setContent(html);
                        infowindow.open(map,marker);
                    };
                })(marker,html,infowindow));  

              } 
            },'json');


          }
        </script>

<script src="https://cdn.amcharts.com/lib/5/index.js"></script>
<script src="https://cdn.amcharts.com/lib/5/xy.js"></script>
<script src="https://cdn.amcharts.com/lib/5/percent.js"></script>
<script src="https://cdn.amcharts.com/lib/5/radar.js"></script>
<script src="https://cdn.amcharts.com/lib/5/themes/Animated.js"></script>
<script src="https://cdn.amcharts.com/lib/5/themes/Dark.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBA5GVUBNU27Lw461qt7XaKufe3EyLPxbY&callback=myMap"></script>





    <script type="text/javascript">

        $(document).ready(function()

        {

          //var mapApplyHeight = $(window).height() - 105; 

          //$("#map").height(mapApplyHeight);



          var start = moment().subtract(1, 'days');
          var end = moment().subtract(1, 'days');

          function cb(start, end) {
            $('#daterange').html(start.format('DD/MM/YYYY') + ' - ' + end.format('DD/MM/YYYY'));
          }

          $('#daterange').daterangepicker({
            startDate: start,
            endDate: end,
              autoUpdateInput: false,
              locale: {
                  cancelLabel: 'Clear'
              }
          }, cb);

          cb(start, end);

          $('#daterange').on('apply.daterangepicker', function(ev, picker) {
              $(this).val(picker.startDate.format('DD/MM/YYYY') + ' - ' + picker.endDate.format('DD/MM/YYYY'));
          });

          $('#daterange').on('cancel.daterangepicker', function(ev, picker) {
              $(this).val('');
          });

          $('.applyBtn').click(function(){
            setTimeout(
  function() 
  {
    //do something special
            var type = $('#type').val();
            refreshBy(type);
  }, 1000);
          });

        });

        function refreshBy(type){
          //var type = $('#type').val();
          var rawrangedate = $('#daterange').val(); 
          document.location.href = "<?php echo BASEURL; ?>home.php?page=datapos&pos=<?php echo $_GET['pos']; ?>&tpos=<?php echo $_GET['tpos']; ?>&type="+type+"&rangedate=" + rawrangedate;
        }



        $(window).on("load", function () {





        });



        am5.ready(function() {

        <?php if($_GET['pos'] == 'bdgkatulampa') { ?>
          // Create root element
        // https://www.amcharts.com/docs/v5/getting-started/#Root_element
        var root = am5.Root.new("chart-pos-pdapch");


        // Set themes
        // https://www.amcharts.com/docs/v5/concepts/themes/
        root.setThemes([
          am5themes_Animated.new(root)
        ]);

        // Create chart
        // https://www.amcharts.com/docs/v5/charts/xy-chart/
        var chart = root.container.children.push(
          am5xy.XYChart.new(root, {
            panX: false,
            panY: false,
            wheelX: "none",
            wheelY: "none"
          })
        );

        // Add cursor
        // https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/
        var cursor = chart.set("cursor", am5xy.XYCursor.new(root, {}));
        cursor.lineY.set("visible", false);

        // Create axes
        // https://www.amcharts.com/docs/v5/charts/xy-chart/axes/
        var xRenderer = am5xy.AxisRendererX.new(root, { minGridDistance: 30 });
        xRenderer.labels.template.setAll({ text: "{realName}" });

        var xAxis = chart.xAxes.push(
          am5xy.CategoryAxis.new(root, {
            maxDeviation: 0,
            categoryField: "category",
            renderer: xRenderer,
            tooltip: am5.Tooltip.new(root, {
              labelText: "{realName}"
            })
          })
        );

        var yAxis = chart.yAxes.push(
          am5xy.ValueAxis.new(root, {
            maxDeviation: 0.2,
            numberFormat: "#'",
            renderer: am5xy.AxisRendererY.new(root, {})
          })
        );

        var yAxis2 = chart.yAxes.push(
          am5xy.ValueAxis.new(root, {
            maxDeviation: 0.2,
            syncWithAxis: yAxis,
            renderer: am5xy.AxisRendererY.new(root, { opposite: true })
          })
        );

        // Create series
        // https://www.amcharts.com/docs/v5/charts/xy-chart/series/
        var series = chart.series.push(
          am5xy.ColumnSeries.new(root, {
            name: "Series 1",
            xAxis: xAxis,
            yAxis: yAxis2,
            valueYField: "value",
            sequencedInterpolation: true,
            categoryXField: "category",
            tooltip: am5.Tooltip.new(root, {
              labelText: "Tinggi Muka Air {provider} {realName}: {valueY} m"
            })
          })
        );

        series.columns.template.setAll({
          fillOpacity: 0.9,
          strokeOpacity: 0
        });
        series.columns.template.adapters.add("fill", (fill, target) => {
          //return chart.get("colors").getIndex(series.columns.indexOf(target));
          console.log(target.uid);
          if((target.uid % 2) == 0){
              return am5.color(0x03a9f4);
          }else{
              return am5.color(0xff9800);
          }
        });

        series.columns.template.adapters.add("stroke", (stroke, target) => {
          return chart.get("colors").getIndex(series.columns.indexOf(target));
        });

        var lineSeries = chart.series.push(
          am5xy.LineSeries.new(root, {
            name: "Series 2",
            xAxis: xAxis,
            yAxis: yAxis,
            valueYField: "realisasi",
            sequencedInterpolation: true,
            fill: am5.color(0x00897b),
            stroke: am5.color(0x00897b),
            categoryXField: "category",
            tooltip: am5.Tooltip.new(root, {
              labelText: "Curah Hujan : {valueY} mm"
            })
          })
        );

        lineSeries.strokes.template.set("strokeWidth", 2);

        lineSeries.bullets.push(function () {
          return am5.Bullet.new(root, {
            locationY: 1,
            locationX: undefined,
            sprite: am5.Circle.new(root, {
              radius: 5,
              fill: lineSeries.get("fill")
            })
          });
        });

        // when data validated, adjust location of data item based on count
        lineSeries.events.on("datavalidated", function () {
          am5.array.each(lineSeries.dataItems, function (dataItem) {
            // if count divides by two, location is 0 (on the grid)
            if (
              dataItem.dataContext.count / 2 ==
              Math.round(dataItem.dataContext.count / 2)
            ) {
              dataItem.set("locationX", 0);
            }
            // otherwise location is 0.5 (middle)
            else {
              dataItem.set("locationX", 0.5);
            }
          });
        });

        var chartData = [];

        // Set data
        var data = {
          "Jan": {
            "22": 34.99,
            "23": 35.14,
            realisasi: 0.42
          },
          "Feb": {
            "22": 73.68,
            "23": 0,
            realisasi: 0
          },
          "Mar": {
            "22": 109.69,
            "23": 0,
            realisasi: 0
          },
          "Apr": {
            "22": 150.16,
            "23": 0,
            realisasi: 0
          },
          "May": {
            "22": 184.70,
            "23": 0,
            realisasi: 0
          },
          "Jun": {
            "22": 220.81,
            "23": 0,
            realisasi: 0
          },
          "Jul": {
            "22": 259.77,
            "23": 0,
            realisasi: 0
          },
          "Aug": {
            "22": 298.29,
            "23": 0,
            realisasi: 0
          },
          "Sep": {
            "22": 338.41,
            "23": 0,
            realisasi: 0
          },
          "Oct": {
            "22": 378.48,
            "23": 0,
            realisasi: 0
          },
          "Nov": {
            "22": 429.34,
            "23": 0,
            realisasi: 0
          },
          "Dec": {
            "22": 488.79,
            "23": 0,
            realisasi: 0
          },
        };

        // process data ant prepare it for the chart
        for (var providerName in data) {
          var providerData = data[providerName];

          // add data of one provider to temp array
          var tempArray = [];
          var count = 0;
          // add items
          for (var itemName in providerData) {
            if (itemName != "realisasi") {
              count++;
              // we generate unique category for each column (providerName + "_" + itemName) and store realName
              tempArray.push({
                category: providerName + "_" + itemName,
                realName: itemName,
                value: providerData[itemName],
                fill: am5.color(0xff9800),
                provider: providerName
              });
            }
          }
          // sort temp array
          tempArray.sort(function (a, b) {
            if (a.value > b.value) {
              return 1;
            } else if (a.value < b.value) {
              return -1;
            } else {
              return 0;
            }
          });

          // add quantity and count to middle data item (line series uses it)
          var lineSeriesDataIndex = Math.floor(count / 2);
          tempArray[lineSeriesDataIndex].realisasi = providerData.realisasi;
          tempArray[lineSeriesDataIndex].count = count;
          // push to the final data
          am5.array.each(tempArray, function (item) {
            chartData.push(item);
          });

          // create range (the additional label at the bottom)

          var range = xAxis.makeDataItem({});
          xAxis.createAxisRange(range);

          range.set("category", tempArray[0].category);
          range.set("endCategory", tempArray[tempArray.length - 1].category);

          var label = range.get("label");

          label.setAll({
            text: tempArray[0].provider,
            dy: 30,
            fontWeight: "bold",
            tooltipText: tempArray[0].provider
          });

          var tick = range.get("tick");
          tick.setAll({ visible: true, strokeOpacity: 1, length: 50, location: 0 });

          var grid = range.get("grid");
          grid.setAll({ strokeOpacity: 1 });
        }

        // add range for the last grid
        var range = xAxis.makeDataItem({});
        xAxis.createAxisRange(range);
        range.set("category", chartData[chartData.length - 1].category);
        var tick = range.get("tick");
        tick.setAll({ visible: true, strokeOpacity: 1, length: 50, location: 1 });

        var grid = range.get("grid");
        grid.setAll({ strokeOpacity: 1, location: 1 });

        xAxis.data.setAll(chartData);
        series.data.setAll(chartData);
        lineSeries.data.setAll(chartData);

        // Make stuff animate on load
        // https://www.amcharts.com/docs/v5/concepts/animations/
        series.appear(1000);
        chart.appear(1000, 100);

        

        <?php 

        }else if($_GET['tpos'] == 'PDA') { 
        //if($_GET['tpos'] == 'PDA') { 

          /* START - PDA CHART */

          $i=0;

          $valChart = '';

          while($rowDetail2 = mysql_fetch_array($queryDetail2)){

            $wLevel2 = floatval($rowDetail2['WLevel_max']/100) + 0;
            $wLevel2a = floatval($rowDetail2['WLevel_max']) + 0;

            $chartPDA[$i]['y'] = intval(date('Y',strtotime($rowDetail2['ReceivedDate'])));

            $chartPDA[$i]['m'] = intval(date('m',strtotime($rowDetail2['ReceivedDate']))) - 1;

            $chartPDA[$i]['d'] = intval(date('d',strtotime($rowDetail2['ReceivedDate'])));

            $chartPDA[$i]['h'] = intval(date('G',strtotime($rowDetail2['ReceivedTime2'])));

            $chartPDA[$i]['i'] = intval(date('i',strtotime($rowDetail2['ReceivedTime2'])));

            $chartPDA[$i]['val'] = number_format($wLevel2,2);

            if($wLevel2a <= $rowInfo['siaga4']){

                $chartPDA[$i]['col'] = '#6abbd4';

            }else if($wLevel2a < $rowInfo['siaga3']){

                $chartPDA[$i]['col'] = '#14b8a6';

            }else if($wLevel2a < $rowInfo['siaga2']){

                $chartPDA[$i]['col'] = '#6366f1';

            }else if($wLevel2a < $rowInfo['siaga1']){

                $chartPDA[$i]['col'] = '#ffc728';

            }else{

                $chartPDA[$i]['col'] = '#ff3c78';

            }



            $valChart .= '{"timestamp": new Date('.$chartPDA[$i]['y'].', '.$chartPDA[$i]['m'].', '.$chartPDA[$i]['d'].', '.$chartPDA[$i]['h'].', '.$chartPDA[$i]['i'].').getTime(),"value": '.$chartPDA[$i]['val'].',"bulletSettings": { fill: am5.color("'.$chartPDA[$i]['col'].'") }}, ';



            $i++;

          }



          $valChart = substr($valChart,0,-2);

        ?>

          var root = am5.Root.new("chart-pos-pda");



          root.setThemes([

            am5themes_Animated.new(root)

          ]);



          var chart = root.container.children.push(am5xy.XYChart.new(root, {

            panX: true,

            panY: true,

            wheelX: "panX",

            wheelY: "zoomX",

            pinchZoomX:true

          }));



          var xRenderer = am5xy.AxisRendererX.new(root, {});

          xRenderer.grid.template.set("forceHidden", true);

          xRenderer.labels.template.setAll({multiLocation: 0, location:0});



          var xAxis = chart.xAxes.push(am5xy.DateAxis.new(root, {

            baseInterval: { timeUnit: "minute", count: 30 },

            renderer: xRenderer,

            tooltip: am5.Tooltip.new(root, {}),

            extraMin: 0.01,

            extraMax: 0.01,

            tooltipLocation: 0

          }));



          var yRenderer = am5xy.AxisRendererY.new(root, {});

          yRenderer.grid.template.set("forceHidden", true);



          var yAxis = chart.yAxes.push(am5xy.ValueAxis.new(root, {

            renderer: yRenderer

          }));



          var cursor = chart.set("cursor", am5xy.XYCursor.new(root, {

            behavior: "none",

            xAxis: xAxis

          }));

          cursor.lineY.set("visible", false);



          var series = chart.series.push(am5xy.LineSeries.new(root, {

            name: "Series",

            xAxis: xAxis,

            yAxis: yAxis,

            valueYField: "value",

            valueXField: "timestamp",

            locationX: 0,

            seriesTooltipTarget: "bullet",

            tooltip: am5.Tooltip.new(root, {

              labelText: "Water Level at {valueY} m"

            })

          }));



          series.bullets.push(function() {

            var circleTemplate = am5.Template.new({

              radius: 6,

              templateField: "bulletSettings",

              fill: series.get("fill"),

              strokeWidth: 2,

              stroke: root.interfaceColors.get("background")

            })



            var circle = am5.Circle.new(root, {}, circleTemplate);



            return am5.Bullet.new(root, {

              sprite: circle,

              locationX: 0

            });

          });



          chart.set("scrollbarX", am5.Scrollbar.new(root, {

            orientation: "horizontal"

          }));



          function createGuide(value, text, dashArray) {

            var guideDataItem = yAxis.makeDataItem({ value: value });

            yAxis.createAxisRange(guideDataItem);

            guideDataItem.get("grid").setAll({

              forceHidden: false,

              strokeOpacity: 0.2,

              strokeDasharray: dashArray

            });



            var label = guideDataItem.get("label");

            label.setAll({

              text: text,

              isMeasured: false,

              centerY: am5.p100

            });



            label.adapters.add("x", function(x) {

              return chart.plotContainer.width();

            })

            

            chart.events.on("boundschanged", function(){

              label.set("x", label.get("x"))

            })  

          }



          createGuide(<? echo intval($rowInfo['siaga4']); ?>, "Siaga 4", [2, 2]);

          createGuide(<? echo intval($rowInfo['siaga3']); ?>, "Siaga 3", [2, 2]);

          createGuide(<? echo intval($rowInfo['siaga2']); ?>, "Siaga 2", [2, 2]);

          createGuide(<? echo intval($rowInfo['siaga1']); ?>, "Siaga 1", [2, 2]);



          var data = [<?php echo $valChart; ?>];



          series.data.setAll(data);



          series.appear(1000);

          chart.appear(1000, 100);

        <?php 

          /* END - PDA CHART */

        }else if($_GET['tpos'] == 'PCH') { 

          /* START - PCH CHART */

          $i=0;

          $valChart = ''; // var_dump(mysql_num_rows($queryDetail3));

          while($rowDetail2 = mysql_fetch_array($queryDetail3)){ //var_dump($rowDetail2);

            $rain = floatval($rowDetail2['Rain_sum']) + 0;

            $chartPCH[$i]['y'] = intval(date('Y',strtotime($rowDetail2['ReceivedDate'])));

            $chartPCH[$i]['m'] = intval(date('m',strtotime($rowDetail2['ReceivedDate']))) - 1;

            $chartPCH[$i]['d'] = intval(date('d',strtotime($rowDetail2['ReceivedDate'])));

            $chartPCH[$i]['h'] = intval(date('G',strtotime($rowDetail2['ReceivedTime2'])));

            $chartPCH[$i]['i'] = intval(date('i',strtotime($rowDetail2['ReceivedTime2'])));

            $chartPCH[$i]['val'] = number_format($rain,2);

            if($rain <= $rowInfo['siaga4']){

                $chartPCH[$i]['col'] = '#6abbd4';

            }else if($rain < $rowInfo['siaga3']){

                $chartPCH[$i]['col'] = '#14b8a6';

            }else if($rain < $rowInfo['siaga2']){

                $chartPCH[$i]['col'] = '#6366f1';

            }else if($rain < $rowInfo['siaga1']){

                $chartPCH[$i]['col'] = '#ffc728';

            }else{

                $chartPCH[$i]['col'] = '#ff3c78';

            }



            $valChart .= '{"date": new Date('.$chartPCH[$i]['y'].', '.$chartPCH[$i]['m'].', '.$chartPCH[$i]['d'].', '.$chartPCH[$i]['h'].', '.$chartPCH[$i]['i'].').getTime(),"value": '.$chartPCH[$i]['val'].',"fill": am5.color("'.$chartPCH[$i]['col'].'")}, ';



            $i++;

          }



          $valChart = substr($valChart,0,-2);

        ?>

          var root = am5.Root.new("chart-pos-pch");



          root.setThemes([

            am5themes_Animated.new(root)

          ]);



          var chart = root.container.children.push(am5xy.XYChart.new(root, {

            panX: false,

            panY: false,

            wheelX: "panX",

            wheelY: "zoomX"

          }));



          var cursor = chart.set("cursor", am5xy.XYCursor.new(root, {

            behavior: "zoomX"

          }));

          cursor.lineY.set("visible", false);



          var date = new Date();

          date.setHours(0, 0, 0, 0);

          var value = 100;



          function generateData() {

            value = Math.round((Math.random() * 10 - 5) + value);

            am5.time.add(date, "hour", 1);

            return {

              date: date.getTime(),

              value: value

            };

          }



          function generateDatas(count) {

            var data = [];

            for (var i = 0; i < count; ++i) {

              data.push(generateData());

            }

            return data;

          }



          var xAxis = chart.xAxes.push(am5xy.DateAxis.new(root, {

            maxDeviation: 0,

            baseInterval: {

              timeUnit: "hour",

              count: 1

            },

            renderer: am5xy.AxisRendererX.new(root, {}),

            tooltip: am5.Tooltip.new(root, {})

          }));



          var yAxis = chart.yAxes.push(am5xy.ValueAxis.new(root, {

            //forceHidden: true,

            min: 0,

            renderer: am5xy.AxisRendererY.new(root, {})

          }));



          var series = chart.series.push(am5xy.ColumnSeries.new(root, {

            name: "Series",

            xAxis: xAxis,

            yAxis: yAxis,

            sequencedInterpolation: true,

            valueYField: "value",

            valueXField: "date",

            tooltip: am5.Tooltip.new(root, {

              labelText: "Curah Hujan {valueY}.0 mm"

            })

          }));

          /*

          series.columns.template.adapter.add('fill', function(fill, target) {  

            if (target.dataItem && target.dataItem.categoryY > 5) {

              return "#ff0000";

            }

            return fill;

          }); */



          chart.set("scrollbarX", am5.Scrollbar.new(root, {

            orientation: "horizontal"

          }));



          function createGuide(value, text, dashArray) {

            var guideDataItem = yAxis.makeDataItem({ value: value });

            yAxis.createAxisRange(guideDataItem);

            guideDataItem.get("grid").setAll({

              forceHidden: false,

              strokeOpacity: 0.2,

              strokeDasharray: dashArray

            });



            var label = guideDataItem.get("label");

            label.setAll({

              text: text,

              isMeasured: false,

              centerY: am5.p100

            });



            label.adapters.add("x", function(x) {

              return chart.plotContainer.width();

            })

            

            chart.events.on("boundschanged", function(){

              label.set("x", label.get("x"))

            })  

          }



          createGuide(<? echo intval($rowInfo['siaga4']); ?>, "Siaga 4", [2, 2]);

          createGuide(<? echo intval($rowInfo['siaga3']); ?>, "Siaga 3", [2, 2]);

          createGuide(<? echo intval($rowInfo['siaga2']); ?>, "Siaga 2", [2, 2]);

          createGuide(<? echo intval($rowInfo['siaga1']); ?>, "Siaga 1", [2, 2]);





          var data = generateDatas(50);

          //series.data.setAll([{ date: 1670868000000, value: 96 }, { date: 1670871600000, value: 94 }]); console.log(data);

          

          series.data.setAll([<?php echo $valChart; ?>]);



          series.appear(1000);

          chart.appear(1000, 100);

        <?php }else { ?>

        <?php } ?>



        });



    </script>