79445058

Date: 2025-02-17 10:13:57
Score: 0.5
Natty:
Report link

You can (and most likely should) stick to datetime xAxis type, just add proper timestamp data to your series data like so:

const weatherData = data.weather;
    
const temperatureData = weatherData.map(entry => ({
  x: new Date(entry.timestamp).getTime(),
  y: entry.temperature
}));
    
const pressureData = weatherData.map(entry => ({
  x: new Date(entry.timestamp).getTime(),
  y: entry.pressure_msl
}));

You can further adjust the xAxis labels display based on the API: https://api.highcharts.com/highcharts/xAxis.dateTimeLabelFormats

Here is your demo working well: https://jsfiddle.net/BlackLabel/c62uy7gz/

Kind regards,

Reasons:
  • Blacklisted phrase (1): regards
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Andrzej Bułeczka