Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: X Axis should be called Y Axis when using the Bar Chart V2 on Horizontal mode #20659

Merged

Conversation

diegomedina248
Copy link
Contributor

SUMMARY

If the feature flag GENERIC_CHART_AXES is enabled, the Time-Series Bar Char v2 becomes Bar Chart v2 and has a field named X-Axis. However, if the Bar Chart is configured on horizontal mode, the X-Axis should be re-named to Y-Axis.

This PR expands the type for the control label & description to be computed, and then does so for the above scenario.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screen.Recording.2022-07-08.at.18.23.41.mov

After:

new.mov

TESTING INSTRUCTIONS

  1. Enable the GENERIC_CHART_AXES feature
  2. Hover the **+ **icon > Chart.
  3. Use the Vehicle Sales Dataset, and the Bar Chart v2.
  4. Set count(*) on the Metrics, and product_line on the X-Axis field.
  5. Navigate to the CUSTOMIZE tab.
  6. Switch to the HORIZONTAL orientation.
  7. Navigate back to the DATA tab.

Ensure the label changes accordingly.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Jul 8, 2022

Codecov Report

Merging #20659 (49efecf) into master (0ce0c6e) will decrease coverage by 0.03%.
The diff coverage is 9.09%.

@@            Coverage Diff             @@
##           master   #20659      +/-   ##
==========================================
- Coverage   66.83%   66.80%   -0.04%     
==========================================
  Files        1753     1753              
  Lines       65808    65816       +8     
  Branches     7001     7007       +6     
==========================================
- Hits        43984    43966      -18     
- Misses      20035    20064      +29     
+ Partials     1789     1786       -3     
Flag Coverage Δ
hive 53.88% <ø> (ø)
javascript 51.93% <9.09%> (-0.07%) ⬇️
mysql 82.38% <ø> (ø)
postgres 82.45% <ø> (ø)
presto 53.74% <ø> (ø)
python 82.89% <ø> (ø)
sqlite 82.24% <ø> (ø)
unit 50.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...i-chart-controls/src/shared-controls/constants.tsx 18.75% <0.00%> (-18.75%) ⬇️
...d/packages/superset-ui-chart-controls/src/types.ts 100.00% <ø> (ø)
.../src/explore/components/ControlPanelsContainer.tsx 78.50% <33.33%> (-1.50%) ⬇️
...rd/components/nativeFilters/FilterBar/keyValue.tsx 18.51% <0.00%> (-22.23%) ⬇️
...board/components/nativeFilters/FilterBar/index.tsx 60.58% <0.00%> (-7.30%) ⬇️
...re/components/controls/DatasourceControl/index.jsx 74.19% <0.00%> (-0.55%) ⬇️

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 0ce0c6e...49efecf. Read the comment docs.

@zhaoyongjie zhaoyongjie self-requested a review July 9, 2022 04:35
Copy link
Member

@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.

good job! thanks for bring this.

@zhaoyongjie zhaoyongjie merged commit c29261b into apache:master Jul 9, 2022
akshatsri pushed a commit to charan1314/superset that referenced this pull request Jul 19, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants