Home › forums › Chart Support › Create chart in MVC using database
I try to create chart in MVC, where the controller return the ViewBag.Datapoints. How to access the datapoints to plot the column graph.
Please take a look at this gallery example to render chart with data from database in ASP.NET MVC. You can also download ASP.NET MVC sample from our download page.
If this doesn’t help you resolve the issue you are facing, kindly create sample project reproducing the issue along with sample database and share with us over Google-Drive or Onedrive so that we can run it locally to understand your scenario better and help you out.
Here is the sample code https://jsfiddle.net/2e18pcm6/1/. I return the data from controller in ViewBag.DataPoints.
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 database so that we can run it locally to understand the scenario better and help you out?
From what we have observed, sometimes things get delayed mostly when we are not able to reproduce the issue or not able to understand the exact requirements or the solution that we provide may not work properly due to the variation in chart-options being used by you and us.
Having a sample project helps us in figuring out the issue and suggesting an appropriate solution accordingly.
You must be logged in to reply to this topic.