🐛 fix(ECharts): Option can now be null (#2315)

This commit is contained in:
capdiem
2025-01-13 11:11:19 +08:00
parent 13edc3dbf5
commit 659763e4ea

View File

@@ -36,7 +36,7 @@ public class MECharts : Container, IEChartsJsCallbacks
public Action<EChartsInitOptions>? InitOptions { get; set; }
[Parameter]
public object Option { get; set; } = new { };
public object? Option { get; set; }
[Parameter]
public bool Light { get; set; }
@@ -224,7 +224,7 @@ public class MECharts : Container, IEChartsJsCallbacks
{
if (_echarts == null) return;
option ??= Option;
option ??= Option ?? new { };
if (IncludeFunctionsInOption && IsAnyFunction(option, out var optionJson))
{