【发布时间】:2018-10-04 06:48:27
【问题描述】:
我正在使用highcharts libaray 来渲染饼图。 Stackblitz 演示 here
为了呈现货币和百分比切换的两个额外按钮,我使用了 SVG Renderer 在中心标题下方添加和居中按钮:
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();
在全尺寸窗口上,饼图看起来很正常,但在减小浏览器尺寸时按钮会变得混乱。 如何在浏览器调整大小时重新定位按钮。
图片如下:
- 全尺寸:
- 调整小屏幕:
【问题讨论】:
-
你已经给出了按钮位置的精确坐标,将其更改为动态
-
@PandiyanCool 怎么样?
标签: javascript html css angular highcharts