confusedDude
Posts: 21
Joined: Wed Jul 27, 2022 9:31 am

Timeline Chart different bar lenghts.

Hei. I need to make a timeline chart.

Is there a way to set different bar sizes? see image.

https://imgur.com/TZDpbFG

I have to different approaches is mind:
1. Set epochtimers for each data series, like
data: [
{
startTime: 123124141
endTime: 123123131
name: firstEvent
},
{
startTime: 123124141
endTime: 123123131
name: SecondEvent
}
]


2. Or maybe better yet. a total value. Say total is 100 days(100%). First event is 30 days, second is 70 days. Then the first bar is 30% of total lenght, and second is 70% of total length.

Morten
User avatar
dawid.d
Posts: 807
Joined: Thu Oct 06, 2022 11:31 am

Re: Timeline Chart different bar lenghts.

Hello,

Thanks for contacting us with your question!

The API doesn't allow setting the length of the timeline bars in any simple way, but you might consider setting events on the datetime axis as in the demo below.

Demo: https://jsfiddle.net/BlackLabel/h92b4gf5/

I hope you will find it useful
Best regards!
Dawid Draguła
Highcharts Developer

Return to “Highcharts Usage”