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.