Dylan Cristy
Posts: 13
Joined: Fri Oct 30, 2015 8:44 pm

How to use a different shape as the milestone marker?

Hi,

How can you define a different shape for milestone markers? I would like to use a triangle instead of the default diamond shape.

If this requires using the API to change some setting in the chart after it has loaded and then telling it to redraw, I'm fine with that.

Thanks,

Dylan
Dylan Cristy
Posts: 13
Joined: Fri Oct 30, 2015 8:44 pm

Re: How to use a different shape as the milestone marker?

This was answered on StackOverflow (https://stackoverflow.com/a/68542489/988264)
As you can see in the Highcharts Gantt source code: https://github.com/highcharts/highchart ... es.ts#L202

shape for milestone can not be set through API options.

The simplest solution is to replace diamond function with the built in triangle function.

Code: Select all

(function(H) {
    H.Renderer.prototype.symbols.diamond = H.Renderer.prototype.symbols.triangle
})(Highcharts);

Live demo: https://jsfiddle.net/BlackLabel/9zuodLjt/

Docs: https://www.highcharts.com/docs/extendi ... highcharts
User avatar
sebastian.h
Posts: 1734
Joined: Fri Aug 07, 2020 7:08 am

Re: How to use a different shape as the milestone marker?

Hi,
Thanks for the note, for future try to use one channel support.

Regards.
Sebastian Hajdus
Highcharts Developer

Return to “Highcharts Gantt”