-
- Downloads
Funnel Chart Static-Viz should handle row data more robustly (#40114) (#40537)
* 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 * Update src/metabase/pulse/render/body.clj * 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:adam-james <21064735+adam-james-v@users.noreply.github.com> Co-authored-by:
Chris Truter <crisptrutski@users.noreply.github.com>
Please register or sign in to comment