You must be logged in to post your query.
Home › Forums › Chart Support › Datatable to Multi Series Chart
Tagged: Datatable Asp.net MVC
Hello, I recently purchased Canvas JS. I am attempting to convert a DataTable in C# over to a canvas JS graph in ASP.NET MVC.
I have used the “ViewBag.DataPoints” method in the past, but i am hoping there is an easier way to graph my dataset.
Each “Column” in my Datatable will represent a different series, and the data below (integers) will be the data needing to be plotted.
Is there a way to achieve this without using the ViewBag.Datapoints method?
Thank you.
@eli-hellmer,
Can you kindly create a sample project reproducing the issue you are facing and share it with us over Google-Drive or Onedrive along with the sample data so that we can look into the code, understand the scenario better and help you out?
___________ Indranil Deo Team CanvasJS
A sample project isn’t necessary, because I wouldn’t know what code to put in the sample project because my question is asking about how to start the code.
How can I use a DataTable (https://docs.microsoft.com/en-us/dotnet/api/system.data.datatable?view=netcore-3.1) along with Canvas JS. Is there any way to convert the databable to a graph instead of having to use the Viewbag items in Asp.net MVC like your examples show?
Please download this sample project for an example on rendering chart using data from DataTable in ASP.NET MVC.
Thank you very much. Sample project was very helpful!
You must be logged in to reply to this topic. Login/Register