Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Mar 14, 2023
  2. Mar 13, 2023
  3. Mar 12, 2023
    • metabase-bot[bot]'s avatar
      Improving axes grouping/splitting in static viz. (#28295) (#29148) · f21c7c21
      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: default avataradam-james <21064735+adam-james-v@users.noreply.github.com>
      Unverified
      f21c7c21
  4. Mar 10, 2023
  5. Mar 09, 2023
Loading