添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

When streaming data, I can select the “Select Box” or “Lasso select” option and use it. However, it disappears after a while, and I don’t know how to get it back. It stays in the selection mode, but if I switch to “Zoom” or “Pan”, I’m unable to go back into a selection mode. Does it have something to do with extendTraces? Here is a codepen example.

Ah, that’s because we don’t support lasso and box selection for scatter traces with mode: 'lines' .

At the beginning of the stream, your traces have mode: 'lines+markers' which supports selections, but once they have enough points the default mode becomes 'lines' which no longer support selections

github.com

plotly/plotly.js/blob/968054c2ec3dd86148d92b567f6dcb86f112d476/src/traces/scatter/defaults.js#L37-L38

  • var defaultMode = !stackGroupOpts && (len < constants.PTS_LINESONLY) ?
  • 'lines+markers' : 'lines';
  •