ant-design-charts-blazor | A Blazor chart library , based on G2Plot | Chart library
kandi X-RAY | ant-design-charts-blazor Summary
kandi X-RAY | ant-design-charts-blazor Summary
A Blazor chart library, based on G2Plot
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ant-design-charts-blazor
ant-design-charts-blazor Key Features
ant-design-charts-blazor Examples and Code Snippets
Community Discussions
Trending Discussions on ant-design-charts-blazor
QUESTION
I am trying to add a link to .js file in Pages/_Layout.cshtml
However I am getting following exception:
Severity Code Description Project File Line Suppression State Error (active) CS0103 The name 'antv' does not exist in the current context Blazing C:\Users\Laptop\source\repos\Blazing\Blazing\Pages_Layout.cshtml 31
_Layout.cshtml:
...ANSWER
Answered 2021-Nov-27 at 11:24This is solved in .net 6.
In .net 5 (and before) the razor engine appears to stick its nose where it doesn't belong. Luckily there is an easy fix, escape the @
as @@
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ant-design-charts-blazor
Go to the project folder of the application and install the Nuget package reference $ dotnet add package AntDesign.Charts Link the static files in wwwroot/index.html (WebAssembly) or Pages/_Host.razor (Server) <script src="https://unpkg.com/@antv/g2plot@latest/dist/g2plot.min.js"></script> <script src="_content/AntDesign.Charts/ant-design-charts-blazor.js"></script> Add namespace in _Imports.razor @using AntDesign.Charts
Finally, it can be referenced in the `.razor' component! <Line Data="data" Config="config" /> @code{ object[] data = new object[] { new { year= "1991", value= 3 }, new { year= "1992", value= 4 }, new { year= "1993", value= 3.5 }, new { year= "1994", value= 5 }, new { year= "1995", value= 4.9 }, new { year= "1996", value= 6 }, new { year= "1997", value= 7 }, new { year= "1998", value= 9 }, new { year= "1999", value= 13 }, }; LineConfig config = new LineConfig() { title = new Title() { visible = true, text = "曲线折线图", }, description = new Description() { visible = true, text = "用平滑的曲线代替折线。", }, padding = "auto", forceFit = true, xField = "year", yField = "value", smooth = true, }; } 🔗 Links
Official Blazor Documentation
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page