- Home
- Forum
- ASP.NET MVC
- Unable to Render Chart
Unable to Render Chart
I'm having issues rendering the chart in my MVC app. I've followed all of the guides online but nothing is displaying.
Index.cshtml:
@(Html.EJ().Chart("chartContainer"))
_Layout.cshtml:
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - My ASP.NET Application</title>
@Styles.Render("~/Content/ej/web/bootstrap-theme/ej.web.all.min.css")
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@Scripts.Render("~/Scripts/jsrender.min.js")
@Scripts.Render("~/Scripts/jquery-1.10.2.min.js")
@Scripts.Render("~/Scripts/ej/web/ej.web.all.min.js")
@RenderSection("scripts", required: false)
@Html.EJ().ScriptManager()
Web.config
<compilation debug="true" targetFramework="4.5.2">
<assemblies>
<add assembly="Syncfusion.Linq.Base, Version=14.4400.0.15, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.EJ"/>
<add assembly="Syncfusion.EJ.Export, Version=14.4400.0.15, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.Compression.Base, Version=14.4400.0.15, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.XlsIO.Base, Version=14.4400.0.15, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.Pdf.Base, Version=14.4400.0.15, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.DocIO.Base, Version=14.4400.0.15, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.OfficeChart.Base, Version=14.4400.0.15, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.EJ.MVC"/>
</assemblies>
</compilation>
Views Web.config:
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization" />
<add namespace="System.Web.Routing" />
<add namespace="SyncFusionTest" />
<add namespace="Syncfusion.MVC.EJ" />
<add namespace="Syncfusion.JavaScript" />
<add namespace="Syncfusion.JavaScript.DataVisualization" />
</namespaces>
</pages>
</system.web.webPages.razor>
Is there anything that stands out?
Thanks
SIGN IN To post a reply.
3 Replies
DD
Dharanidharan Dharmasivam
Syncfusion Team
November 24, 2016 12:02 PM UTC
Hi Cory,
Thanks for using Syncfusion product.
We have analyzed your query and we suspect that UnobtrusiveJavaScriptEnabled is set to true, if so you have to refer ej.unobtrusive.min.js file. The main goal with unobtrusive is to reduce the weightage of the web page.
For more details on unobtrusive, kindly follow the below link,
You can find unobtrusive file from below location,
Location: C:\Users\username\AppData\Local\Syncfusion\EssentialStudio\XX.X.X.XX\Web\Samples\Web\Scripts\ej
Note : XX.X.X.XX denotes the product version which you have installed
Else you can also make UnobtrusiveJavaScriptEnabled to false in the Web.config file. Kindly find the code snippet below,
| Web.config <appSettings> <add key="webpages:Version" value="3.0.0.0" /> <add key="webpages:Enabled" value="false" /> <add key="ClientValidationEnabled" value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="false" /> </appSettings> |
For your reference we have attached the sample. Kindly find the sample from below location,
Sample Link: https://www.syncfusion.com/downloads/support/forum/127565/ze/WebApplication2-1026121770
Also to render the chart control, no need to refer SyncfusionTest dll, so you can remove it from the reference if it is added mistakenly.
Thanks,
Dharani.
CW
cory wynn
November 24, 2016 12:08 PM UTC
Thank you the issue has been resolved, installing:
Syncfusion.AspNet.Mvc5 rather than Syncfusion.AspNet.Mvc4
DD
Dharanidharan Dharmasivam
Syncfusion Team
November 25, 2016 04:48 AM UTC
Hi Cory,
Thanks for your update.
Kindly revert us, if you need further assistance on this.
Dharani.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
CW cory wynn
- Nov 23, 2016 04:22 PM UTC
- Nov 25, 2016 04:48 AM UTC