问题
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