This example demonstrates how to create a custom Cartesian projection by implementing a geometry transform on top of two linear scales; the geometry transform is then used in lieu of a geographic projection, which are intended for displaying spherical geometry.
https://d3js.org/d3.v4.min.js