-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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: Adding the option and feature to enable borders with color, opacity and width control on heatmaps along with white borders on emphasis #32358
base: master
Are you sure you want to change the base?
Conversation
…/controlPanel.tsx modified: superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts modified: superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/types.ts
modified: superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts
…/transformProps.ts
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.
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've completed my review and didn't find any issues.
Files scanned
File Path | Reviewed |
---|---|
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/types.ts | ✅ |
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts | ✅ |
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Need a new review? Comment
/korbit-review
on this PR and I'll review your latest changes.Korbit Guide: Usage and Customization
Interacting with Korbit
- You can manually ask Korbit to review your PR using the
/korbit-review
command in a comment at the root of your PR.- You can ask Korbit to generate a new PR description using the
/korbit-generate-pr-description
command in any comment on your PR.- Too many Korbit comments? I can resolve all my comment threads if you use the
/korbit-resolve
command in any comment on your PR.- Chat with Korbit on issues we post by tagging @korbit-ai in your reply.
- Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.
Customizing Korbit
- Check out our docs on how you can make Korbit work best for you and your team.
- Customize Korbit for your organization through the Korbit Console.
Current Korbit Configuration
General Settings
Setting Value Review Schedule Automatic excluding drafts Max Issue Count 10 Automatic PR Descriptions ❌ Issue Categories
Category Enabled Documentation ✅ Logging ✅ Error Handling ✅ Readability ✅ Design ✅ Performance ✅ Security ✅ Functionality ✅ Feedback and Support
Note
Korbit Pro is free for open source projects 🎉
Looking to add Korbit to your team? Get started with a free 2 week trial here
@rusackas Ephemeral environment spinning up at http://52.12.1.165:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup. |
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx
Outdated
Show resolved
Hide resolved
Thanks for the PR @Dev10-34. Could you instead of adding a checkbox to enabling black borders, add a control to set the border color which by default is transparent (no border)? This is important as the color border may conflict with the color scheme used by the chart. |
Thank you for the response! I don't quite get what you mean by a control. Do you mean something like a slider? I was primarily thinking that just the way the show values works for heatmap, where darker elements get the values written in white and lighter elements get a value written in black; but done for borders |
…/controlPanel.tsx modified: superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts modified: superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/types.ts
…/controlPanel.tsx modified: superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts modified: superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/types.ts
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.
Could you also remove the package-lock.json
changes as there was no package change in this PR?
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx
Outdated
Show resolved
Hide resolved
…s.ts modified: superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts
I added a function in utils.ts which lets you change the opacity as well now |
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx
Outdated
Show resolved
Hide resolved
…s.ts modified: superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx modified: superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts modified: superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/types.ts
…/controlPanel.tsx
…/controlPanel.tsx
…/controlPanel.tsx modified: superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts
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.
Thanks for the changes @Dev10-34. I left some suggestion to improve variable names.
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/types.ts
Outdated
Show resolved
Hide resolved
…trolPanel.tsx Co-authored-by: Michael S. Molina <[email protected]>
…trolPanel.tsx Co-authored-by: Michael S. Molina <[email protected]>
…trolPanel.tsx Co-authored-by: Michael S. Molina <[email protected]>
…trolPanel.tsx Co-authored-by: Michael S. Molina <[email protected]>
…nsformProps.ts Co-authored-by: Michael S. Molina <[email protected]>
…nsformProps.ts Co-authored-by: Michael S. Molina <[email protected]>
…es.ts Co-authored-by: Michael S. Molina <[email protected]>
I applied all the suggestions which you gave, however, upon re running there seems to be a bug sorta where even though the border width is set to 0 as default, on initial creation of the chart. If you move the border width slider, it fixes itself. Everything else works as intended functionally, just the visuals of the initial chart creation shows the borders as well, even if all the defaults are set correctly. |
…/transformProps.ts
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/transformProps.ts
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/Heatmap/controlPanel.tsx
Outdated
Show resolved
Hide resolved
…/controlPanel.tsx
@michael-s-molina Processing your ephemeral environment request here. Action: up. |
SUMMARY
In heatmaps, when there can be several continuous same colored regions, making it hard to distinguish between each heatmap element itself. Depending on need of the user, this differentiation capability might be required or crucial to their work.
Added a color picker color control which keeps the borders transparent by default. Users can set the opacity as needed.
Added a slider control to set the border width as needed.
Added a feature which pops out the element upon emphasis with white borders and shadows.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE

AFTER



TESTING INSTRUCTIONS
No test files found for the same.
ADDITIONAL INFORMATION