Custom Scales

d3 uses the concept of scales to define how data will be plotted along the axes. By default the column chart assumes the y scale will always be linear and the x scale will always be ordinal. However, this can easily be changed by overriding the scales, which we'll see in the following example, where we want a column chart that has linear axes for both X and Y.

JavaScript Code