charton API / @chart-on/core / index / LineSeriesOptions
Interface: LineSeriesOptions
Defined in: packages/core/src/series.ts:2603
Options for a line series (chart.addLine): colour, width and line style, an optional area fill, an optional mapping from the main series, markers, labels and price scale placement.
Extends
Properties
aboveColor?
optionalaboveColor?:string
Defined in: packages/core/src/series.ts:2629
area
area:
boolean
Defined in: packages/core/src/series.ts:2617
Fill under the line with a vertical gradient.
autoscale?
optionalautoscale?:boolean|AutoscaleProvider
Defined in: packages/core/src/series.ts:272
How the series takes part in its price scale's autoscale. true (the default) fits its visible values, false leaves it out (it still draws, possibly off the pane), and a function adjusts the range it adds. Primitives attached to the series still add their own ranges.
Inherited from
PriceLineSeriesOptions.autoscale
axisTitle?
optionalaxisTitle?:boolean
Defined in: packages/core/src/series.ts:2672
Show the series title (e.g. the symbol) in a tag beside the last-value label.
baseline?
optionalbaseline?:number
Defined in: packages/core/src/series.ts:2628
Baseline mode: line and fill switch between aboveColor and belowColor at this value (e.g. 0 for cumulative delta).
belowColor?
optionalbelowColor?:string
Defined in: packages/core/src/series.ts:2630
breakGaps?
optionalbreakGaps?:boolean
Defined in: packages/core/src/series.ts:2632
Break the line over timeline bars where the series has no point, instead of joining across them.
color?
optionalcolor?:string
Defined in: packages/core/src/series.ts:2614
colorMode?
optionalcolorMode?:"segment"|"gradient"
Defined in: packages/core/src/series.ts:2623
How points' own colors join (default 'segment'): each segment in the colour of the point it starts at, or 'gradient', blended from one point's colour to the next one's.
crosshairMarker?
optionalcrosshairMarker?:boolean| {color?:string;radius?:number; }
Defined in: packages/core/src/series.ts:2659
A dot where the crosshair meets the line (default off). radius in css px; color defaults to the line colour at that point.
follow?
optionalfollow?:FollowMapper<ValuePoint>
Defined in: packages/core/src/series.ts:2613
Derive the series from the main series: called with each main bar, the one before it and the theme; return a point, or null for none. The chart keeps it in step on loads, history pages, symbol switches, live bars and theme changes. See volumeOf.
format
format: (
value) =>string
Defined in: packages/core/src/series.ts:2667
Parameters
value
number
Returns
string
lastPointPulse?
optionallastPointPulse?:LastPointPulse
Defined in: packages/core/src/series.ts:2666
A pulse on the last point (default 'off'): 'on-update' rings once per live update, 'continuous' keeps ringing while the point is on screen. Reduced motion shows a still dot instead. See LastPointPulseOptions. Needs the lastPointPulse() plugin; without it the option draws nothing.
lastValueLabel
lastValueLabel:
boolean
Defined in: packages/core/src/series.ts:2670
legend?
optionallegend?:boolean
Defined in: packages/core/src/series.ts:2606
false leaves this series out of the legend. Default true.
lineStyle?
optionallineStyle?:LineStyle
Defined in: packages/core/src/series.ts:2634
Solid, dashed or dotted stroke (default 'solid').
lineType?
optionallineType?:LineType
Defined in: packages/core/src/series.ts:2649
How points are joined (default 'simple'): straight segments, 'step' (level until the next point, then a vertical jump) or 'curved' (a smooth curve through every point that never overshoots it).
lineWidth
lineWidth:
number
Defined in: packages/core/src/series.ts:2615
offscreenLastPrice?
optionaloffscreenLastPrice?:"hidden"|"hollow"
Defined in: packages/core/src/series.ts:283
The last-value label when the newest bar is panned off screen: 'hollow' draws it as an outline, 'hidden' leaves it out. Unset keeps it as is.
Inherited from
PriceLineSeriesOptions.offscreenLastPrice
overlay?
optionaloverlay?:OverlayMargins
Defined in: packages/core/src/series.ts:2673
pointMarkers?
optionalpointMarkers?:boolean| {radius?:number; }
Defined in: packages/core/src/series.ts:2654
A dot on every point (default off). Drawn only while bars are wide enough for the dots not to merge. radius in css px.
priceFormat?
optionalpriceFormat?:PriceFormat
Defined in: packages/core/src/series.ts:2669
Overrides format for labels, and gives the pane its tick size and axis unit.
priceLine?
optionalpriceLine?:boolean|SeriesPriceLineOptions
Defined in: packages/core/src/series.ts:278
Price line across the plot: true for the default style, an object to style it, false for none. Separate from lastValueLabel. Default: on for the main candle series, off for the others.
Inherited from
PriceLineSeriesOptions.priceLine
priceScale?
optionalpriceScale?:string
Defined in: packages/core/src/series.ts:2678
Price scale id in the pane (default 'right'). 'left' shows a left axis; other ids are overlays until given a side. Ignored with overlay.
renderer?
optionalrenderer?:"canvas"|"gpu"
Defined in: packages/core/src/series.ts:2643
Where the line is stroked (default 'gpu'). 'gpu' strokes it with WebGL2, which costs the CPU far less on long lines, many lines or frequent redraws. GPU lines (and their area fill) draw below every series drawn on the canvas, like candles do; 'canvas' strokes them with the 2D canvas, so zIndex orders them among other canvas series. Curved lines and lines with per-point colours always draw on the canvas.
title
title:
string
Defined in: packages/core/src/series.ts:2604