in my javascript I defined how to populate a LineChart
of Highcharts
. This is populated with the data given by a database. The x-axis of the chart is of datetime
type and the x-value is DateTime
type.
xAxis: {
type: 'datetime',
labels: {
formatter: function () {
return Highcharts.dateFormat('%d %b - %H:%M:%S', this.value);
}
}
},
lineCharts[index].series[roiIndex].addPoint([point.creationDateTime, point.result]);
but what I see is the following:
I can't find the solution..does anyone have an idea? Thanks!
EDIT
Now creationDateTime is the epoch time expressed in milliseconds:
DateTime date = roi.created_at;
var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
var creationDateTimeEpoch = Convert.ToInt64((date - epoch).TotalMilliseconds);
infact, the value is that converted with https://www.epochconverter.com/ corresponds to the correct value. But now I see the series
.