Link to home
Start Free TrialLog in
Avatar of shanker702
shanker702

asked on

How to access Chart Control in VS 2013?

So I'm working on a web app in Visual Studio 2013. Its in VB.Net, using MVC 5. I cannot figure out how to use Chart Control in my views. It never shows up in the toolbox, and if i click to show all, it is grayed out so I can't add it into my view. What do I need to do? We were using jqPlot to implement our charts but the sponsor of the project wants the chart itself to export to excel workbooks, which I can only find working using Chart Control.
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

You have to use Controller actions to return a chart. You cannot drag and drop it like you do in ASP.NET

Check following example

http://www.codeproject.com/Articles/125230/ASP-NET-MVC-Chart-Control
If you need the chart in the toolbox, you can drag the dll from C:\Program Files (x86)\Microsoft Chart Controls\Assemblies (by default), to the toolbox. Or right click on the toolbar, "Choose items..."

Hope this helps.
Kishan
Avatar of shanker702
shanker702

ASKER

When I try to import the System.Web.UI.Datavisualization.Charting into the controller, it gives me an error saying that namespace cannot be found. I've downloaded Chart Control and installed it a couple times, but its still not working.
ASKER CERTIFIED SOLUTION
Avatar of Kishan Zunjare
Kishan Zunjare
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial