score:1

Accepted answer

You can use momentjs to convert your date to epoch time.

Here is a sample.

var ADBE = [
    ['2019-04-02 21:35:04',23.17],
    ['2019-04-02 22:35:04',23.78],
    ['2019-04-02 23:35:04',24.10],
    ['2019-04-03 20:35:04',23.86],
    ['2019-04-03 21:35:04',24.54]
	];
	
	ADBE = ADBE.map(function(data) { return [moment(data[0], "YYYY-MM-DD HH:mm:ss").valueOf(), data[1]]});
Highcharts.stockChart('container', { 

    rangeSelector: {
        selected: 1
    },

    legend: {
        enabled: true,
        layout: 'vertical',
        align: 'right',
        verticalAlign: 'top',
        y: 100
    },

    series: [{
        name: 'ADBE',
        data: ADBE
    }]
});
<div id="container" style="height: 400px; min-width: 600px"></div>

<script src="https://code.highcharts.com/stock/highstock.js"></script>
<script src="https://code.highcharts.com/stock/modules/exporting.js"></script>
<script type="text/javascript" src="https://www.highcharts.com/samples/data/three-series-1000-points.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>


Related Query

More Query from same tag