Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Mar 26, 2024
  2. Mar 25, 2024
  3. Mar 22, 2024
    • adam-james's avatar
      Funnel Chart Static-Viz should handle row data more robustly (#40114) · 3133edce
      adam-james authored
      
      * Funnel Chart Static-Viz should handle row data more robustly
      
      The row data coming into the funnel chart render method can evidently have a few slightly different shapes, and may
      need to be 'coordinated' with the :funnel.rows key from viz-settings (names and order are specified there).
      
      This is a WIP to make the method more robust to different row data shapes. For example:
      
      [[1 100] [2 200]] should work as well as [["A" 100] ["B" 200]] and correctly handle the viz-settings
      
      WIP because I need to add a test or two, try to get a handle on the exact schema that is allowed for 'row shape' and
      the funnel.row viz key, and see if there are failing cases that I haven't considered yet.
      
      * Funnel rows should now work more effectively with possible raw-rows
      
      * Add a test that checks the success of the render and correct order
      
      * Update src/metabase/pulse/render/body.clj
      
      Co-authored-by: default avatarChris Truter <crisptrutski@users.noreply.github.com>
      
      * Update src/metabase/pulse/render/body.clj
      
      Co-authored-by: default avatarChris Truter <crisptrutski@users.noreply.github.com>
      
      * Addressing feedback from the review
      
       - renamed build-funnel-rows to funnel-rows
       - used 'funnel-viz' as the binding for the {:key "asdf" :name "asdf" :enabled true} maps from the viz settings
       - added docstring to the function to try clarify its 2 branches (keys vs indices on the rows)
      
      ---------
      
      Co-authored-by: default avatarChris Truter <crisptrutski@users.noreply.github.com>
      Unverified
      3133edce
Loading