Showing Realtime Data using C3 JS: Gaphs

浪尽此生 提交于 2019-12-24 22:53:02

问题


what I am trying to do is that I have a graph which loads completely at the moment I enter the button to show the data. The graph looks fine as Shown below :

But I dont want to make the data looks static , what i want is to show the data as a realtime , as like an example I am showing Below.

Just an Example

I just want to make the data look like moving or live.

Here id my code I am using to create the Chart :

function createGraph(data) {

    var plots = ["plots Data"];

    for (var i = 0; i < data.length; i++) {
        plots.push(data[i][0]);
}
var chart = c3.generate({
        bindto: '#chart',
        data: {
            columns: [
                plots
            ],

        },
         point: {
        show: false
    },
      m: {
            enabled: false
        },
        legend: {
            position: 'right'
        }
    });
}

If Anyone can tell me how Can I make my data look more eraltime and live. that would be a great Help.

Hope my question is clear, Thanks in Advance.

来源:https://stackoverflow.com/questions/57534972/showing-realtime-data-using-c3-js-gaphs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!