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.
Syncfusion Feedback

Refresh Chart in PartialView

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hello,
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 ?
Thanks



Attachment: RefreshChart_eeca3c33.zip

mumfie
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 
 
[Partial.cshtml] 
 
@{Html.RenderPartial("Index");} 
 
[Index.cshtml] 
 
<div> 
    <ej-chart id="container"> 
    </ej-chart> 
</div> 
 
 
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. 
 
Regards, 
Saravana Kumar K. 


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

Thanks



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. 
 
Regards, 
Saravana Kumar K. 


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.

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

;