How to make chart responsive when side bar hide and unhide?
i use reactjs typescript
|
<AccumulationChartComponent id='acccharts' ref={chart => this.accchartInstance = chart}></AccumulationChartComponent>
<ChartComponent id='charts' ref={chart => this.chartInstance = chart}> </ChartComponent>
//close the sidebar
closeClick() {
this.chartInstance.refresh();
this.accchartInstance.refresh();
}
//open the sidebar
openClick() {
this.chartInstance.refresh();
this.accchartInstance.refresh();
} |
Hi Asep,
Most welcome. Please get back to us if you need any further assistance. We are always happy in assisting you.
Regards,
Durga G
Hi,
I have similar issue,
how i did it in react hooks?
thanks!
| <AccumulationChartComponent id='acccharts'></AccumulationChartComponent> <ChartComponent id='charts'> </ChartComponent> //close the sidebar closeClick() { var chartObj = document.getElementById("charts").ej2_instances[0]; var accObj = document.getElementById("acccharts").ej2_instances[0]; chartObj.refresh(); accObj.refresh(); } //open the sidebar openClick() { var chartObj = document.getElementById("charts").ej2_instances[0]; //... chartObj.refresh(); //..... } |