dosubot[bot] commented on issue #36478:
URL: https://github.com/apache/superset/issues/36478#issuecomment-3631085313

   <!-- Answer -->
   This is a known limitation in Superset's deck.gl Multiple Layers chart. The 
rendering order of layers is not reliably controllable because both the backend 
and frontend do not enforce or preserve the user-specified order. On the 
frontend, layers are loaded asynchronously and stored in an object keyed by 
slice ID; when rendering, the order is determined by how the HTTP responses 
arrive, not by the order you select in the UI. The backend also does not 
guarantee order when fetching slices. As a result, the stacking order of layers 
appears inconsistent or random, and there is currently no built-in workaround 
or UI control to set the order you want. Fixing this would require changes to 
both how the backend returns slices and how the frontend assembles and renders 
the layers array before passing it to deck.gl. You can see the relevant 
frontend logic 
[here](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/legacy-preset-chart-deckg
 l/src/Multi/Multi.tsx#L99-L193) and backend logic 
[here](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/viz.py#L1515-L1565).
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/2adfc967-45f6-4829-b9b5-170523957b3e?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/2adfc967-45f6-4829-b9b5-170523957b3e?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/2adfc967-45f6-4829-b9b5-170523957b3e?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/2adfc967-45f6-4829-b9b5-170523957b3e?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/2adfc967-45f6-4829-b9b5-170523957b3e?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/2adfc967-45f6-4829-b9b5-170523957b3e?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/2adfc967-45f6-4829-b9b5-170523957b3e?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20limitation%20in%20Superset%27s%20deck.gl%20Multiple%20Layers%20chart.%20The%20rendering%20order%20of%20layers%20is%20not%20reliably%20controllable%20because%20both%20the%20backend%20and%20frontend%20do%20not%20enforce%20or%20preserve%20the%20user-specified%20order.%20On%20the%20frontend%2C%20layers%20are%20loaded%20asynchronously%20and%20stored%20in%20an%20object%20keyed%20by%20slice%20ID%3B%20when%20rendering%2C%20the%20order%20is%20determined%20by%20how%20the%20HTTP%20responses%20arrive%2C%20not%20by%20the%20order%20you%20select%20in%20the%20UI.%20The%20backend%20also%20does%20not%20guarantee%20order%20when%20fetching%20slices.%20As%20a%20result%2C%20the%20stacking%20order%20of%20layers%20appears%20inconsistent%20or%20rand
 
om%2C%20and%20there%20is%20currently%20no%20built-in%20workaround%20or%20UI%20control%20to%20set%20the%20order%20you%20want.%20Fixing%20this%20would%20require%20changes%20to%20both%20how%20the%20backend%20returns%20slices%20and%20how%20the%20frontend%20assembles%20and%20renders%20the%20layers%20array%20before%20passing%20it%20to%20deck.gl.%20You%20can%20see%20the%20relevant%20frontend%20logic%20%5Bhere%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.tsx%23L99-L193%29%20and%20backend%20logic%20%5Bhere%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/viz.py%23L1515-L1565%29.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20
 
me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/36478)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to