-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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] Add d3 legend formatting for Arc, Polygon and Scatter deck.gl maps #7951
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a few minor comments
superset/assets/package.json
Outdated
@@ -89,6 +89,7 @@ | |||
"classnames": "^2.2.5", | |||
"d3-array": "^1.2.4", | |||
"d3-color": "^1.2.0", | |||
"d3-format": "^1.3.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you should use this instead: https://github.com/apache-superset/superset-ui/tree/master/packages/superset-ui-number-format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -18,24 +18,52 @@ | |||
*/ | |||
import React from 'react'; | |||
import PropTypes from 'prop-types'; | |||
import { format } from 'd3-format'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
} | ||
|
||
formatCatregoryLabel(k) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Did you include an |
Codecov Report
@@ Coverage Diff @@
## master #7951 +/- ##
==========================================
- Coverage 65.58% 65.54% -0.04%
==========================================
Files 469 469
Lines 22461 22474 +13
Branches 2438 2441 +3
==========================================
Hits 14730 14730
- Misses 7611 7624 +13
Partials 120 120
Continue to review full report at Codecov.
|
I did not but switched the dependency from d3-format to superset-ui as suggested by @villebro. Everything should be good to go now. |
Are the |
This LGTM but I don't feel comfortable merging frontend PRs; @etr2460 or @mistercrunch can you take a look? |
…maps (apache#7951) * Legend formatting for Arc, Polygon and Scatter * fix typo * refactor from d3-format to superset-ui
CATEGORY
Choose one
SUMMARY
Adds d3 legend formatting to Arc, Polygon, and Scatter deck.gl maps
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE
AFTER
TEST PLAN
Visual inspection
ADDITIONAL INFORMATION
REVIEWERS