Deck.gl's arc chart stroke width not updating
Bug description
While working with Deck.gl's arc chart, I encountered an issue where adjusting the stroke width via a form doesn't seem to update the arc's width.
How to reproduce: (As per quick start guide) 1.
git clone https://github.com/apache/superset
# Enter the repository you just cloned
$ cd superset
# Fire up Superset using Docker Compose
$ docker compose -f docker-compose-image-tag.yml up
- Go to localhost:8088 and log in with admin/admin.
- Load the default Deck.gl Arcs chart.
- A change in the stroke width in the form is not reflected in the preview of the chart even after update.
I am uncertain if this is the root cause but I noticed that the code that set's the stroke width property is from a previous version (v5.2) of deck.gl which is no longer used.
- https://github.com/apache/superset/blob/318eff732764f89e49c6eb699238c8950f533726/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Arc/Arc.tsx#L80
Screenshots/recordings
https://github.com/user-attachments/assets/d76d40b4-45bc-4d62-b2e0-d6658a977cd0
Superset version
master / latest-dev
Python version
I don't know
Node version
I don't know
Browser
Chrome
Additional context
No response
Checklist
- [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Hey @kyun99, I'm here to assist you with any bugs, questions, or contributions you have. Let's work on resolving the issue together!
To resolve the issue with the stroke width not updating in Deck.gl's arc chart, ensure the following:
-
Check
fd.stroke_width: Verify thatfd.stroke_widthis correctly set in the form data. It should not beundefinedornull. ThestrokeWidthis set usingfd.stroke_widthin theArcLayer:strokeWidth: fd.stroke_width ? fd.stroke_width : 3, -
Form Data Configuration: Ensure that the
stroke_widthis configured correctly in the form data and that the selected value is being saved and passed properly. ThecontrolPanel.tsfile should havestroke_widthas aSelectControlwith options like [1, 2, 3, 4, 5]. -
Re-rendering: Make sure the component re-renders when
fd.stroke_widthchanges. TherenderTrigger: truesetting in the control configuration should facilitate this. -
Deck.gl Version: Confirm that the latest version of Deck.gl is being used to avoid compatibility issues. The current setup in
Arc.tsxaligns with the latest Deck.gl API [1][2].
If these steps don't resolve the issue, there might be a problem elsewhere in the data flow or rendering logic.
To continue talking to Dosu, mention @dosu.
Seems like this is still an issue as of 4.1.2.
Opening a PR...