score:1

Accepted answer

In D3 (any version), range() accepts an array.

Your xScale right now has this range:

.range(0, hackWidth);

However, it has to be:

.range([0, hackWidth]);

Here is the updated plunker: https://plnkr.co/edit/DB0VVRsGQO4teIC6ltyQ?p=preview


Related Query