score:1

Accepted answer

you need to map your data to the format required by highcharts. in your case:

  • an array of arrays with [x, y] values:

    series: [{
      data: jsondata2.time.map((x, index) => [x, jsondata2.volt[index]])
    }]
    
  • or an array of objects with { x, y } values:

    series: [{
      data: jsondata2.time.map((x, index) => ({ x: x, y: jsondata2.volt[index]}))
    }]
    

live demo: https://codesandbox.io/s/fancy-cloud-mx9z-mx9ze?file=/index.js

api reference: https://api.highcharts.com/highcharts/series.line.data


Related Query

More Query from same tag