Utilizing the highcharts library to display a pie chart. Check out the Stackblitz demo here
In order to incorporate two additional buttons for currency and percent toggle, I have employed the SVG Renderer to position and align these buttons below the center title:
this.curBtn = this._chartPosition.renderer.button('$', 330, 220, (function(){
console.log(false);
}).bind(this),normalState,normalState1,pressedState,null,null).add();
this.prcBtn = this._chartPosition.renderer.button('%', 344, 220, (function(){
console.log(true);
}).bind(this),normalState1,normalState1,pressedState,null,null).add();
The pie chart displays correctly on a full-size window but when resizing the browser, the buttons become misaligned. How can I adjust the button positions upon browser resize?
Here are images demonstrating the issue:
- Full size:
https://i.sstatic.net/1WLsR.png
- Resize smaller screen: