Filled areas below lines

These examples show how to fill an area using lines.

The basic structure of the code is as follows.

You can also specify a single number or an array of numbers as a value to the fillToValue-property.

In the following examples fillToValue is specified with an array (instead of a constant number).

The last example is a bit more complicated but the basic idea is same as the previous example. In this example we use two arrays to specify the fillToValue. If you set the NaN (not a number), the corresponding data will be ignored.