- Home
- Forum
- ASP.NET MVC
- I am getting reference error "does not contain definition for chart" in .cshtml file
I am getting reference error "does not contain definition for chart" in .cshtml file
I am using Pie chart, after building its model and passing model from controller to view i get following error in cshtml on "Html.Chart" that it does not contain definition for chart, even i am referencing all of the dlls mentioned in the "http://help.syncfusion.com/ug/asp.net%20mvc/default.htm#!documents/dlls.htm"
code for cshtml is here
@(new HtmlString(Html.Chart("SimpleChart",(MVCChartModel)ViewData.Model).ToString()))
i am following this sample URL
http://help.syncfusion.com/ug/asp.net%20mvc/default.htm#!documents/chartmodel33.htm
i am referencing all of the dlls listed here
•Syncfusion.Core.dll
•Syncfusion.Chart.Mvc.dll
•Syncfusion.Chart.Base.dll
•Syncfusion.Compression.Base.dll
•Syncfusion.DocIO.Mvc.dll
•Syncfusion.Linq.Base.dll
•Syncfusion.Shared.Mvc.dll
•Syncfusion.Shared.Base.dll
•Syncfusion.PdfIO.Mvc.dll
•Syncfusion.XlsIO.Base.dll
•AjaxMin.dll
•Syncfusion.Theme.Base.dll
i am using asp.net MVC 4.0
Please give solution for the missing reference.
Attachment: error_80ae9487.zip
Hi
Raja,
Thanks
for using syncfusion product. We have analyzed your requirements and we like to
inform you that,
After
adding DLL you need to do following steps as follows,
1.
In web configuration file, all the referenced
Syncfusion assemblies should be registered in the <assemblies> section,
namespace should be added for the assemblies in <namespaces> section
[web.config]
<code>
<assemblies>
<add assembly="Syncfusion.Core,
Version=12.2400.0.36, Culture=neutral, PublicKeyToken=632609B4D040F6B4" />
<add assembly="Syncfusion.Shared.Mvc,
Version=12.2300.0.36, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.Linq.Base, Version=12.2400.0.36,
Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.Theme.Base,
Version=12.2400.0.36, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.Tools.Mvc,
Version=12.2300.0.36, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.Chart.Base,
Version=12.2400.0.36, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.Chart.Mvc,
Version=12.2300.0.36, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.Compression.Base,
Version=12.2400.0.36, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.Shared.Base,
Version=12.2400.0.36, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.XlsIO.Mvc,
Version=12.2300.0.36, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.Pdf.Base,
Version=12.2400.0.36, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.DocIO.Mvc,
Version=12.2300.0.36, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
</assemblies>
<namespaces>
<add namespace="System.Web.Helpers" />
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
<add namespace="System.Web.WebPages" />
<add namespace="System.Drawing" />
<add namespace="Syncfusion.Mvc.Shared" />
<add namespace="Syncfusion.Mvc.Tools" />
<add namespace="Syncfusion.Mvc.Chart" />
<add namespace="Syncfusion.Windows.Forms.Chart" />
</namespaces>
</code>
And handlers for rendering chart should be added in <httpHandler>
and <handlers> section.
Please refer the following online documentation link for
adding code to web configuration file.
http://help.syncfusion.com/ug/asp.net%20mvc/default.htm#!documents/addcodestothewebconf.htm
2.
Essential Chart also requires scripts and style
sheets for user interactive features like tooltip, zooming, toolbar, context
menu, etc., which should be added in the page that renders chart.
Please refer the following online documentation link for
adding style sheets required for chart.
http://help.syncfusion.com/ug/asp.net%20mvc/default.htm#!documents/addstylemanager.htm
Please refer the following online documentation link for
adding scripts required for user interaction in Essential Chart.
http://help.syncfusion.com/ug/asp.net%20mvc/default.htm#!documents/addscriptmanager.htm
We
have prepared a simple sample based on your requirement.
Please
find the attached sample.
Please
let us know if you have any concern.
Regards,
Akbar Basha KM.
Attachment: SyncfusionMvcApplication3_743b9ae9.zip
- 3 Replies
- 2 Participants
-
RA Raja
- Oct 28, 2014 02:15 PM UTC
- Oct 31, 2014 07:41 AM UTC