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(viz): apply uniform sorting to all nvd3 timeseries charts #14539

Merged
merged 1 commit into from
May 10, 2021

Conversation

villebro
Copy link
Member

@villebro villebro commented May 10, 2021

SUMMARY

Many NVD3 timeseries viz' were featured duplicated sorting logic that was missing from others. This introduces sorting logic to the base NVD3TimeSeriesViz class removes the same from the following viz':

  • NVD3TimeSeriesStackedViz (=area chart)
  • HorizonViz
  • RoseViz
  • PartitionViz

By moving the sorting logic to the base class, this logic is now added to the following chart types that were previously missing it:

  • NVD3TimeSeriesViz (=line chart)
  • NVD3TimeSeriesBarViz
  • NVD3CompareTimeSeriesViz

The following charts that extend the NVD3TimeSeriesViz class are unaffected, since they don't feature the sorting control:

  • NVD3TimePivotViz

TEST PLAN

All eight charts that this PR affects were manually tested to ensure that they work as expected.

ADDITIONAL INFORMATION

@codecov
Copy link

codecov bot commented May 10, 2021

Codecov Report

Merging #14539 (a4cfc55) into master (cee22e2) will increase coverage by 0.18%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14539      +/-   ##
==========================================
+ Coverage   77.21%   77.40%   +0.18%     
==========================================
  Files         958      958              
  Lines       48351    48324      -27     
  Branches     5677     5677              
==========================================
+ Hits        37335    37403      +68     
+ Misses      10816    10721      -95     
  Partials      200      200              
Flag Coverage Δ
hive 80.89% <50.00%> (?)
mysql 81.15% <50.00%> (+0.08%) ⬆️
postgres 81.18% <50.00%> (+0.08%) ⬆️
presto 80.88% <50.00%> (+0.08%) ⬆️
python 81.71% <50.00%> (+0.34%) ⬆️
sqlite 80.79% <50.00%> (+0.08%) ⬆️

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

Impacted Files Coverage Δ
superset/viz.py 56.35% <50.00%> (+0.85%) ⬆️
superset/utils/core.py 89.00% <0.00%> (+0.12%) ⬆️
superset/connectors/sqla/models.py 90.07% <0.00%> (+0.24%) ⬆️
superset/db_engine_specs/hive.py 87.39% <0.00%> (+17.07%) ⬆️
superset/db_engines/hive.py 82.14% <0.00%> (+82.14%) ⬆️

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 cee22e2...a4cfc55. Read the comment docs.

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.

LGTM! Thanks ville.

@villebro villebro merged commit 37276e1 into apache:master May 10, 2021
@villebro villebro deleted the villebro/nvd3-sort branch May 10, 2021 12:43
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 12, 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 preset-io size/M 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Explore][Line Viz] "Sort by" not applied when series limit is not set
3 participants