A line chart plots data points on a line. Often used to show trend data or compare data sets.
This dataset class can handle categorical scatter charts and area charts as well as standard line charts. For categorical scatter charts, set showLine to be False For area datasets, ensure that the fill mode is enabled and a background color is set
Create a Line dataset with just a label
Create a Line dataset with a label and data
Step Interpolation for lines
BeforeInterpolation: Step-before Interpolation AfterInterpolation: Step-after Interpolation
Fill modes handle how area charts should be displayed Can be:
Which boundary to use when using FillBoundary Can be the scale origin, start, or end
Set the data displayed by this dataset This is a list of floats, where each float is represented as a point on the line
The ID of the X axis to plot this dataset on
The ID of the Y axis to plot this dataset on
Fill color of the area under the bar Applies for area charts
Color of the line
Line width (in pixels)
Length and spacing of line dashes
Offset for line dashes
Cap style of the line
Joint style of the line
Which cubic interpolation mode to use 'default' uses a weighted cubic interpolation 'monotone' is better at preserving monotonicity
Beizer curve tension 0 is straight lines
This option is ignored if cubicInterpolation is set to 'monotone'
Fill color for points
Border color for points
Border width (in pixels) for points
Radius of the point shape
Style of the point
Rotation of the point (in degrees)
Hit radius for point interactivity
Fill color for points when hovered
Border color for points when hovered
Border width for points when hovered
Radius for points when hovered
Whether the line for this dataset should be drawn
Whether points with no data should be filled in or not
Set the step interpolation for the line
If set to anything other than false, lineTension will be ignored
For further information on these properties, see https://www.chartjs.org/docs/latest/charts/line.html
You should not use the dataset type directly Instead use the updater pipeline functions: