score:1

Accepted answer

the problem here is that format() function returns a string:

// in console:
moment().format("x")
"1522407551509"

highcharts expect the x coordinate to be a number.

you can use parseint() for the conversion:

console.log(parseint(moment().format("x")))
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.21.0/moment.min.js"></script>


Related Query

More Query from same tag