有没有一种方法可以使用类似于Plottable.js的解决方案的Plotly.js创建时间轴?
示例here。
我计划迁移到Plotly.js,但我真的很喜欢这种时间轴的演示,因为我必须绘制大量的时间序列,如果能用plotly实现类似的效果就太好了。
发布于 2019-11-05 11:58:31
我找不到如何在plotly.js中绘制多层时间轴。但这里有一个变通方法。
将你的布局设置如下。
xaxis: {
showline: true,
showgrid: true,
showticklabels: true,
type : 'category', //this will allow set 'tickson '
tickson : 'boundaries', //this will show lable in middle.
ticklen : 22, //this will show line as grid
linecolor: 'rgb(204,204,204)',
linewidth: 2,
autotick: false,
ticks: 'outside',
tickcolor: 'rgb(204,204,204)',
tickwidth: 1,
tickfont: {
family: 'Arial',
size: 12,
color: 'rgb(82, 82, 82)'
}
},这是给你的演示。Code pen

https://stackoverflow.com/questions/54529717
复制相似问题