I have animated moving label
plotbandLabel.animate({
y : yAxis.toPixels(y) - labelOffset
}, {
duration : 500,
step : function () {
this.attr({
text : yAxis.toValue(this.y + labelOffset).toFixed(2),
zIndex : 999999999
})
},
complete : function () {
this.attr({
text : y.toFixed(2),
zIndex : 999999999
})
}
});
Here is the full example: http://jsfiddle.net/7yo3nht4/ And I need this label to be shaped like an arrow:
If you omit
fill
property inrenderer.label
the label's box won't be created:Then you can create a custom path and append it to the
plotbandLabel
SVG group:Live demo: http://jsfiddle.net/kkulig/hqyfpsw4/
API reference: https://api.highcharts.com/class-reference/Highcharts.SVGRenderer#path
The label renderer has this form:
So if
useHTML=true
the string could be an HTML string like this:and applying a proper CSS:
You can obtain an arrow box as a label.
Check the fiddle updated: http://jsfiddle.net/beaver71/eenjkv5c/