Plotly.js:初始缩放 [英] Plotly.js: Initial Zoom

查看:306
本文介绍了Plotly.js:初始缩放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有256个数据点.当该图第一次出现时,我希望x轴沿X轴自动缩放到特定范围.有办法吗我是否必须以某种方式深入到D3?

解决方案

类似的东西

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

plotly.js中的更多信息图表属性参考.

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?

解决方案

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.

这篇关于Plotly.js:初始缩放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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