score:1

Accepted answer

please remove refresh attribute in your code.

<column-chart :min="0" height="400px" xtitle="city" 
 :data="series" label="value"></column-chart>

console error will not show. if you remove the refresh option. refresh should be from your url. not from chart.

score:0

<line-chart :data="charturl" :refresh="30"></line-chart>  

<script type="text/javascript">
   var app = new vue({
            el: '#app',
            data: {
                charturl: 'your_url.php'
            }
   });
</script>

in your_url.php

    $arr  =  array(
        '1' => '13',
        '2' => '15',
        '3' => '4',
        '4' => '4',
        '5' => '40',
        '6' => '6',
        '7' => '4',
        '8' => '10',
    );

    return json_encode($arr);

and every 30 seconds a request will be sent. if $arr change, then chart line changed.


Related Query

More Query from same tag