Plotly.js: Bar / histogram traces break on single-ended (zoom) axis drag

Created on 14 Dec 2016  路  2Comments  路  Source: plotly/plotly.js

  • Make a bar or histogram plot. To see it even more clearly, use a plot with bars and something else like scatter - for example http://localhost:3000/devtools/test_dashboard/#bar_line
  • Position your mouse over an axis end or corner dragger - anywhere the mouse cursor becomes a single-ended arrow
  • Drag. The scatter or other traces stay scaled correctly as the axis/axes zoom. The bar trace(s) don't, they just pan.
bug

All 2 comments

The issue seems to be slightly more subtle (or has changed since originally reported)

  • If you are dragging from the low end of the X axis or the high end of the Y axis, then the bars appear to pan, but moving far further than they aught to, but
  • If you are dragging from the high end of the X axis, or the low end of the Y axis, then the bars do not move until a click-up event, at which point they redraw.

Fairly easy to see on these mocks as well, with the rendering being corrected once the users stopps the drag.
http://localhost:3000/devtools/test_dashboard/#basic_bar
http://localhost:3000/devtools/test_dashboard/#stacked_bar
http://localhost:3000/devtools/test_dashboard/#grouped_bar

This is a side effect of @rreusser https://github.com/plotly/plotly.js/pull/762 where

subplot.plot
  .selectAll('.points').selectAll('.point')

(unfortunately) also selects <g points> nodes in bar traces. Easy fix coming up.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deecay picture deecay  路  3Comments

WG- picture WG-  路  3Comments

maxwell8888 picture maxwell8888  路  3Comments

HunterMcGushion picture HunterMcGushion  路  3Comments

nicolaskruchten picture nicolaskruchten  路  3Comments