首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Plotly.js -多层时间轴

Plotly.js -多层时间轴
EN

Stack Overflow用户
提问于 2019-02-05 15:43:04
回答 1查看 87关注 0票数 1

有没有一种方法可以使用类似于Plottable.js的解决方案的Plotly.js创建时间轴?

示例here

我计划迁移到Plotly.js,但我真的很喜欢这种时间轴的演示,因为我必须绘制大量的时间序列,如果能用plotly实现类似的效果就太好了。

EN

回答 1

Stack Overflow用户

发布于 2019-11-05 11:58:31

我找不到如何在plotly.js中绘制多层时间轴。但这里有一个变通方法。

将你的布局设置如下。

代码语言:javascript
复制
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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54529717

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档