I'm having the first error exposed here how it was solved???
The issue with the chart reference.
Thanks,
Hi Manuel,
Thanks for using Syncfusion products.
1)Chart Control
We suspect the cause of issue may be because of not adding required namespace in web.config file. Please refer the below
[Web.config]
<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.Chart" />
<add namespace="Syncfusion.Windows.Forms.Chart" />
<add namespace="Syncfusion.Mvc.Tools" />
</namespaces>
If you are using razor sample check this in web.config file available in Views folder. However we have created a simple sample. Please refer the attachment.(Sample_ChartControl)
Also, we are providing Syncfusion project template support to create sample in MVC platform. Please refer the following steps to create a simple chart sample by using template,
1)Open VS2010
2)Choose File->New->Project->New Project dialog opened(Refer projectdialog.png)
3)Choose Syncfusion MVC from this dialog and select Razor MVC3 sample (Refer Projectdialog.png)
4) Select Chart from Syncfusion Wizard and click “Next” button from wizard (Refer SynnWizard.png)
5) Select Theme if you set for control and then click “Done” button from wizard
The chart assemblies and namespace information added in web config files.
2)ChartAdv( Html5 control)
We have created a simple sample for ChartAdv control in MVC platform. Please refer the attachments for this sample(Sample_ChartAdv)
The following steps to create a simple application with ChartAdv control.
1)Create new MVC3 Razor application(Sample_ChartAdv) in VS2010
2) Added below reference assembly in Sample_ChartAdv application
· Syncfusion.Core,
· Syncfusion.Chart.Mvc
· Syncfusion.Shared.Mvc
3) Added code in web config for above assembly and namespace(Refer screenshot webconfig)
4) Added Resource registration to an application (Refer screenshot Layout)
5)Added code for ChartAdv control in view and controller page.
Note: We must add “Syncfusion.Mvc.ChartAdv” namespace in webconfig file for ChartAdv control. Also, we have no separate option to choose ChartAdv(HTML5) from Syncfusion project Template.
Please let us know if any concerns.
Regards,
Vijayabahrathi
Hi Alok,
Thanks for using Syncfusion products.
By default, razor encodes the HTML. So, we need to use “HtmlString” to render the chart using property model in razor application and also prevent the HTML encoding. In builder model, we are using Render()(for Htmlstring) method to render the chart control. If we are not use “HtmlString” in property model, we got script error due to lack of HtmlString to renderer the control in razor application.
Regards,
Vijayabharathi