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

feat(viz): add ECharts Timeseries chart #10752

Merged
merged 25 commits into from
Sep 2, 2020
Merged

Conversation

villebro
Copy link
Member

@villebro villebro commented Sep 1, 2020

SUMMARY

This introduces the first officially supported ECharts-based viz plugin. The timeseries plugin supports the following features:

  • Line Chart
  • Bar Chart
  • Area Chart
  • Scatterplot Chart
    echarts-types

In addition, the ECharts 4.x and 5.x version color schemes are added to the predefined palettes:
echarts-colors

Last but not least, if Superset is installed alongside the fbprophet package, it's possible to add forecasts to the plotted timeseries. In the example below, we're sporting the recently added ECharts color scheme with weekly avocado prices in three US regions with 52 weeks of forecasts with a 80 % confidence interval:
image
A short recording of how changing confidence interval and stacking affects the chart (please note, these results are pre-cached; calculating the forecasts can take some time, especially if there are multiple series):
echarts-prophet

Related PRs:

ADDITIONAL INFORMATION

FYI: @Ovilia

@codecov-commenter
Copy link

Codecov Report

Merging #10752 into master will decrease coverage by 5.56%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10752      +/-   ##
==========================================
- Coverage   64.98%   59.42%   -5.57%     
==========================================
  Files         789      360     -429     
  Lines       37179    23212   -13967     
  Branches     3555        0    -3555     
==========================================
- Hits        24161    13793   -10368     
+ Misses      12911     9419    -3492     
+ Partials      107        0     -107     
Flag Coverage Δ
#cypress ?
#javascript ?
#python 59.42% <ø> (-0.87%) ⬇️

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

Impacted Files Coverage Δ
superset/db_engines/hive.py 0.00% <0.00%> (-85.72%) ⬇️
superset/db_engine_specs/hive.py 53.90% <0.00%> (-30.08%) ⬇️
superset/views/database/mixins.py 59.64% <0.00%> (-22.81%) ⬇️
superset/db_engine_specs/mysql.py 79.16% <0.00%> (-12.50%) ⬇️
superset/db_engine_specs/presto.py 70.85% <0.00%> (-10.77%) ⬇️
superset/views/database/validators.py 78.94% <0.00%> (-5.27%) ⬇️
superset/views/base_api.py 94.18% <0.00%> (-4.07%) ⬇️
superset/examples/world_bank.py 97.10% <0.00%> (-2.90%) ⬇️
superset/models/core.py 85.55% <0.00%> (-2.78%) ⬇️
superset/databases/api.py 85.18% <0.00%> (-2.78%) ⬇️
... and 439 more

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 807bd65...f2b4ffd. Read the comment docs.

Copy link
Member

@ktmud ktmud 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 for the hard work!

Comment on lines -79 to -81
"@superset-ui/legacy-plugin-chart-iframe": "^0.14.9",
"@superset-ui/legacy-plugin-chart-map-box": "^0.14.9",
"@superset-ui/legacy-plugin-chart-markup": "^0.14.9",
Copy link
Member Author

Choose a reason for hiding this comment

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

Bycatch: legacy-plugin-chart-iframe and legacy-plugin-chart-markup are removed here as per #10590

@villebro villebro merged commit 8c564fb into apache:master Sep 2, 2020
@villebro villebro deleted the echarts-line branch September 2, 2020 06:19
@villebro villebro added the v0.38 label Sep 10, 2020
villebro added a commit to preset-io/superset that referenced this pull request Sep 11, 2020
* initial commit

* Change reference to new echarts plugin

* initial commit

* Change reference to new echarts plugin

* moving dependencies to plugin

* adding pie chart

* rename piechart key

* lint

* Bump packages and implement echarts colors

* remove pie for now

Co-authored-by: Evan Rusackas <[email protected]>
villebro added a commit that referenced this pull request Sep 11, 2020
* initial commit

* Change reference to new echarts plugin

* initial commit

* Change reference to new echarts plugin

* moving dependencies to plugin

* adding pie chart

* rename piechart key

* lint

* Bump packages and implement echarts colors

* remove pie for now

Co-authored-by: Evan Rusackas <[email protected]>
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
* initial commit

* Change reference to new echarts plugin

* initial commit

* Change reference to new echarts plugin

* moving dependencies to plugin

* adding pie chart

* rename piechart key

* lint

* Bump packages and implement echarts colors

* remove pie for now

Co-authored-by: Evan Rusackas <[email protected]>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.38.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 v0.38 🚢 0.38.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants