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

Chart not loading second time in partial view

Thread ID:

Created:

Updated:

Platform:

Replies:

141741 Jan 2,2019 04:19 AM UTC Jan 2,2019 06:57 AM UTC ASP.NET MVC - EJ 2 1
loading
Tags: Chart
jsu
Asked On January 2, 2019 04:19 AM UTC

Hi Team,

I use partial view to render chart and it is working fine at the first time.
However, in Ajax success method I call partial view to render the chart and it does not work.
Please help me on this.


Thanks in advance



Dharanidharan Dharmasivam [Syncfusion]
Replied On January 2, 2019 06:57 AM UTC

Hi Jsu, 
 
We have analyzed your query with provided information. We have tried to replicate the reported issue, we are afraid that we can’t replicate the reported scenario at our end. Consider the following sample, here we have rendered refreshed the chart from partial view in button click event using the ajax request which is working fine. Find the code snippet below to achieve this. 
 
[Index.cshtml] 
 
<div class="row" style="margin-top:10px"> 
    <button onclick="refreshChart()">Refresh Charts</button> 
</div> 
 
Initial rendering of chart 
<div class="row" id="sensorContentContainer"> 
    @Html.Partial("_viewChart"); 
</div> 
 
<script> 
Refreshed the chart in ajax request 
    function refreshChart() { 
    $.ajax({ 
         url: '@Url.Action("Create")', 
         type: 'GET', 
        success: function (response) { 
            $('#sensorContentContainer').html(response); 
           } 
        }); 
    } 
</script> 
 
 
Screenshot 
Before Refresh: 
 
After Refresh: 
 
 
Since, we are not aware of the exact scenario on which the issue is reproduced. We would like to know the following details which will be helpful in further analysis and provide you the solution sooner. 
  
  • Try to reproduce the reported scenario with the above sample and revert us.
  • Provide your sample with replication steps.
  • Or else provide your code snippet.
  • Do you have got any console errors if so, kindly share the details.
 
Regards, 
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.

Please sign in to access our forum

This page will automatically be redirected to the 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

;