LineChartConfig
Defined in: types/index.ts:241
Line / Area chart configuration.
Example
new LineChart('#chart', { theme: 'midnight', area: true, smooth: true, dots: true });Extends
Properties
animate?
optionalanimate?:boolean
Defined in: types/index.ts:192
Run an entry animation on the first render and on data updates. Default true.
Inherited from
animDuration?
optionalanimDuration?:number
Defined in: types/index.ts:194
Animation duration in milliseconds. Default 600.
Inherited from
animEasing?
optionalanimEasing?:EasingName
Defined in: types/index.ts:196
Easing curve. Default 'easeOutCubic'.
Inherited from
area?
optionalarea?:boolean
Defined in: types/index.ts:243
Fill the area under the line with a soft gradient.
ariaDescription?
optionalariaDescription?:string
Defined in: types/index.ts:230
Longer accessible description (rendered as canvas aria-description).
Inherited from
BaseChartConfig.ariaDescription
ariaLabel?
optionalariaLabel?:string
Defined in: types/index.ts:228
Accessible label for screen readers (rendered as canvas aria-label).
Inherited from
dots?
optionaldots?:boolean
Defined in: types/index.ts:247
Render a dot at each data point.
formatValue?
optionalformatValue?: (value) =>string
Defined in: types/index.ts:221
Format a numeric value for axis ticks, tooltips, and labels.
Parameters
value
number
Returns
string
Example
formatValue: (v) => v >= 1000 ? `${(v/1000).toFixed(1)}k` : `${v}`Inherited from
legendPosition?
optionallegendPosition?:LegendPosition
Defined in: types/index.ts:208
Where the legend appears relative to the plot. Default 'top'.
Inherited from
BaseChartConfig.legendPosition
lineWidth?
optionallineWidth?:number
Defined in: types/index.ts:249
Stroke width in pixels. Default 2.
onClick?
optionalonClick?: (index,data) =>void
Defined in: types/index.ts:226
Click handler invoked with the index of the clicked data point and the resolved data shape so consumers can read the underlying row.
Parameters
index
number
data
Returns
void
Inherited from
padding?
optionalpadding?:Partial<Padding>
Defined in: types/index.ts:200
Override the auto-computed plot area padding (pixels).
Inherited from
responsive?
optionalresponsive?:boolean
Defined in: types/index.ts:198
Auto-resize when the container size changes via ResizeObserver. Default true.
Inherited from
showGrid?
optionalshowGrid?:boolean
Defined in: types/index.ts:202
Show grid lines on the plot area. Default true.
Inherited from
showLegend?
optionalshowLegend?:boolean
Defined in: types/index.ts:206
Render a legend listing each series. Default true.
Inherited from
showTooltip?
optionalshowTooltip?:boolean
Defined in: types/index.ts:204
Render an interactive tooltip on hover. Default true.
Inherited from
smooth?
optionalsmooth?:boolean
Defined in: types/index.ts:245
Use cubic Bézier interpolation between points instead of straight segments.
subtitle?
optionalsubtitle?:string
Defined in: types/index.ts:212
Sub-heading rendered under the title.
Inherited from
theme?
Defined in: types/index.ts:190
Theme name ('midnight' etc.) or a complete Theme object.
Inherited from
title?
optionaltitle?:string
Defined in: types/index.ts:210
Chart heading rendered above the plot.