Conversation
- so that we handle cross-trace sorting correctly
|
|
||
| // clear stuff that should recomputed in 'regular' loop | ||
| if(hasCalcTransform) clearAxesCalc(axList); | ||
| if(hasCalcTransform) setupAxisCategories(axList); |
There was a problem hiding this comment.
maybe a can of worms, but is there a test for multicat + calctransforms (or non-calc-transforms for that matter)?
There was a problem hiding this comment.
Multicategory axes don't support transforms. I'm not sure how gracefully things fail though.
There was a problem hiding this comment.
OK, that's fine. Nothing more from me - I'll let one of the other folks give this a once-over and the 💃
There was a problem hiding this comment.
Transforms + multicategory tracked in -> #3363
| ax.clearCalc(); | ||
| if(ax.type === 'multicategory') { | ||
| ax.setupMultiCategory(fullData); | ||
| } |
There was a problem hiding this comment.
clearCalc is also used in rangeslider.draw and gl2d/scene2d - do these need setupMultiCategory? Should that just be part of clearCalc for multicategory axes?
There was a problem hiding this comment.
clearCalcis also used inrangeslider.drawandgl2d/scene2d- do these needsetupMultiCategory?
setupMultiCategory only needs to be called once (here in doCalcdata, to fill in ax._muticatList), so rangeslider don't need it, that's why I didn't put the setupMultiCategory logic in clearCalc. As for gl2d/scene2d, gl2d subplots don't support multicategory axes, so I think we're 👌
|
💃 |
fixes #3356 - and made me realised that
multicategoryare slightly more complicated than first expected.In brief, we need to (1) scan the data array (2) sort the resulting multi-category list (3) loop over the data arrays again to retrieve their
calcdatavalues.cc @plotly/plotly_js