protected override async Task OnAfterRenderAsync(bool firstRender) { if (AutoRender == false) { return; } if (firstRender) { if (option == null && string.IsNullOrWhiteSpace(optionRaw)) { return; } if (!string.IsNullOrWhiteSpace(optionRaw)) { await JsInterop.SetupChart(Id, Theme, optionRaw); } else { await JsInterop.SetupChart(Id, Theme, option); } if (OnRenderCompleted != null) { await OnRenderCompleted(this); } } RequireRender = false; }
protected override async Task OnAfterRenderAsync(bool firstRender) { if (AutoRender == false) { return; } if (firstRender) { if (option == null && string.IsNullOrWhiteSpace(optionRaw)) { return; } if (!string.IsNullOrWhiteSpace(optionRaw)) { await JsInterop.SetupChart(Id, Theme, optionRaw); } else { await JsInterop.SetupChart(Id, Theme, option); } // 事件 if (EventTypes.Count > 0 && OnEventCallback.HasDelegate) { foreach (var eventType in EventTypes) { await JsInterop.ChartOn(Id, eventType, DotNetObjectReference.Create(_eventInvokeHelper)); } } if (OnRenderCompleted != null) { await OnRenderCompleted(this); } } RequireRender = false; }
public async Task SetupOptionAsync(EChartsOption <T> opt, bool notMerge = false) { await JsInterop.SetupChart(Id, Theme, opt, notMerge); }