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

   <!-- Answer -->
   Thanks for the clarification — I apologize for missing the MATRIXIFY feature 
flag. I can confirm it's listed in the [admin 
docs](https://superset.apache.org/admin-docs/configuration/feature-flags/) as 
an experimental/development feature.
   
   After deeper research, this issue appears to stem from a **known 
architectural limitation with how `echartOptions` merging works**, which is 
exacerbated in Matrixify mode. Here's what's happening:
   
   **The core problem:** The ECharts custom options merging uses lodash 
`merge()`, which **treats arrays (like `series`) as complete replacements 
rather than element-wise merges** 
[[1]](https://github.com/apache/superset/discussions/38737#discussioncomment-16203928).
 When Matrixify generates grid cells, each cell gets a cloned `formData` with 
dimension filters injected. If the custom `echartOptions` include any 
array-based properties (e.g., `series`), the merge overwrites the generated 
series configuration entirely, resulting in broken or blank charts.
   
   **Safe vs. unsafe properties in echartOptions** 
[[1]](https://github.com/apache/superset/discussions/38737#discussioncomment-16203928):
   
   - ✅ **Safe** (object-based, merge correctly): `title`, `tooltip`, `legend`, 
`grid`, `xAxis`, `yAxis`
   - ❌ **Unsafe** (array-based, get overwritten): `series` and other array 
configurations
   
   **Workarounds:**
   
   1. **Stick to safe (object-based) properties** in the ECharts Options field 
— avoid modifying `series`
   2. **Use Dashboard CSS** for visual customizations instead 
[[1]](https://github.com/apache/superset/discussions/38737#discussioncomment-16203928):
      ```css
      .superset-chart-echarts .echarts-for-react text {
        font-size: 14px !important;
      }
      ```
   
   3. **Per-chart CSS targeting** via `#chart-id-{id}` selectors for specific 
chart instances
   
   A community proposal for **smart series merging** using `mergeWith` custom 
logic (matching series by `name`, broadcasting with an `"__all__"` key) has 
been discussed but is not yet implemented 
[[1]](https://github.com/apache/superset/discussions/38737#discussioncomment-16203928).
   
   Could you share what specific ECharts options you're trying to set? That 
would help determine if there's a viable workaround for your particular use 
case, or if this needs to be tracked as a separate enhancement for 
Matrixify-specific echartOptions handling.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention 
[@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=brand-link).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-great_response#message_id=94b216af-e5b6-4151-8e3c-f1c8b2be4b5d&feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-irrelevant_answer#message_id=94b216af-e5b6-4151-8e3c-f1c8b2be4b5d&feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-incorrect_sources#message_id=94b216af-e5b6-4151-8e3c-f1c8b2be4b5d&feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-too_verbose#message_id=94b216af-e5b6-4151-8e3c-f1c8b2be4b5d&feedback_type=too_verbose)
 | [Hallucination](https://
 
app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-hallucination#message_id=94b216af-e5b6-4151-8e3c-f1c8b2be4b5d&feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-bug_report#message_id=94b216af-e5b6-4151-8e3c-f1c8b2be4b5d&feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-other#message_id=94b216af-e5b6-4151-8e3c-f1c8b2be4b5d&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&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=chat-badge)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Thanks%20for%20the%20clarification%20%E2%80%94%20I%20apologize%20for%20missing%20the%20MATRIXIFY%20feature%20flag.%20I%20can%20confirm%20it%27s%20listed%20in%20the%20%5Badmin%20docs%5D%28https%3A//superset.apache.org/admin-docs/configuration/feature-flags/%29%20as%20an%20experimental/development%20feature.%0A%0AAfter%20deeper%20research%2C%20this%20issue%20appears%20to%20stem%20from%20a%20%2A%2Aknown%20architectural%20limitation%20with%20how%20%60echartOptions%60%20merging%20works%2A%2A%2C%20which%20is%20exacerbated%20in%20Matrixify%20mode.%20Here%27s%20what%27s%20happening%3A%0A%0A%2A%2AThe%20core%20problem%3A%2A%2A%20The%20ECharts%20custom%20options%20merging%20uses%20lod
 
ash%20%60merge%28%29%60%2C%20which%20%2A%2Atreats%20arrays%20%28like%20%60series%60%29%20as%20complete%20replacements%20rather%20than%20element-wise%20merges%2A%2A%20%5B%5B1%5D%5D%28https%3A//github.com/apache/superset/discussions/38737%23discussioncomment-16203928%29.%20When%20Matrixify%20generates%20grid%20cells%2C%20each%20cell%20gets%20a%20cloned%20%60formData%60%20with%20dimension%20filters%20injected.%20If%20the%20custom%20%60echartOptions%60%20include%20any%20array-based%20properties%20%28e.g.%2C%20%60series%60%29%2C%20the%20merge%20overwrites%20the%20generated%20series%20configuration%20entirely%2C%20resulting%20in%20broken%20or%20blank%20charts.%0A%0A%2A%2ASafe%20vs.%20unsafe%20properties%20in%20echartOptions%2A%2A%20%5B%5B1%5D%5D%28https%3A//github.com/apache/superset/discussions/38737%23discussioncomment-16203928%29%3A%0A%0A-%20%E2%9C%85%20%2A%2ASafe%2A%2A%20%28object-based%2C%20merge%20correctly%29%3A%20%60title%60%2C%20%60tooltip%60%2C%20%60legend%60%2C%20%60grid%60%2C%
 
20%60xAxis%60%2C%20%60yAxis%60%0A-%20%E2%9D%8C%20%2A%2AUnsafe%2A%2A%20%28array-based%2C%20get%20overwritten%29%3A%20%60series%60%20and%20other%20array%20configurations%0A%0A%2A%2AWorkarounds%3A%2A%2A%0A%0A1.%20%2A%2AStick%20to%20safe%20%28object-based%29%20properties%2A%2A%20in%20the%20ECharts%20Options%20field%20%E2%80%94%20avoid%20modifying%20%60series%60%0A2.%20%2A%2AUse%20Dashboard%20CSS%2A%2A%20for%20visual%20customizations%20instead%20%5B%5B1%5D%5D%28https%3A//github.com/apache/superset/discussions/38737%23discussioncomment-16203928%29%3A%0A%20%20%20%60%60%60css%0A%20%20%20.superset-chart-echarts%20.echarts-for-react%20text%20%7B%0A%20%20%20%20%20font-size%3A%2014px%20%21important%3B%0A%20%20%20%7D%0A%20%20%20%60%60%60%0A%0A3.%20%2A%2APer-chart%20CSS%20targeting%2A%2A%20via%20%60%23chart-id-%7Bid%7D%60%20selectors%20for%20specific%20chart%20instances%0A%0AA%20community%20proposal%20for%20%2A%2Asmart%20series%20merging%2A%2A%20using%20%60mergeWith%60%20custom%20logic%20%28match
 
ing%20series%20by%20%60name%60%2C%20broadcasting%20with%20an%20%60%22__all__%22%60%20key%29%20has%20been%20discussed%20but%20is%20not%20yet%20implemented%20%5B%5B1%5D%5D%28https%3A//github.com/apache/superset/discussions/38737%23discussioncomment-16203928%29.%0A%0ACould%20you%20share%20what%20specific%20ECharts%20options%20you%27re%20trying%20to%20set%3F%20That%20would%20help%20determine%20if%20there%27s%20a%20viable%20workaround%20for%20your%20particular%20use%20case%2C%20or%20if%20this%20needs%20to%20be%20tracked%20as%20a%20separate%20enhancement%20for%20Matrixify-specific%20echartOptions%20handling.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=join-discord)&nbsp;[![Share
 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/issues/39008)


-- 
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