This variation of a line chart uses a gradient to change the line color based on its y-value. For a related technique along the x-axis, see variable-color line. Using Observable Plot’s concise API, you can get a quick approximation of that chart (below). For a more elaborate solution with a gradient encoding, see this notebook.
![Gradient encoding](https://cdn-ak-scissors.b.st-hatena.com/image/square/e456f98ead38d6340b7fe5de4bf97e04552c89ca/height=288;version=1;width=512/https%3A%2F%2Fstatic.observableusercontent.com%2Fthumbnail%2F685ea859902816ca430a621ec6790821c64275e883f1ff47cce8ce2b4e3d0940.jpg)