GitHub user dosubot[bot] added a comment to the discussion: Cartodiagram Map 
does not work for me

<!-- Answer -->
The error you're seeing (`TypeError: Cannot read properties of null (reading 
'store')`) happens because the Pie chart plugin in Superset relies on Redux 
state via the `useSelector` hook, which expects a Redux Provider to be present 
in the React context. When the Cartodiagram Map tries to render a Pie chart as 
a sub-chart, it uses `ReactDOM.render` without wrapping the chart in a Redux 
Provider, so `useSelector` fails and throws this error. That's why Cartodiagram 
can render itself (it doesn't need Redux context in the same way), but Pie 
charts break in this context 
([source](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-echarts/src/components/Echart.tsx)).

Right now, Redux-dependent charts like Pie can't be used as sub-charts in 
Cartodiagram unless the rendering pipeline is updated to provide Redux context. 
There isn't a documented workaround in the codebase for this integration gap. 
If you need Cartodiagram with Pie charts, it would require a code change to 
wrap the sub-chart rendering in a Redux Provider. Otherwise, only charts that 
don't depend on Redux context will work as sub-charts in Cartodiagram.


<!-- 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/3d7fb21e-3cb1-4425-b48a-7d050f30cdf7?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/3d7fb21e-3cb1-4425-b48a-7d050f30cdf7?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/3d7fb21e-3cb1-4425-b48a-7d050f30cdf7?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/3d7fb21e-3cb1-4425-b48a-7d050f30cdf7?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/3d7fb21e-3cb1-4425-b48a-7d050f30cdf7?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/3d7fb21e-3cb1-4425-b48a-7d050f30cdf7?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/3d7fb21e-3cb1-4425-b48a-7d050f30cdf7?feedback_type=other)</sup>&nbsp;&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34069)

GitHub link: 
https://github.com/apache/superset/discussions/34069#discussioncomment-13708933

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: 
notifications-unsubscr...@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to