| Stacked value below <sup>4</sup> | `string` | `'stack'` |
| Axis value | `object` | `{ value: number; }` |
-> <sup>1</sup> for backward compatibility, `fill: true` (default) is equivalent to `fill: 'origin'`<br/>
+> <sup>1</sup> for backward compatibility, `fill: true` is equivalent to `fill: 'origin'`<br/>
**Example**
datasets: [{
label: 'My First Dataset',
data: [65, 59, 80, 81, 56, 55, 40],
- fill: false,
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(255, 159, 64, 0.2)',
| [`borderWidth`](#line-styling) | `number` | Yes | - | `3`
| [`clip`](#general) | `number`\|`object` | - | - | `undefined`
| [`cubicInterpolationMode`](#cubicinterpolationmode) | `string` | Yes | - | `'default'`
-| [`fill`](#line-styling) | `boolean`\|`string` | Yes | - | `true`
+| [`fill`](#line-styling) | `boolean`\|`string` | Yes | - | `false`
| [`hoverBackgroundColor`](#line-styling) | [`Color`](../general/colors.md) | Yes | - | `undefined`
| [`hoverBorderCapStyle`](#line-styling) | `string` | Yes | - | `undefined`
| [`hoverBorderColor`](#line-styling) | [`Color`](../general/colors.md) | Yes | - | `undefined`
pointBackgroundColor: 'rgb(255, 99, 132)',
pointBorderColor: '#fff',
pointHoverBackgroundColor: '#fff',
- pointHoverBorderColor: 'rgb(255, 99, 132)',
- fill: true
+ pointHoverBorderColor: 'rgb(255, 99, 132)'
}, {
label: 'My Second Dataset',
data: [28, 48, 40, 19, 96, 27, 100],
pointBackgroundColor: 'rgb(54, 162, 235)',
pointBorderColor: '#fff',
pointHoverBackgroundColor: '#fff',
- pointHoverBorderColor: 'rgb(54, 162, 235)',
- fill: true
+ pointHoverBorderColor: 'rgb(54, 162, 235)'
}]
},
options: {
| [`hoverBorderJoinStyle`](#line-styling) | `string` | Yes | - | `undefined`
| [`hoverBorderWidth`](#line-styling) | `number` | Yes | - | `undefined`
| [`clip`](#general) | <code>number|object</code> | - | - | `undefined`
-| [`fill`](#line-styling) | <code>boolean|string</code> | Yes | - | `true`
+| [`fill`](#line-styling) | <code>boolean|string</code> | Yes | - | `false`
| [`label`](#general) | `string` | - | - | `''`
| [`order`](#general) | `number` | - | - | `0`
| [`tension`](#line-styling) | `number` | - | - | `0`
| `borderJoinStyle` | `string` | `'miter'` | Line join style. See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin).
| `capBezierPoints` | `boolean` | `true` | `true` to keep Bézier control inside the chart, `false` for no restriction.
| `cubicInterpolationMode` | `string` | `'default'` | Interpolation mode to apply. [See more...](./charts/line.mdx/#cubicinterpolationmode)
-| `fill` | `boolean`\|`string` | `true` | How to fill the area under the line. See [area charts](../charts/area.md#filling-modes).
+| `fill` | `boolean`\|`string` | `false` | How to fill the area under the line. See [area charts](../charts/area.md#filling-modes).
| `stepped` | `boolean` | `false` | `true` to show the line as a stepped line (`tension` will be ignored).
## Bar Configuration
* `defaultLineHeight` was renamed to `font.lineHeight`
* Horizontal Bar default tooltip mode was changed from `'index'` to `'nearest'` to match vertical bar charts
* `legend`, `title` and `tooltip` namespaces were moved from `Chart.defaults` to `Chart.defaults.plugins`.
+* `elements.line.fill` default changed from `true` to `false`.
#### Scales
borderJoinStyle: 'miter',
borderWidth: 3,
capBezierPoints: true,
- fill: true,
+ fill: false,
tension: 0
};
options: {
elements: {
line: {
+ fill: true,
backgroundColor: function(ctx) {
var index = ctx.index;
return index === 0 ? '#ff0000'
options: {
elements: {
line: {
+ fill: true,
backgroundColor: '#00ff00'
},
point: {
data: [10, 15, 0, -4],
label: 'dataset1',
borderColor: 'red',
- backgroundColor: 'green'
+ backgroundColor: 'green',
+ fill: true
}],
labels: ['label1', 'label2', 'label3', 'label4']
},
type: 'line',
data: {
datasets: [{
+ fill: true,
+ backgroundColor: 'red',
data: [
{x: -1000000, y: 1},
{x: 1000000000, y: 2}