0
我想在我的Highcharts圖表上繪製箭頭,並且到目前爲止提出了this。看起來不錯,但有問題:Highcharts路徑上的SVG標記
- 較高的筆劃寬度會給出較長的箭頭。
- 旋轉箭頭將需要複雜的計算,如here。
如果我可以使用在Highcharts路徑like in this SVG tutorial繪製箭頭的SVG標記將變得更加容易
我的代碼:
renderer.path(['M', 200, 0, 'L', 200, 200,'L', 225, 200,'L',200,250,'L', 175, 200,'L', 200, 200])
.attr({
'stroke-width': 5,
stroke: 'red',fill:'red'
})
.add();
renderer.path(['M', 400, 0, 'L', 400, 200,'L', 425, 200,'L',400,250,'L', 375, 200,'L', 400, 200])
.attr({
'stroke-width': 50,
stroke: 'red',fill:'red'
})
.add();
不知道這是真的有用,但是可能你周圍的箭頭中心旋轉,所以這將是有點像這個.. http://jsfiddle.net/ZS9wj/1 / – Ian