Chart resizing?

I have a bar chart with its content width (100%) of it's container. the container is resizable. But the chart does not change at all when resizing.  So when the container getting smaller, the chart is simply got clipped. Am I missing something, or the chart does not change once it is drawn?


Thanks,


John


1 Reply

DG Durga Gopalakrishnan Syncfusion Team December 10, 2021 03:12 PM UTC

Hi John, 

We suggest you to use chart refresh method to re-render chart based on resized container height and width after resizing. Please check with the below snippet. 

<ejs-chart ref=chart id="container"></ejs-chart> 
methods:{ 
        onChange: function (e) {         
        this.$refs.chart.ej2Instances.refresh(); 
    }, 
  } 
<style> 
.e-chart { 
  height : inherit !important; 
  width : inherit !important; 
} 
</style> 

Kindly revert us if you have any concerns. 

Regards, 
Durga G 


Loader.
Up arrow icon