Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

fix(plugin-chart-echarts): boxplot groupby incorrect #1448

Merged
merged 4 commits into from
Nov 1, 2021

Conversation

villebro
Copy link
Contributor

@villebro villebro commented Nov 1, 2021

🐛 Bug Fix
The post processing operation didn't include the groupby columns, resulting in NULL values on the x-axis. This PR fixes the bug, adds tests and adds type guards for all post processing rules.

Closes apache/superset#16951 , closes apache/superset#16985

AFTER

image

BEFORE

image

@villebro villebro requested a review from a team as a code owner November 1, 2021 13:26
@vercel
Copy link

vercel bot commented Nov 1, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/superset/superset-ui/J7AzB1dKjJA4e1zenzM8pkkgPoKu
✅ Preview: https://superset-ui-git-fork-preset-io-villebro-boxplot-ff3443-superset.vercel.app

Comment on lines -57 to +52
groupby: ensureIsArray(queryObject.groupby as QueryFormColumn[]),
groupby: ensureIsArray(groupby),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

groupby is deprecated on QueryObject and is ambigous with columns, hence we should use groupby from formData here, as it carries a specific meaning for the Boxplot chart.

Copy link
Contributor

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov
Copy link

codecov bot commented Nov 1, 2021

Codecov Report

Merging #1448 (f3927cb) into master (6b8cda4) will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1448      +/-   ##
==========================================
+ Coverage   30.43%   30.50%   +0.07%     
==========================================
  Files         497      498       +1     
  Lines       10012    10024      +12     
  Branches     1691     1692       +1     
==========================================
+ Hits         3047     3058      +11     
- Misses       6719     6720       +1     
  Partials      246      246              
Impacted Files Coverage Δ
...ui-chart-controls/src/operators/boxplotOperator.ts 100.00% <100.00%> (ø)
...superset-ui-core/src/query/types/PostProcessing.ts 100.00% <100.00%> (ø)
...lugin-chart-echarts/src/Timeseries/transformers.ts 43.36% <0.00%> (-0.39%) ⬇️
...ugins/plugin-chart-echarts/src/Timeseries/types.ts 100.00% <0.00%> (ø)
...s/legacy-plugin-chart-country-map/src/countries.ts 0.00% <0.00%> (ø)
.../plugin-chart-echarts/src/MixedTimeseries/types.ts 100.00% <0.00%> (ø)
...hart-echarts/src/MixedTimeseries/transformProps.ts 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6b8cda4...f3927cb. Read the comment docs.

@villebro villebro merged commit 74e1782 into apache-superset:master Nov 1, 2021
@villebro villebro deleted the villebro/boxplot-groupby branch November 1, 2021 15:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

box plots displaying <NULL> as series/category on x-axis Boxplot only shows a <NULL> in x-axis
2 participants