Search⌘ K
AI Features

The ‘scaleQuantile()’ Scale

Explore the D3.js quantile scale to understand how it maps continuous input into discrete output buckets. Learn its application in distributing data evenly into color ranges, ideal for creating balanced visualizations like heatmaps. This lesson guides you through using the quantile scale effectively to represent data distribution in color-coded charts.

The next scale we will learn about is called the quantile scale. It is another scale that can perform a similar task to the quantize scale. We are going to use it for mapping our data to colors.

The quantile scale will accept a continuous input domain, and it will transform the data into discrete data. Since we are transforming the data into discrete data, we need to provide a list of possible values.

We are ...