Area Charts
1 dataset filling modes have been introduced in version 2.6.02 prior version 2.6.0, boundary values was'zero'
,'top'
,'bottom'
(deprecated)3 for backward compatibility,fill: true
(default) is equivalent tofill: 'origin'
Example
Configuration
Option | Type | Default | Description |
---|---|---|---|
Boolean | true | Fill propagation when target is hidden |
If true
, the fill area will be recursively extended to the visible target defined by the fill
value of hidden dataset targets:
new Chart(ctx, {
data: {
datasets: [
{fill: 'origin'}, // 0: fill to 'origin'
{fill: 1}, // 2: fill to dataset 1
{fill: false}, // 3: no fill
{fill: '-2'} // 4: fill to dataset 2
]
},
options: {
plugins: {
propagate: true
}
}
}
})
propagate: true
:
- if dataset 2 is hidden, dataset 4 will fill to dataset 1