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

chore: replace mathjs with mexp #1362

Merged
merged 2 commits into from
Sep 16, 2021

Conversation

villebro
Copy link
Contributor

@villebro villebro commented Sep 16, 2021

🏠 Internal
Replace mathjs (11 Mb bundle) with math-expression-evaluator (71 kb) as done on apache/superset#16701.

Checklist:

  • added unit tests to plugins-chart-echart for formula evaluation
  • ensure formula annotations work on both NVD3 and ECharts plugin:

NVD3 plugin after migration:
image

ECharts plugin after migration:
image

Also fix z-index of formula to make sure it is displayed above other charts:

AFTER

image

BEFORE

image

@villebro villebro requested a review from a team as a code owner September 16, 2021 13:25
@vercel
Copy link

vercel bot commented Sep 16, 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/6KH99irRgazeFsRjUDHHyAm89gkf
✅ Preview: https://superset-ui-git-fork-preset-io-villebro-dump-mathjs-superset.vercel.app

Copy link
Contributor

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

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

Lgtm, just remove the console log please 🙂

@codecov
Copy link

codecov bot commented Sep 16, 2021

Codecov Report

Merging #1362 (5109096) into master (4de24d5) will decrease coverage by 0.00%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1362      +/-   ##
==========================================
- Coverage   30.12%   30.12%   -0.01%     
==========================================
  Files         491      491              
  Lines        9874     9878       +4     
  Branches     1662     1663       +1     
==========================================
+ Hits         2975     2976       +1     
- Misses       6652     6655       +3     
  Partials      247      247              
Impacted Files Coverage Δ
plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js 0.00% <0.00%> (ø)
...lugin-chart-echarts/src/Timeseries/transformers.ts 44.44% <ø> (ø)
...ugins/plugin-chart-echarts/src/utils/annotation.ts 83.72% <100.00%> (+0.38%) ⬆️

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 4de24d5...5109096. Read the comment docs.

@villebro villebro merged commit d6895f6 into apache-superset:master Sep 16, 2021
@villebro villebro deleted the villebro/dump-mathjs branch September 16, 2021 15:12
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.

2 participants