You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "hexcafe (via GitHub)" <gi...@apache.org> on 2024/05/20 08:58:29 UTC
[PR] feat: add Nightingale chart support for echarts pie chart [superset]
hexcafe opened a new pull request, #28597:
URL: https://github.com/apache/superset/pull/28597
<!---
Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
Example:
fix(dashboard): load charts correctly
-->
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
Add Nightingale Chart Support for Echarts Pie Chart
Echarts now supports Nightingale charts in pie charts, with two optional modes:
1. `radius`: Uses the central angle to show the percentage of data and the radius to show data size.
2. `area`: All sectors share the same central angle, with data size shown only through radiuses.
I have added a new option, 'ROSE TYPE,' to support this feature.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
Before:

After:


### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: add Nightingale chart support for echarts pie chart [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #28597:
URL: https://github.com/apache/superset/pull/28597#issuecomment-2135858108
Works great! Thanks again!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: add Nightingale chart support for echarts pie chart [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #28597:
URL: https://github.com/apache/superset/pull/28597#issuecomment-2121023671
Pretty cool! Are you aware of any feature-parity issues that would prevent a migration from the legacy rose chart to this? I'm always excited to deprecate/remove a legacy plugin in favor of a newer option :)
Also, would you mind adding this to the React Storybook entry? We're making a renewed effort to capture as many variants as possible there (interactive or static).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: add Nightingale chart support for echarts pie chart [superset]
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on PR #28597:
URL: https://github.com/apache/superset/pull/28597#issuecomment-2122466248
> Pretty cool! Are you aware of any feature-parity issues that would prevent a migration from the legacy rose chart to this? I'm always excited to deprecate/remove a legacy plugin in favor of a newer option :)
@rusackas I checked and the legacy plugin has no additional feature that would prevent us from migrating.
<img width="361" alt="Screenshot 2024-05-21 at 08 54 38" src="https://github.com/apache/superset/assets/70410625/1c497e03-c958-4fbf-b861-4fae49dccb88">
<img width="376" alt="Screenshot 2024-05-21 at 08 54 49" src="https://github.com/apache/superset/assets/70410625/d5d7e355-90ad-4c91-b6c1-40ebbdffc210">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: add Nightingale chart support for echarts pie chart [superset]
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #28597:
URL: https://github.com/apache/superset/pull/28597#discussion_r1608167463
##########
superset-frontend/plugins/plugin-chart-echarts/src/Pie/types.ts:
##########
@@ -45,6 +45,7 @@ export type EchartsPieFormData = QueryFormData &
numberFormat: string;
dateFormat: string;
showLabelsThreshold: number;
+ roseType?: 'radius' | 'area';
Review Comment:
```suggestion
roseType: 'radius' | 'area' | null;
```
##########
superset-frontend/plugins/plugin-chart-echarts/src/Pie/types.ts:
##########
@@ -78,6 +79,7 @@ export const DEFAULT_FORM_DATA: EchartsPieFormData = {
labelsOutside: true,
showLabelsThreshold: 5,
dateFormat: 'smart_date',
+ roseType: undefined,
Review Comment:
```suggestion
roseType: null,
```
##########
superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx:
##########
@@ -87,6 +88,23 @@ const config: ControlPanelConfig = {
},
},
],
+ [
+ {
+ name: 'roseType',
+ config: {
+ type: 'SelectControl',
+ label: t('Rose Type'),
+ default: roseType,
+ renderTrigger: true,
+ choices: [
+ ['area', t('Area')],
+ ['radius', t('Radius')],
+ [false, t('None')],
Review Comment:
```suggestion
[null, t('None')],
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: add Nightingale chart support for echarts pie chart [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #28597:
URL: https://github.com/apache/superset/pull/28597#issuecomment-2135761179
/testenv up
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: add Nightingale chart support for echarts pie chart [superset]
Posted by "hexcafe (via GitHub)" <gi...@apache.org>.
hexcafe commented on PR #28597:
URL: https://github.com/apache/superset/pull/28597#issuecomment-2122584813
@michael-s-molina Thanks! I have updated the metadata. Now, we can discover the chart by searching for "Nightingale".

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: add Nightingale chart support for echarts pie chart [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #28597:
URL: https://github.com/apache/superset/pull/28597
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: add Nightingale chart support for echarts pie chart [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #28597:
URL: https://github.com/apache/superset/pull/28597#issuecomment-2135776655
@rusackas Ephemeral environment spinning up at http://34.216.33.80:8080. Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping and startup.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: add Nightingale chart support for echarts pie chart [superset]
Posted by "hexcafe (via GitHub)" <gi...@apache.org>.
hexcafe commented on code in PR #28597:
URL: https://github.com/apache/superset/pull/28597#discussion_r1608294870
##########
superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx:
##########
@@ -87,6 +88,23 @@ const config: ControlPanelConfig = {
},
},
],
+ [
+ {
+ name: 'roseType',
+ config: {
+ type: 'SelectControl',
+ label: t('Rose Type'),
+ default: roseType,
+ renderTrigger: true,
+ choices: [
+ ['area', t('Area')],
+ ['radius', t('Radius')],
+ [false, t('None')],
Review Comment:
I think it's better to keep the value as false; otherwise, the select control will not behave correctly, and we will never get a chance to choose the None option.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: add Nightingale chart support for echarts pie chart [superset]
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #28597:
URL: https://github.com/apache/superset/pull/28597#discussion_r1608339207
##########
superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx:
##########
@@ -87,6 +88,23 @@ const config: ControlPanelConfig = {
},
},
],
+ [
+ {
+ name: 'roseType',
+ config: {
+ type: 'SelectControl',
+ label: t('Rose Type'),
+ default: roseType,
+ renderTrigger: true,
+ choices: [
+ ['area', t('Area')],
+ ['radius', t('Radius')],
+ [false, t('None')],
Review Comment:
@hexcafe `null` [is a valid value](https://github.com/search?q=repo%3Aapache%2Fsuperset++%5Bnull%2C+t%28%27None%27%29%5D%2C&type=code) for the select control. If you prefer to use `false`, then you need to change the Typescript definition accordingly as it's allowing `undefined`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: add Nightingale chart support for echarts pie chart [superset]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #28597:
URL: https://github.com/apache/superset/pull/28597#issuecomment-2135859044
Ephemeral environment shutdown and build artifacts deleted.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: add Nightingale chart support for echarts pie chart [superset]
Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #28597:
URL: https://github.com/apache/superset/pull/28597#discussion_r1608339207
##########
superset-frontend/plugins/plugin-chart-echarts/src/Pie/controlPanel.tsx:
##########
@@ -87,6 +88,23 @@ const config: ControlPanelConfig = {
},
},
],
+ [
+ {
+ name: 'roseType',
+ config: {
+ type: 'SelectControl',
+ label: t('Rose Type'),
+ default: roseType,
+ renderTrigger: true,
+ choices: [
+ ['area', t('Area')],
+ ['radius', t('Radius')],
+ [false, t('None')],
Review Comment:
@hexcafe `null` [is a valid value](https://github.com/search?q=repo%3Aapache%2Fsuperset++%5Bnull%2C+t%28%27None%27%29%5D%2C&type=code) for the select control. If you prefer to use `False`, then you need to change the Typescript definition accordingly as it's allowing `undefined`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: add Nightingale chart support for echarts pie chart [superset]
Posted by "hexcafe (via GitHub)" <gi...@apache.org>.
hexcafe commented on PR #28597:
URL: https://github.com/apache/superset/pull/28597#issuecomment-2122624982
@rusackas @michael-s-molina Should we upgrade to ECharts v5.5.0 soon? please take a look at #27341 , Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] feat: add Nightingale chart support for echarts pie chart [superset]
Posted by "hexcafe (via GitHub)" <gi...@apache.org>.
hexcafe commented on PR #28597:
URL: https://github.com/apache/superset/pull/28597#issuecomment-2132141545
Hi @michael-s-molina ,
Sorry for the delay. I have fixed the type errors. I hope this PR can be merged soon.
Thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org