English
Class: D3PCartesianSystem
Defined in: core/coords.ts:243
The rectangle of the plot: x goes right, y goes up.
Extends
D3PCoordinateSystem<{height:number;width:number; }>
Constructors
Constructor
ts
new D3PCartesianSystem(opts?): D3PCartesianSystem;Defined in: core/coords.ts:244
Parameters
opts?
D3PCoordinateSystemOptions = {}
Returns
D3PCartesianSystem
Overrides
D3PCoordinateSystem.constructor
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
D3PCoordinateSystem.addToChart
areaPath()
ts
areaPath(
_chart,
pts,
b0,
curve?
): string | null;Defined in: core/coords.ts:263
Area between the polyline and its base: the third component of each point, or the constant second-dimension value b0 when a point has none. Gaps break the area.
Parameters
_chart
pts
b0
number
curve?
Returns
string | null
Overrides
attached()
ts
protected attached(chart): void;Defined in: core/coords.ts:154
Subscribe / create DOM. Subscriptions added to subs are released on detach.
Parameters
chart
Returns
void
Inherited from
cellShape()
ts
cellShape(
_chart,
a0,
a1,
b0,
b1
): D3PCellShape;Defined in: core/coords.ts:275
The cell between a0..a1 and b0..b1 (range units): a rectangle, an arc...
Parameters
_chart
a0
number
a1
number
b0
number
b1
number
Returns
Overrides
changed()
ts
protected changed(): void;Defined in: core/coords.ts:162
Announce that the geometry changed (axes rebuild their scales).
Returns
void
Inherited from
clipPath()
ts
clipPath(_chart): string | undefined;Defined in: core/coords.ts:233
url(#id) of a clip path limiting what is drawn to the system's shape, if it has one.
Parameters
_chart
Returns
string | undefined
Inherited from
createData()
ts
protected createData(): object;Defined in: core/coords.ts:151
Build the per-chart record. Must not rely on other objects of the chart.
Returns
object
Inherited from
D3PCoordinateSystem.createData
cursor()
ts
cursor(
chart,
a,
b
): object;Defined in: core/coords.ts:282
A vertical line at a and a horizontal line at b.
Parameters
chart
a
number | undefined
b
number | undefined
Returns
object
x
ts
x:
| {
kind: "line";
x1: number;
x2: number;
y1: 0;
y2: number;
}
| undefined;y
ts
y:
| {
kind: "line";
x1: 0;
x2: number;
y1: number;
y2: number;
}
| undefined;Overrides
densify()
ts
densify(_chart, pts): D3PRangePoint[];Defined in: core/coords.ts:205
Extra points so that a polyline in range units draws the right curve once projected.
Parameters
_chart
pts
Returns
Inherited from
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): void;Defined in: core/coords.ts:157
DOM / registry cleanup (subscriptions are released afterwards).
Parameters
chart
Returns
void
Inherited from
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
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
inRange()
ts
inRange(
_chart,
_a,
_b
): boolean;Defined in: core/coords.ts:229
Whether a point in range units is inside the system (points outside are not drawn).
Parameters
_chart
_a
number
_b
number
Returns
boolean
Inherited from
label()
ts
label(
chart,
axis,
dim,
a,
b
): D3PLabelAnchor | undefined;Defined in: core/coords.ts:291
The label of the cursor for an axis: it hangs under (or above) an X axis, and sits beside a Y axis.
Parameters
chart
axis
dim
a
number | undefined
b
number | undefined
Returns
D3PLabelAnchor | undefined
Overrides
linePath()
ts
linePath(
_chart,
pts,
curve?
): string | null;Defined in: core/coords.ts:260
Points whose second value is not finite are gaps: the line breaks there.
Parameters
_chart
pts
curve?
Returns
string | null
Overrides
onDestroy()
ts
protected onDestroy(): void;Defined in: core/object.ts:114
Hook run first on destroy (detach from partners, release DOM...).
Returns
void
Inherited from
projectFrom()
ts
projectFrom(
point,
options?,
cache?
): D3PRangePoint | undefined;Defined in: core/coords.ts:192
Viewport point to range units. strict (default) returns undefined outside of the system; tools pass strict: false to keep following a drag that left it.
Parameters
point
options?
strict?
boolean
cache?
Returns
D3PRangePoint | undefined
Inherited from
D3PCoordinateSystem.projectFrom
projectTo()
ts
projectTo(
chart,
a,
b,
cache?
): D3PViewportPoint;Defined in: core/coords.ts:186
Range units to a viewport point.
Parameters
chart
a
number
b
number
cache?
Returns
Inherited from
ranges()
ts
ranges(chart): D3PSystemRanges;Defined in: core/coords.ts:183
Ranges of the scales of the first (x) and second (y) dimension.
Parameters
chart
Returns
Inherited from
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
D3PCoordinateSystem.removeFromChart
render()
ts
render(_chart): void | Promise<void>;Defined in: core/object.ts:129
Draws the object on a chart. The render manager calls it, once per frame, for the objects that asked for it.
Parameters
_chart
Returns
void | Promise<void>
Inherited from
selectionShape()
ts
selectionShape(
_chart,
from,
to
): D3PSelectionShape;Defined in: core/coords.ts:272
Shape of a selection dragged between two points of the inner area.
Parameters
_chart
from
[number, number]
to
[number, number]
Returns
Overrides
D3PCoordinateSystem.selectionShape
snapshot()
ts
snapshot(chart): D3PSystemSnapshot<{
height: number;
width: number;
}>;Defined in: core/coords.ts:200
The system as it is now, to compare the state of a gesture's start with the live one.
Parameters
chart
Returns
D3PSystemSnapshot<{ height: number; width: number; }>
Inherited from
tagDirty()
ts
tagDirty(chart?): void;Defined in: core/object.ts:119
Schedule a redraw on one chart (or all attached charts).
Parameters
chart?
Returns
void
Inherited from
tooltipAnchor()
ts
tooltipAnchor(
chart,
a,
_b,
ratioY
): [number, number];Defined in: core/coords.ts:278
Where the tooltip box is anchored for a data point (a, b). pointer is the pointer position when it is over this chart; ratioY its relative height, which other charts reuse.
Parameters
chart
a
number
_b
number
ratioY
number
Returns
[number, number]
Overrides
D3PCoordinateSystem.tooltipAnchor
wrap()
ts
wrap(
chart,
dim,
delta
): number;Defined in: core/coords.ts:196
Normalize a difference along a dimension (an angle wraps around).
Parameters
chart
dim
delta
number
Returns
number
Inherited from
Properties
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, {
}>;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
isDestroying
ts
isDestroying: boolean = false;Defined in: core/object.ts:31
Set when destroy starts: the object is not drawn after that.
Inherited from
D3PCoordinateSystem.isDestroying
kind
ts
readonly kind: string;Defined in: core/coords.ts:146
family of the system (cartesian, polar...): renderers and axis renderers declare which kinds they support.
Inherited from
name
ts
readonly name: string;Defined in: core/coords.ts:140
The name of the system. Axes and renderers refer to it with their system option.
Inherited from
subs
ts
protected readonly subs: D3PSubscriptions;Defined in: core/object.ts:33
The subscriptions of the object, released when it is destroyed.