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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Load dynamic Partial View with Chart OR Grid

Thread ID:





132211 Aug 21,2017 09:17 AM UTC Aug 23,2017 01:52 PM UTC ASP.NET Core 1
Tags: Chart
Asked On August 21, 2017 09:17 AM UTC


      Here, i have to create  chart as a view component but , it should  not load dynamically. here i attached my sample.



partial view(_testPartial.cshtml)




Dharanidharan Dharmasivam [Syncfusion]
Replied On August 23, 2017 01:52 PM UTC

Hi Tamil, 

Thanks for contacting Syncfusion support. 

We have analyzed your query. We would like to let you know that in the layout page we have specified script manager and other scripts which are required to render the chart control. In the partial view this will not be referred, so the chart will not render. So, in the partial view you need to specify the _Layout.cshtml page as highlighted below. We have prepared a sample for depicting this scenario. Find the code snippet below to achieve this requirement. 

ASP.NET Core: 

Partial View page(chart.cshtml) 

    Layout = "~/Views/Shared/_Layout.cshtml"; 

<ej-chart id="container"></ej-chart> 

<button onclick="changeDataSource()">Ajax</button> 
function changeDataSource() { 

 public ActionResult ChartData() 
            return PartialView("chart"); 

In the above code example in the ajax request we have returned to partial view where we have rendered simple chart. Also kindly refer the ej.web.all file locally, if you have referred online link, then specify some time delay to render chart control. You can change this with respect to your scenario. 


Sample for reference can be find from below link. 

If your query is misunderstood at our end, kindly revert us with more information on your query. 



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon