How to show multiple same date on timeline chart in highchart

55 views Asked by At

I'm using highchart and I need to show timeline chart but there are multiple same dates which I need to show on timeline but I'm not sure how to show multiple same dates. https://www.highcharts.com/docs/chart-and-series-types/timeline-series

Max I can show two same dates. Does any one faced this problem ? if yes, any idea hoq to resolve it ?

2

There are 2 answers

4
ppotaczek On BEST ANSWER

You can set individual positions for data labels which belong to points with the same x value. For example:

  series: [{
    data: [{
      x: Date.UTC(1969, 6, 20),
      name: 'First space station',
      label: 'A',
      description: 'A1'
    }, {
      x: Date.UTC(1969, 6, 20),
      name: 'First space station',
      label: 'A',
      dataLabels: {
        y: 40
      },
      description: 'A2'
    }, ...]
  }]

Live demo: https://jsfiddle.net/BlackLabel/6vkm4za9/

API Reference: https://api.highcharts.com/highcharts/series.timeline.data.dataLabels

1
Ali Mashal On

if they have same date. but different label or title yes you can show them in chart. but if they are all same you can show the number of data on that date