You can style lines by setting properties on the
data.dataset object that defines your line series. See Chart.js line styling documentation for full details.
The following are useful styling properties that are available on the line object:
datasets used to customize line style
|The color of area filled under the chart.
|Cap style of the line. See MDN.
|The line color.
|Length and spacing of line dashes. Use this to create dashed or dotted lines. For example, a simple dashed line would be [2, 2]. See MDN.
|Offset for line dashes. See MDN.
|Line joint style. See MDN.
|The line width, in pixels.
|How to clip relative to chartArea. Positive value allows overflow, negative value clips that many pixels inside chartArea. 0 = clip at chartArea. Clipping can also be configured per side as an object with
|Set true to fill in area under the chart.
|Bezier curve tension of the line. Set to 0 to draw straightlines. Set 0.4 for line smoothing.
|If false, the line is not drawn for this dataset.
|If true, lines will be drawn between points with no or null data. If false, points with NaN data will create a break in the line.
|If true, draw line as a stepped line. Other valid values include before for step-before interpolation, after for step-after interpolation, and middle for step-middle interpolation.
Here's an example chart that uses some line properties: