简体   繁体   中英

How to replace label line with dot in highcharts

I am trying to change label line with dot. The part of i want to change i took it in a circle as you see in below picture.

在此处输入图片说明

How can I do it in highchart.js ?

In general, it is not supported, but it is very easy to achieve. Simply wrap getMarkPath method and return path you want to use, for example, cirlce:

(function(H){
  H.wrap(H.Tick.prototype, 'getMarkPath', function(p, x, y, tickLength, tickWidth, horiz, renderer) {
    return renderer.symbols.circle(x - tickLength / 2, y - tickLength / 2, tickLength, tickLength);
  });  
})(Highcharts)

Demo: http://jsfiddle.net/9pj3kxr6/2/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM