English
Class: D3PLineRenderer
Defined in: core/renderers/line.ts:17
A line through the points of a series, in any coordinate system. The style gives its color, its width, its curve and what to do with missing values.
Extends
Accessors
color
Get Signature
ts
get color(): string;Defined in: core/renderers/base.ts:194
The color of the renderer: the one in its style, or the one its name gives.
Returns
string
Inherited from
marker
Get Signature
ts
get marker(): D3PMarker | undefined;Defined in: core/renderers/base.ts:140
What shows the point under the pointer; undefined for none.
Returns
D3PMarker | undefined
Set Signature
ts
set marker(m): void;Defined in: core/renderers/base.ts:144
Replaces the marker, or removes it with undefined.
Parameters
m
D3PMarker | undefined
Returns
void
Inherited from
props
Get Signature
ts
get props(): D3PProps<P & object>;Defined in: core/renderers/base.ts:159
The props of the renderer: its style, what its type adds, and visible.
Returns
D3PProps<P & object>
Set Signature
ts
set props(v): void;Defined in: core/renderers/base.ts:163
Merges props into those of the renderer; it is drawn again, with a transition.
Parameters
v
DeepPartial<P & object>
Returns
void
Inherited from
series
Get Signature
ts
get series(): D3PSeries;Defined in: core/renderers/base.ts:168
The series the renderer draws.
Returns
Set Signature
ts
set series(s): void;Defined in: core/renderers/base.ts:172
Changes the series: the renderer is drawn again.
Parameters
s
Returns
void
Inherited from
visible
Get Signature
ts
get visible(): boolean;Defined in: core/renderers/base.ts:183
Whether the renderer is shown.
Returns
boolean
Set Signature
ts
set visible(v): void;Defined in: core/renderers/base.ts:187
Shows or hides the renderer, with a transition.
Parameters
v
boolean
Returns
void
Inherited from
Constructors
Constructor
ts
new D3PLineRenderer(opts): D3PLineRenderer;Defined in: core/renderers/line.ts:20
Parameters
opts
D3PSeriesRendererOptions<D3PLineProps>
Returns
D3PLineRenderer
Overrides
Methods
addToChart()
ts
addToChart(chart): void;Defined in: core/object.ts:77
Attaches the object to a chart; nothing happens if it already is attached to it.
Parameters
chart
Returns
void
Inherited from
attached()
ts
protected attached(
chart,
data,
subs
): void;Defined in: core/renderers/base.ts:295
Subscribe / create DOM. Subscriptions added to subs are released on detach.
Parameters
chart
data
D3PRendererChartData<D3PPathData>
subs
Returns
void
Inherited from
baseColumn()
ts
protected baseColumn(): string | undefined;Defined in: core/renderers/path.ts:90
Column holding the base of each point (an area between two curves), if any.
Returns
string | undefined
Inherited from
chartAdded()
ts
protected chartAdded(chart, data): void;Defined in: core/renderers/path.ts:109
Called when the renderer is attached to a chart, to create what it draws with.
Parameters
chart
data
Returns
void
Inherited from
chartRemoved()
ts
protected chartRemoved(_chart, data): void;Defined in: core/renderers/path.ts:113
Called when the renderer leaves a chart, to remove what it created.
Parameters
_chart
data
Returns
void
Inherited from
checkColumns()
ts
protected checkColumns(series?): void;Defined in: core/renderers/base.ts:255
Throws when the series lacks a column this renderer reads.
Parameters
series?
D3PSeries = ...
Returns
void
Inherited from
createData()
ts
protected createData(chart): D3PRendererChartData<D3PPathData>;Defined in: core/renderers/base.ts:291
Build the per-chart record. Must not rely on other objects of the chart.
Parameters
chart
Returns
D3PRendererChartData<D3PPathData>
Inherited from
createGroup()
ts
protected createGroup(chart): Group;Defined in: core/renderers/base.ts:420
Create the renderer's own group in the middle data layer.
Parameters
chart
Returns
Group
Inherited from
createMarker()
ts
createMarker(): D3PMarker;Defined in: core/renderers/path.ts:71
The marker this kind of renderer has by default (none unless overridden).
Returns
Inherited from
createRendererData()
ts
protected createRendererData(chart): D3PPathData;Defined in: core/renderers/path.ts:105
Creates what the renderer keeps for a chart.
Parameters
chart
Returns
Inherited from
D3PPathRenderer.createRendererData
destroy()
ts
destroy(): void;Defined in: core/object.ts:51
Detaches the object from all its charts, announces destroyed and releases its subscriptions. The object cannot be used afterwards.
Returns
void
Inherited from
detached()
ts
protected detached(chart, data): void;Defined in: core/renderers/base.ts:306
DOM / registry cleanup (subscriptions are released afterwards).
Parameters
chart
data
D3PRendererChartData<D3PPathData>
Returns
void
Inherited from
entriesChanged()
ts
protected entriesChanged(): void;Defined in: core/renderers/base.ts:210
Announce that legendEntries() changed (the legend refreshes).
Returns
void
Inherited from
D3PPathRenderer.entriesChanged
fire()
ts
protected fire<P>(event, ...args): void;Defined in: core/object.ts:41
Emits one of its own events on the bus.
Type Parameters
P
P
Parameters
event
D3PEvent<P>
args
...P extends void ? [] : [payload: P]
Returns
void
Inherited from
getAxes()
ts
getAxes(chart): object;Defined in: core/renderers/base.ts:320
Axes this renderer draws against on chart: the one the series' x is plotted on, and the one for its y. By default the first X-component axis and the first Y-component axis of the same coordinate system; a horizontal renderer swaps them.
Parameters
chart
Returns
object
x?
ts
x?: D3PAxis;y?
ts
y?: D3PAxis;Inherited from
getCharts()
ts
getCharts(): D3PChart[];Defined in: core/object.ts:105
The charts the object is attached to.
Returns
D3PChart[]
Inherited from
hasChart()
ts
hasChart(chart): boolean;Defined in: core/object.ts:110
Whether the object is attached to this chart.
Parameters
chart
Returns
boolean
Inherited from
legendEntries()
ts
legendEntries(): D3PLegendItem[];Defined in: core/renderers/base.ts:215
The legend lines of this renderer: itself by default.
Returns
Inherited from
onDestroy()
ts
protected onDestroy(): void;Defined in: core/renderers/base.ts:264
Hook run first on destroy (detach from partners, release DOM...).
Returns
void
Inherited from
pathGenerator()
ts
protected pathGenerator(
chart,
system,
_sy
): (pts) => string | null;Defined in: core/renderers/line.ts:32
The generator of the line, in any system.
Parameters
chart
system
_sy
Returns
(pts) => string | null
Overrides
pathStyle()
ts
protected pathStyle(props, hidden): object;Defined in: core/renderers/line.ts:24
fixed never changes; animated is tweened (and driven to its hidden value when hidden).
Parameters
props
hidden
boolean
Returns
object
animated
ts
animated: object;animated.stroke-width
ts
"stroke-width": number;fixed
ts
fixed: object;fixed.fill
ts
fill: string = 'none';fixed.stroke
ts
stroke: string = props.style.color;Overrides
probeHit()
ts
probeHit(
chart,
event,
joins?
): D3PProbeHit | undefined;Defined in: core/renderers/path.ts:75
What this renderer finds for event on chart: by default the data point whose X is closest to the value under the pointer (read through the probe, so joins apply). Renderers that do not map data through axes (a pie) test the pixel instead. Ask the probe (d3pProbe(chart).hit) rather than this method: it computes once per event.
Parameters
chart
event
joins?
readonly D3PJoinGroup[] = []
Returns
D3PProbeHit | undefined
Inherited from
projectFrom()
ts
projectFrom(point, cache?):
| [D3PDomainValue, D3PDomainValue]
| undefined;Defined in: core/renderers/base.ts:358
Data values [x, y] under a viewport point; undefined outside of the system.
Parameters
point
cache?
Returns
| [D3PDomainValue, D3PDomainValue] | undefined
Inherited from
projectTo()
ts
projectTo(
chart,
x,
y,
cache?
): D3PViewportPoint | undefined;Defined in: core/renderers/base.ts:351
Viewport point of the data point (x, y).
Parameters
chart
x
y
cache?
Returns
D3PViewportPoint | undefined
Inherited from
projectToRange()
ts
projectToRange(
chart,
x,
y,
cache?
): [number, number] | undefined;Defined in: core/renderers/base.ts:341
Position of the data point (x, y) in range units, in the order of the dimensions of the system (the series' x goes on the first dimension unless the renderer is horizontal).
Parameters
chart
x
y
cache?
Returns
[number, number] | undefined
Inherited from
D3PPathRenderer.projectToRange
removeFromChart()
ts
removeFromChart(chart): void;Defined in: core/object.ts:95
Detaches the object from a chart; nothing happens if it is not attached to it.
Parameters
chart
Returns
void
Inherited from
D3PPathRenderer.removeFromChart
render()
ts
render(chart): Promise<void>;Defined in: core/renderers/base.ts:387
Draws the object on a chart. The render manager calls it, once per frame, for the objects that asked for it.
Parameters
chart
Returns
Promise<void>
Inherited from
renderData()
ts
protected renderData(
chart,
data,
x?,
y?
): void;Defined in: core/renderers/path.ts:131
Draws the series at once, with no transition.
Parameters
chart
data
x?
y?
Returns
void
Inherited from
renderDataHidden()
ts
protected renderDataHidden(
chart,
data,
x?,
y?
): void;Defined in: core/renderers/path.ts:170
Draws the series going away: the renderer was hidden.
Parameters
chart
data
x?
y?
Returns
void
Inherited from
D3PPathRenderer.renderDataHidden
renderDataWithTransition()
ts
protected renderDataWithTransition(
chart,
data,
x?,
y?
): void;Defined in: core/renderers/path.ts:143
Draws the series moving from what is on screen to what the data and the scales say now.
Parameters
chart
data
x?
y?
Returns
void
Inherited from
D3PPathRenderer.renderDataWithTransition
scalesOf()
ts
protected scalesOf(
chart,
x?,
y?
):
| {
sx: D3PScale;
sy: D3PScale;
system: D3PCoordinateSystem;
}
| undefined;Defined in: core/renderers/base.ts:430
Scales and coordinate system to draw with; throws if the system is not one the renderer supports.
Parameters
chart
x?
y?
Returns
| { sx: D3PScale; sy: D3PScale; system: D3PCoordinateSystem; } | undefined
Inherited from
seriesChanged()
ts
protected seriesChanged(): void;Defined in: core/renderers/base.ts:207
The series, or its data, changed. Renderers whose legend depends on the data announce it here.
Returns
void
Inherited from
tagDirty()
ts
tagDirty(chart?): void;Defined in: core/renderers/base.ts:276
Schedule a redraw on one chart (or all attached charts).
Parameters
chart?
Returns
void
Inherited from
tagDirtyWithTransition()
ts
tagDirtyWithTransition(chart?): void;Defined in: core/renderers/base.ts:272
Asks to draw again, with a transition: on one chart, or on all of them.
Parameters
chart?
Returns
void
Inherited from
D3PPathRenderer.tagDirtyWithTransition
Properties
axes
ts
readonly axes: D3PAxisFilter | undefined;Defined in: core/renderers/base.ts:109
The axes the renderer is restricted to (objects or names), if any.
Inherited from
bus
ts
readonly bus: D3PBus;Defined in: core/object.ts:27
The bus the object uses for its events.
Inherited from
chartData
ts
protected readonly chartData: Map<D3PChart, D3PRendererChartData<D3PPathData>>;Defined in: core/object.ts:66
What the object keeps for each chart it is attached to.
Inherited from
e
ts
readonly e: D3PEventTable<M & object>;Defined in: core/object.ts:29
The events of the object, by name: destroyed for all, and its own (axis.e.scaleChanged).
Inherited from
id
ts
readonly id: number = ++D3PSeriesRenderer.counter;Defined in: core/renderers/base.ts:105
A number that identifies the renderer: 1 for the first one created.
Inherited from
isDestroying
ts
isDestroying: boolean = false;Defined in: core/object.ts:31
Set when destroy starts: the object is not drawn after that.
Inherited from
name
ts
readonly name: string;Defined in: core/renderers/base.ts:107
The name of the renderer: the series name unless given.
Inherited from
pathClass
ts
protected readonly pathClass: "line" = 'line';Defined in: core/renderers/line.ts:18
The CSS class of the path.
Overrides
propsHandle
ts
protected readonly propsHandle: D3PPropsHandle<D3PLineProps & object>;Defined in: core/renderers/base.ts:117
The props and their change hooks.
Inherited from
requiredColumns
ts
protected readonly requiredColumns: readonly string[] = [];Defined in: core/renderers/base.ts:115
Columns the series must have (['open', 'high', 'low', 'close']); checked when attaching.
Inherited from
D3PPathRenderer.requiredColumns
subs
ts
protected readonly subs: D3PSubscriptions;Defined in: core/object.ts:33
The subscriptions of the object, released when it is destroyed.
Inherited from
system
ts
readonly system: string | undefined;Defined in: core/renderers/base.ts:111
The name of the coordinate system the renderer draws in, if it was given one.
Inherited from
systemKinds
ts
protected readonly systemKinds: readonly string[] | undefined = undefined;Defined in: core/renderers/base.ts:113
Kinds of coordinate system the renderer can draw in (undefined: any).