Skip to content
Snippets Groups Projects
Unverified Commit 3133edce authored by adam-james's avatar adam-james Committed by GitHub
Browse files

Funnel Chart Static-Viz should handle row data more robustly (#40114)


* 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>
parent ea498e80
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment