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

Refresh Chart in PartialView

Thread ID:





133000 Oct 3,2017 03:29 PM UTC Oct 5,2017 06:35 AM UTC ASP.NET Core 4
Tags: Chart
Asked On October 3, 2017 03:29 PM UTC

I am trying to refresh the data within a chart defined in a partial view. The initial call
to  @{Html.RenderPartial("_SummaryChart");} generates a javascript error Uncaught ReferenceError: $ is not defined which prevents the chart being display.
Subsequnetly clicking the Update button shows the chart correctly.

I tried using load etc but was unable to overcome the error.
The examples I found on the forum seem to be prior to .NET Core 1.1 and vs2017.
Any ideas please ?

Attachment: RefreshChart_eeca3c33.zip

Replied On October 3, 2017 06:34 PM UTC

To overcome error I have changed main view to use @Html.Partial("_SummaryChart") instead and reordered the included scripts so jquery.js is included prior to the chart.

I would however be interested to see recommended solution to refresh chart.

Saravana Kumar Kanagavel [Syncfusion]
Replied On October 4, 2017 11:46 AM UTC

Hi Colin, 
Thanks for contacting Syncfusion Support. 
We have analyzed your query and tried to reproduce the reported issue in our sample but not able to reproduce the reported issue at our end. In the sample ,we have rendered the chart using partial view. 
Please refer the code example below 
    <ej-chart id="container"> 
And we have prepared the sample using partial view for your reference and attached in the below location. 
Please find the output of the sample below 
And if you still face any concern, kindly revert us with issue reproducing runnable sample or modified the attached sample along with replication steps to provide the exact solution sooner. 
Please let us know if you have any concern. 
Saravana Kumar K. 

Replied On October 4, 2017 03:42 PM UTC

Thank you for the sample. It seems to be working now. I had to move the jquery include file nearer to top of page.

The error was on a page containing numerous other third party jquery components from different vendors.


Saravana Kumar Kanagavel [Syncfusion]
Replied On October 5, 2017 06:35 AM UTC

Hi Colin, 
Thanks for your update. 
Please let us know if you need any other assistance on this. 
Saravana Kumar K. 


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