【问题标题】:c3js slow data load speedc3js 数据加载速度慢
【发布时间】:2016-03-11 03:37:16
【问题描述】:

我正在使用 c3js 制作交互式动画。我通过使用chart.load 函数向我的读者展示柱的值是如何变化的。

var chart = c3.generate({ 
    data: {
        x:'Candidate',
        columns:[
            ['candidate','Liberal','Labor','Greens','Independent','Nationals','Independent'],
            ['first', 12000, 11000, 6500, 3000, 3000, 1000] //36500
        ],
        type: 'bar',
        order: null,
        groups: [['first','second']]
    }
})

setTimeout(function () {
    chart.load({
        columns:[
            ['candidate','Liberal','Labor','Greens','Independent','Nationals','Independent'],
            ['first', 12000, 11000, 6500, 3000, 3000, 1000],
            ['second', 0, 1000, 0, 0, 0, 0]
        ],
        type: 'bar'
    });
}, 400)

这个问题是我想立即减慢数据加载功能,以便人们有时间处理他们看到的内容。

加载功能可以减慢吗?

【问题讨论】:

    标签: javascript d3.js c3.js


    【解决方案1】:

    回答的here

    您可以在主图表对象中设置过渡持续时间。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多