You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "dmitriyVasilievich1986 (via GitHub)" <gi...@apache.org> on 2024/08/12 10:03:30 UTC
[PR] fix: duplicate `truncateXAxis` option in `BarChart` [superset]
dmitriyVasilievich1986 opened a new pull request, #29916:
URL: https://github.com/apache/superset/pull/29916
### SUMMARY
In control panel for echart/BarChart there is a factory-function that supposed to build panels for x/y axises. Unfortunately `truncateXAxis` and `xAxisBounds` do not affected by axis name, therefore those options appears in both panels('X Axis', 'Y Axis'). They are complete duplicate and share the same state. Solution is to move those options from factory-function directly to `controlSetRows`.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<img width="1800" alt="Screenshot 2024-08-12 at 11 35 38" src="https://github.com/user-attachments/assets/e3006055-2d84-43d6-baa8-e21edde2f3dc">
<img width="1800" alt="Screenshot 2024-08-12 at 11 57 19" src="https://github.com/user-attachments/assets/cc60f6f4-3cc1-450a-9844-2aab79056318">
### TESTING INSTRUCTIONS
The problem is available in the chart editor in the customization panel. Since both options have a same state, the value changes in both.
### ADDITIONAL INFORMATION
- [ ] 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] fix: duplicate `truncateXAxis` option in `BarChart` [superset]
Posted by "kgabryje (via GitHub)" <gi...@apache.org>.
kgabryje merged PR #29916:
URL: https://github.com/apache/superset/pull/29916
--
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] fix: duplicate `truncateXAxis` option in `BarChart` [superset]
Posted by "kgabryje (via GitHub)" <gi...@apache.org>.
kgabryje commented on PR #29916:
URL: https://github.com/apache/superset/pull/29916#issuecomment-2296198903
@dmitriyVasilievich1986 Thanks for the fix! I wonder if we should tie `truncateXAxis` position to the bars' orientation. In the default "vertical" mode, `truncate x axis` truncates the horizontal axis (X) as expected. But if you change the orientation to horizontal, then truncate x axis actually truncates the vertical Y axis.
So maybe we should override `truncateXAxis` control's visibility and label (X if vertical, Y if horizontal) based on the orientation. WDYT?
--
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] fix: duplicate `truncateXAxis` option in `BarChart` [superset]
Posted by "dmitriyVasilievich1986 (via GitHub)" <gi...@apache.org>.
dmitriyVasilievich1986 commented on PR #29916:
URL: https://github.com/apache/superset/pull/29916#issuecomment-2310150936
Good day. I looked at what could be done to solve this problem. Unfortunately I think that in order to use generic `truncateXAxis` and `xAxisBounds` panels you will have to make too many changes. The easiest option is to delete those generic ones and instead make a copy of the abstract ones for the y-axis. Replacing the name and visibility conditions.
I tested this option and switching the chart orientation worked without problems. I can make a commit with this option. Or am I missing something else?
--
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