score:1

Accepted answer

So by default in Highcharts, your point contains 4 main attributes which you can specify. Its x and y value, its name, and color. API reference: https://api.highcharts.com/highcharts/series.line.data

If you'd like your point to have some more attributes you can add them and e.g use one of them in the tooltip. Something like that: https://jsfiddle.net/BlackLabel/k49z8mv0/

Highcharts.chart('container', {
 chart: {
  zoomType: 'x'
 },
 xAxis: {
  type: 'datetime'
 },
 yAxis: {
  title: {
   text: 'test'
  }
 },
 legend: {
  enabled: false
 },
 tooltip: {
  formatter: function() {
   return 'Point value is: ' + this.y + '<br/>The total time in Second 
    equals: ' + this.point.totalTimeInSeconds + '<br/>' + 
    Highcharts.dateFormat('%Y-%m-%d', this.point.beginTimeSeconds) + ' - 
    ' + Highcharts.dateFormat('%Y-%m-%d', this.point.endTimeSeconds);
  }
},
series: [{
type: 'line',
name: 'Test',
data: [{
    x: 1167609600000,
    y: 0.7537,
    beginTimeSeconds: 1626145840,
    endTimeSeconds: 1626232240,
    totalTimeInSeconds: 0
  },
  {
    x: 1167696040000,
    y: 0.7537,
    beginTimeSeconds: 1626145840,
    endTimeSeconds: 1626232240,
    totalTimeInSeconds: 1
  }
]
}]
});

If that doesn't answer your question please precise what the issue is.


Related Query