c3步骤图与事件对齐 [英] c3 step chart align on event

查看:86
本文介绍了c3步骤图与事件对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些布尔值的c3 / d3步骤图。现在,我需要在实际事件的时间戳上而不是在事件的中间对齐步骤更改。

I have a c3/d3 step chart with some boolean values. Now I need to align the step change on the actual event timestamp and not in the middle of that event.

是否有任何配置选项,因此c3步骤图更改了从究竟何时才是事件0到1?

Is there any config option so c3 step chart changes the line from 0 to 1 exactly when the event occurs?

推荐答案

似乎您是在谈论 line.step.type 选项:

It seems that you're talking about line.step.type option:

var chart = c3.generate({
    data: {
        columns: [
            ['data1', 300, 350, 300, 0, 0, 100]
        ],
        types: {
            data1: 'step'
        }
    },

    // that's it:
    line: {
      step: {
        type: 'step-after'
      }
    }
});

这篇关于c3步骤图与事件对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆