Line and area charts are fundamental chart types for displaying trends over time or across categories. Line charts connect data points with lines, while area charts fill the space between the line and the axis.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/highcharts/highcharts/llms.txt
Use this file to discover all available pages before exploring further.
Line Charts
Line charts are ideal for showing trends and changes over time. They connect individual data points with a continuous line.Basic Line Chart
Line Chart Configuration Options
Key configuration options for line charts:lineWidth
lineWidth
The width of the line connecting data points. Default is 2.
marker
marker
Options for the point markers. Can be enabled/disabled and customized.
dashStyle
dashStyle
A name for the dash style to use for the graph. Options include ‘Solid’, ‘ShortDash’, ‘Dot’, etc.
Area Charts
Area charts display quantitative data visually by filling the area between the line and the axis.Basic Area Chart
Area Chart Configuration Options
Key configuration options from~/workspace/source/ts/Series/Area/AreaSeriesDefaults.ts:46-170:
Fill color or gradient for the area. When undefined, the series color is used with fillOpacity.
Fill opacity for the area. Default is 0.75 for both Highcharts and Highstock.
A separate color for the graph line. Allows setting a separate color for the line without altering the fillColor.
The Y axis value to serve as the base for the area, for distinguishing between values above and below a threshold.
Whether the whole area or just the line should respond to mouseover tooltips and other mouse or touch events.
Stacked Area Chart
Spline Variants
Both line and area charts have spline variants that create smooth curves instead of straight lines.- Spline
- Area Spline
Use Cases
Line Charts
- Time series data
- Stock prices
- Temperature trends
- Sales over time
Area Charts
- Showing magnitude of change
- Cumulative totals
- Part-to-whole relationships
- Comparing multiple data series
Data Formats
Line and area charts support multiple data formats:- Array of numbers:
data: [0, 5, 3, 5] - Array of arrays:
data: [[0, 9], [1, 7], [2, 6]] - Array of objects:
data: [{x: 1, y: 9, name: "Point2"}, {x: 1, y: 6, name: "Point1"}]
For datetime axes, x values should be timestamps in milliseconds.