new feature Echart options #38737
Replies: 2 comments 4 replies
-
|
Your chart becomes blank because the The code uses lodash's Unfortunately, there's no built-in way to merge custom series options with existing series in the current implementation. The Area Chart constructs its series array programmatically from your query data, and echartOptions can only overwrite it entirely. Workarounds:
This is a known limitation—several related discussions and issues have been raised about the inability to customize series-level ECharts properties per chart instance. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
|
Dosu's explanation is right about the root cause (arrays get replaced, not merged), but there is actually a way to work around this without forking. The trick is to match the exact number of series your chart generates and provide the full structure for each one. If your Area Chart has, say, 3 series (3 metrics or 3 dimension values), you need: {
"series": [
{ "label": { "fontSize": 14 } },
{ "label": { "fontSize": 14 } },
{ "label": { "fontSize": 14 } }
]
}But this still wipes your data because lodash What actually works: use the For text sizing, you can use Dashboard CSS rather than echartOptions: /* Target label text in all ECharts within this dashboard */
.echarts-for-react text[font-size] {
font-size: 14px !important;
}Or more specifically for series labels: .superset-chart-echarts .echarts-for-react text {
font-size: 14px !important;
}Go to your dashboard, click the This is admittedly hacky, but it works without touching series config at all. The echartOptions feature is really only safe for non-array properties like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I’m trying to change the label text size in the Area Chart visual with new feature "Echart options" (6.1.0rc1)
I’m using this:
{ "series": [{ "label": { "fontSize": 4 } }] }but the chart becomes blank. If I try title and etc - all ok.
Is there a way to merge this into the existing series instead of overwriting it completely, so that only fontSize is changed? Or is there any other way to do this without forking the visual and adding custom settings?
Beta Was this translation helpful? Give feedback.
All reactions