As far as I know, ChartJS is based on JavaScript and HTML5, Using Chart.js, we can draw charts and graphs on webpage using HTML5 canvas element. This means that we can use it in an ordinary web application including ASP.NET Web Application.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
102 Points
952 Posts
Using Chart JS in asp.net
Apr 17, 2018 09:44 AM|Ashraf007|LINK
How to use chart js in asp.net like below, which is in asp.net mvc
https://www.c-sharpcorner.com/article/create-free-charts-using-chart-js-in-asp-net-mvc/
Star
11464 Points
2439 Posts
Re: Using Chart JS in asp.net
Apr 18, 2018 06:28 AM|Yohann Lu|LINK
Hi Ashraf007,
You want use it with ASP.NET Webform Application?
As far as I know, ChartJS is based on JavaScript and HTML5, Using Chart.js, we can draw charts and graphs on webpage using HTML5 canvas element. This means that we can use it in an ordinary web application including ASP.NET Web Application.
Implementing Chart.js in ASP.Net Using Angular.js Web Service
The chartjs official Samples will give you more tips on how to use it.
Best Regards,
Yong Lu
Contributor
2842 Points
767 Posts
Re: Using Chart JS in asp.net
Apr 18, 2018 07:37 AM|mshoaiblibra|LINK
I Ashraf,
May be you are looking following sample:
using ASP.Net
https://www.aspsnippets.com/Articles/Implement-Free-HTML5-Canvas-charts-using-Chartjs-in-ASPNet.aspx
Using HTML only:
https://www.codeproject.com/Tips/771710/Creating-Charts-using-Chart-js-in-Websites
M Shoaib Waheed
MCSD & MCPD [Web Development 4.0]
http://shoaib.pk
Member
102 Points
952 Posts
Re: Using Chart JS in asp.net
Apr 18, 2018 12:45 PM|Ashraf007|LINK
https://www.aspsnippets.com/Articles/Implement-Free-HTML5-Canvas-charts-using-Chartjs-in-ASPNet.aspx
But it shows the chart in a very old design. It looks very outdated design.
Since the new charts has full of color and sleek design with animation as well.
Can I see the new chartjs with aap.net with database data as tutorial
Contributor
2842 Points
767 Posts
Re: Using Chart JS in asp.net
Apr 19, 2018 05:18 AM|mshoaiblibra|LINK
Just download the current version of chart.js 2.7.2.
https://github.com/chartjs/Chart.js/releases
Documentation of chart.js:
http://www.chartjs.org/docs/2.7.2/
Chart demo:
http://www.chartjs.org/docs/2.7.2/charts/bar.html
http://www.chartjs.org/docs/2.7.2/charts/polar.html
M Shoaib Waheed
MCSD & MCPD [Web Development 4.0]
http://shoaib.pk
Member
102 Points
952 Posts
Re: Using Chart JS in asp.net
Aug 27, 2018 12:19 PM|Ashraf007|LINK
I tried ... Chart is not displaying
All-Star
54508 Points
14111 Posts
Re: Using Chart JS in asp.net
Aug 27, 2018 02:57 PM|mudassarkhan|LINK
Colors have to be generated. I don't see much changes in the new as well as old except that there are more things to control the Chart.
Thus if it is only Color, you can manually add from an Array.
Blog: ASPSnippets | Forum: ASPForums | Company: Excelasoft
Member
102 Points
952 Posts
Re: Using Chart JS in asp.net
Aug 28, 2018 03:40 AM|Ashraf007|LINK
The above chart is generating dynamically from database data. But the chart is not getting displayed ... F12 Error Image Link https://ibb.co/mv2J09
Member
102 Points
952 Posts
Re: Using Chart JS in asp.net
Aug 28, 2018 03:51 AM|Ashraf007|LINK
Thanks you ... In need the chart data to be displayed dynamically from database.
I just found static chart.js detail here http://www.sourcecodehub.com/article/371/how-to-create-draw-a-doughnut-chart-using-chartjs-in-aspnet-detailed-example
None
0 Points
1 Post
Re: Using Chart JS in asp.net
May 01, 2019 07:14 AM|kgup|LINK
You may have a spelling mistake in your code - in your ajax call's url you've specified: