<div id="container">
@Html.EJS().Chart("container).Render()
</div>
<script>
$(function () {
$("#container").resizable({
resize: function () {
var chart = document.getElementById('container').ej2_instances[0];
chart.refresh();
}
});
});
</script> |
$(document).ready(function () {
$('#sidebarCollapse').on('click', function () {
var chart = document.getElementById('container').ej2_instances[0];
if ($('#sidebar')[0].style.display == 'none') {
$('#sidebar').show();
} else {
$('#sidebar').hide();
}
chart.refresh();
});
}); |