metabase-bot[bot]
authored
* WIP for better axes grouping in static viz.
Double x-axis and single x-axis are different, but both can have situations where grouping might occur, so the
implementation is a tad confusing. I'm trying to build test cases that represent both scenarios reasonably, and build
an implementation that's not too confusing.
* Fix reflection warnings in render test utils
* Overlap calcs don't fail with BigDecimal inputs now.
* Continuing to clean up overlaps calcs and impl for single/double in progress
* WIP version that works for single-x multi-series and double-x multi
There's a lot to think about here...
But basically, handle rows of shape:
double-x:
[[x1 x2] [y]]
and single-x:
[[x] [y1 y2 y3]]
* Single and Multi X axis now use same axes grouping strategy
* Cover some overlap scoring cases.
This may need improving in future still, but the overlap calculation is at least used for both single-x and multi-x
axis scenarios now, which is a definitie improvement.
* Missed these unused bindings in test let body
* overlap calc won't fail if we pass in `[nil nil]`
* Clean up grouping axes implementation addressing review feedback.
- overlap and nearness split into two functions
- add the fn 'axis-group-score' to call overlap/nearness appropriately, and handle condition checks (eg. nil vals)
- removed old group-axes and now unnecessasry default-y-axis-pos fn -> handled by group-axes-at-once fn
- axis group threshold not passed as arg anymore
* Fixed some alignment mistakes
Co-authored-by:
adam-james <21064735+adam-james-v@users.noreply.github.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.