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(explore): Time column label not formatted when GENERIC_X_AXES enabled #21294

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Sep 1, 2022

SUMMARY

When user has GENERIC_CHART_AXES enabled and adds a custom label to a time column, the timestamps on the chart's x axis are not formatted.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

image

After:

image

TESTING INSTRUCTIONS

  1. Enable GENERIC_CHART_AXES
  2. Create a Mixed Chart
  3. Set a custom label for a time column and use it as x axis
  4. Verify that timestamps on x axis are formatted

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

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM! I believe I've fixed a few of these, so there may be more lurking in the shadows. If we bump into more of these we should perhaps consider refactoring this so we don't have to do these checks all over the place.

@kgabryje kgabryje changed the title fix(explore): Time column label not formatted hen GENERIC_X_AXES enabled fix(explore): Time column label not formatted when GENERIC_X_AXES enabled Sep 1, 2022
@kgabryje
Copy link
Member Author

kgabryje commented Sep 1, 2022

If we bump into more of these we should perhaps consider refactoring this so we don't have to do these checks all over the place.

Yeah those just keep popping up. I know that recently @diegomedina248 fixed the same issue in other echarts

@codecov
Copy link

codecov bot commented Sep 1, 2022

Codecov Report

Merging #21294 (c05297c) into master (9fd7520) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

❗ Current head c05297c differs from pull request most recent head f67d32d. Consider uploading reports for the commit f67d32d to get more accurate results

@@            Coverage Diff             @@
##           master   #21294      +/-   ##
==========================================
- Coverage   66.42%   66.40%   -0.03%     
==========================================
  Files        1784     1784              
  Lines       68237    68237              
  Branches     7263     7264       +1     
==========================================
- Hits        45328    45310      -18     
- Misses      21040    21058      +18     
  Partials     1869     1869              
Flag Coverage Δ
javascript 52.48% <0.00%> (ø)
sqlite ?

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

Impacted Files Coverage Δ
...hart-echarts/src/MixedTimeseries/transformProps.ts 0.00% <0.00%> (ø)
superset/db_engine_specs/sqlite.py 91.89% <0.00%> (-5.41%) ⬇️
superset/utils/celery.py 86.20% <0.00%> (-3.45%) ⬇️
superset/connectors/sqla/utils.py 86.36% <0.00%> (-2.28%) ⬇️
superset/result_set.py 96.29% <0.00%> (-1.49%) ⬇️
superset/views/core.py 74.54% <0.00%> (-0.61%) ⬇️
superset/db_engine_specs/base.py 87.73% <0.00%> (-0.48%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@diegomedina248
Copy link
Contributor

If we bump into more of these we should perhaps consider refactoring this so we don't have to do these checks all over the place.

Yeah those just keep popping up. I know that recently @diegomedina248 fixed the same issue in other echarts

Yeah, that's right.
It would be good to refactor and remove some duplications there

@kgabryje kgabryje merged commit c3a00d4 into apache:master Sep 1, 2022
eschutho pushed a commit that referenced this pull request Sep 20, 2022
AAfghahi pushed a commit that referenced this pull request Oct 6, 2022
Fahrenheit35 pushed a commit to Fahrenheit35/superset that referenced this pull request Nov 11, 2022
@mistercrunch mistercrunch added 🍒 2.0.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 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/XS v2.0 v2.0.1 🍒 2.0.1 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants