| <div class="grid-container"> <div class="grid1"> <ejs-accumulationchart id="chart-container" (loaded)="loaded($event)"> </ejs-accumulationchart> </div> <div class="grid2"> <ejs-accumulationchart id="chart-container1" (loaded)="loaded1($event)"> </ejs-accumulationchart> </div> </div> public loaded(args: IAccLoadedEventArgs): void { let element = document.getElementById('chart-container_Series_0'); let x = (args.accumulation.availableSize.width - element.getBoundingClientRect().width) / 2; element.setAttribute("transform","translate(" + x + ", 0)"); } public loaded1(args: IAccLoadedEventArgs): void { let element = document.getElementById('chart-container1_Series_0'); let x = (args.accumulation.availableSize.width - element.getBoundingClientRect().width) / 2; element.setAttribute("transform","translate(" + (-x) + ", 0)"); } |
| <div class="grid-container"> <div class="grid1" style="width: 120px"> <ejs-accumulationchart id="chart-container" (loaded)="loaded($event)" width=300 height=300> </ejs-accumulationchart> </div> <div class="grid2" style="width: 120px"> <ejs-accumulationchart id="chart-container1" (loaded)="loaded1($event)" width=300 height=300> </ejs-accumulationchart> </div> //... </div> public loaded(args: IAccLoadedEventArgs): void { let element = document.getElementById('chart-container_Series_0'); let x = (args.accumulation.availableSize.width - element.getBoundingClientRect().width) / 2; element.setAttribute("transform","translate(" +( -x) + ", 0)"); } public loaded1(args: IAccLoadedEventArgs): void { let element = document.getElementById('chart-container1_Series_0'); let x = (args.accumulation.availableSize.width - element.getBoundingClientRect().width) / 2; element.setAttribute("transform","translate(" + (-x) + ", 0)"); } //... |
"To reduce the space in semi pie chart, we have already logged the feature and which will be available in Essential Studio volume 4 main release."
Did this ever become a feature? If so, can you explain how to use the feature to reduce space around a SEMI PIE chart?
Hi Jason,
Greetings from Syncfusion.
Minimum of chart width and height will be considered as the pie radius. If the height for the chart container is too high, then the space will occur in case of height. So we suggest to reduce the height or width for the chart based on your requirement and also we suggest you to change center y value or x value to move the pie upper or lower based on the white space rendered.
More information about the pie center can be found here :
https://ej2.syncfusion.com/documentation/accumulation-chart/pie-dough-nut/#pie-center
Please get back to us if you need further assistance.
Regards,
Swetha