ant-design-charts-blazor
ant-design-charts-blazor copied to clipboard
The NuGet package AntDesign.Charts V0.2.3 does not work
There seem to be no "ant-design-charts-blazor.js" deployed.
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Could not find 'AntDesignCharts.interop.create' ('AntDesignCharts' was undefined).
Error: Could not find 'AntDesignCharts.interop.create' ('AntDesignCharts' was undefined).
at https://localhost:5001/_framework/blazor.webassembly.js:1:328
at Array.forEach (<anonymous>)
at a.findFunction (https://localhost:5001/_framework/blazor.webassembly.js:1:296)
at _ (https://localhost:5001/_framework/blazor.webassembly.js:1:2437)
at https://localhost:5001/_framework/blazor.webassembly.js:1:3325
at new Promise (<anonymous>)
at Object.beginInvokeJSFromDotNet (https://localhost:5001/_framework/blazor.webassembly.js:1:3306)
at Object.St [as invokeJSFromDotNet] (https://localhost:5001/_framework/blazor.webassembly.js:1:59853)
at _mono_wasm_invoke_js_blazor (https://localhost:5001/_framework/dotnet.6.0.5.fliom2fq3z.js:1:195300)
at wasm://wasm/00971e46:wasm-function[219]:0x1a490
Microsoft.JSInterop.JSException: Could not find 'AntDesignCharts.interop.create' ('AntDesignCharts' was undefined).
Error: Could not find 'AntDesignCharts.interop.create' ('AntDesignCharts' was undefined).
at https://localhost:5001/_framework/blazor.webassembly.js:1:328
at Array.forEach (<anonymous>)
at a.findFunction (https://localhost:5001/_framework/blazor.webassembly.js:1:296)
at _ (https://localhost:5001/_framework/blazor.webassembly.js:1:2437)
at https://localhost:5001/_framework/blazor.webassembly.js:1:3325
at new Promise (<anonymous>)
at Object.beginInvokeJSFromDotNet (https://localhost:5001/_framework/blazor.webassembly.js:1:3306)
at Object.St [as invokeJSFromDotNet] (https://localhost:5001/_framework/blazor.webassembly.js:1:59853)
at _mono_wasm_invoke_js_blazor (https://localhost:5001/_framework/dotnet.6.0.5.fliom2fq3z.js:1:195300)
at wasm://wasm/00971e46:wasm-function[219]:0x1a490
at Microsoft.JSInterop.JSRuntime.<InvokeAsync>d__16`1[[Microsoft.JSInterop.Infrastructure.IJSVoidResult, Microsoft.JSInterop, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]].MoveNext()
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at AntDesign.Charts.ChartComponentBase`1.<Create>d__58[[AntDesign.Charts.LineConfig, AntDesign.Charts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at AntDesign.Charts.ChartComponentBase`1.<OnAfterRenderAsync>d__55[[AntDesign.Charts.LineConfig, AntDesign.Charts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
@SongPing Do you link the static files in wwwroot/index.html ?Please add this code in your index.html file.
<script src="https://unpkg.com/@antv/g2plot@latest/dist/g2plot.min.js"></script>
<script src="_content/AntDesign.Charts/ant-design-charts-blazor.js"></script>