We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Unable to Render Chart

Thread ID:

Created:

Updated:

Platform:

Replies:

127565 Nov 23,2016 11:22 AM Nov 24,2016 11:48 PM ASP.NET MVC 3
loading
Tags: Chart
cory wynn
Asked On November 23, 2016 11:22 AM

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

Dharanidharan Dharmasivam [Syncfusion]
Replied On November 24, 2016 07:02 AM

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, 
  
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. 


cory wynn
Replied On November 24, 2016 07:08 AM

Thank you the issue has been resolved, installing:

Syncfusion.AspNet.Mvc5  rather than Syncfusion.AspNet.Mvc4


Dharanidharan Dharmasivam [Syncfusion]
Replied On November 24, 2016 11:48 PM

Hi Cory, 

Thanks for your update. 

Kindly revert us, if you need further assistance on this. 

Dharani. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;