-
- Downloads
Correct Data Shape for Multi-Series Static Viz (#42730)
* Correct Data Shape for Multi-Series Static Viz Fixes: #41787 During the echarts migration, some backend tests needed fixing. In this process, the shape of data (eg. list of cards and their data results from execution) were altered. This was done to fix failing tests and renders for single series cards (all Questions and many dashcards), but didn't correctly handle a multi-series card. This conditionally adds back the expected shape. Perhaps in a follow on PR it's worth inspecting the implementation of the :javascript_visualization render method to clean it up. Probably worth putting some Malli schemas around it too to make it clearer what shape we need. * Make sure card/data maps going into static-viz are distinct * Add a test util to render dashcards, add multiseries card test We haven't made a 'unit' (perhaps more like a small integration test at this point) test for multi series dashcards yet. In most other cases, making sure a card (Question) renders properly is sufficient, but the multi series dashcards are a special case. It's probably useufl to have a test or two, and the dashcards test util should hopefully help future test writing a bit now too.
Showing
- src/metabase/pulse/render/body.clj 11 additions, 7 deletionssrc/metabase/pulse/render/body.clj
- test/metabase/pulse/render/body_test.clj 32 additions, 0 deletionstest/metabase/pulse/render/body_test.clj
- test/metabase/pulse/render/test_util.clj 23 additions, 0 deletionstest/metabase/pulse/render/test_util.clj
Please register or sign in to comment