Plotly.js: Initial Zoom

Deadly 提交于 2020-01-03 13:32:10

问题


I have 256 data points. When the plot first appears I'd like the x axis to be automatically zoomed to a specific range along the X axis. Is there way? Must I punch down to D3 somehow?


回答1:


Something like:

Plotly.plot('graph', [{
  /* some data trace */
}], {
  xaxis: {
    range: [0, 1]  // to set the xaxis range to 0 to 1
  }
});

More info in the plotly.js chart attributes reference.



来源:https://stackoverflow.com/questions/36706791/plotly-js-initial-zoom

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