score:1

Accepted answer

Turns out I was returning ticks instead of milliseconds from 1/1/1970

So...

Dim dt1970 As DateTime = New DateTime("1970", "1", "1")
Dim d As DateTime = row("myDateFromDB")
Dim span As TimeSpan = d - dt1970

Dim milli as long = span.TotalMilliseconds

score:1

Highcharts accepts three primary formats for data:

  • A simple array (e.g. [1, 2, 3])
  • An array of arrays of x, y pairs (e.g. [[x, y], [x2, y2]])
  • A list of point objects

Further details on these formats can be found in the highcharts documentation. However, in your case, it should be quite easy. Just do something like the following.

var data = []; //assume data is the array you've listed in your question

var chart = new Highcharts.chart({
    xAxis: {
        title: {
            text: 'Time'
        },
        type: 'datetime'
    },
    series: [{
        data: data
    }]
});

Related Query

More Query from same tag