w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
d3 time scale x axis with unix timestamp

The problem is that Javascript Date objects (into which you are implicitly converting your timestamps) are not timestamps in seconds, but in milliseconds. If you multiply all your time values by 1000, it works.

Complete example here. I've also made the conversion to Dates explicit.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.