English
Class: D3PRadiusAxis
Defined in: core/axis.ts:457
Radius (magnitude) axis of a polar system: new D3PAxis({ position: 'radius', ... }).
Extends
Accessors
props
Get Signature
ts
get props(): D3PProps<D3PAxisProps>;Defined in: core/axis.ts:217
The props of the axis: ticks, format, grid, name.
Returns
Set Signature
ts
set props(v): void;Defined in: core/axis.ts:221
Merges props into those of the axis.
Parameters
v
displayName?
string
The name the axis shows (the text of its title): the name of the axis by default.
grid?
{ enabled?: boolean; opacity?: number; stroke?: string; strokeDasharray?: string; strokeWidth?: number; }
The grid drawn from the ticks.
grid.enabled?
boolean
Whether the grid is drawn.
grid.opacity?
number
Opacity of the grid lines (0 to 1).
grid.stroke?
string
Color of the grid lines.
grid.strokeDasharray?
string
Dash of the grid lines, as an SVG stroke-dasharray ('2,2').
grid.strokeWidth?
number
Width of the grid lines, in pixels.
postProcess?
(group) => void
Called after each draw with the axis group, to customize the SVG.
tickCount?
number
The number of ticks wanted (d3 may give a few more or less).
tickFormat?
((v) => string) | null
Writes a value, for the ticks and the labels of the cursor and the tooltip. null: the default format of the scale. A cursor label is not a tick: round its value.
Returns
void
Inherited from
Constructors
Constructor
ts
new D3PRadiusAxis(opts): D3PRadiusAxis;Defined in: core/axis.ts:458
Parameters
opts
Omit<D3PAxisOptions, "position">
Returns
D3PRadiusAxis
Overrides
Methods
addToChart()
ts
addToChart(chart, offset?): void;Defined in: core/axis.ts:228
offset overrides the one of the options for this chart.
Parameters
chart
offset?
number
Returns
void
Inherited from
attached()
ts
protected attached(
chart,
data,
subs
): void;Defined in: core/axis.ts:239
Subscribe / create DOM. Subscriptions added to subs are released on detach.
Parameters
chart
data
AxisChartData
subs
Returns
void
Inherited from
createData()
ts
protected createData(chart): AxisChartData;Defined in: core/axis.ts:233
Build the per-chart record. Must not rely on other objects of the chart.
Parameters
chart
Returns
AxisChartData
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, data): void;Defined in: core/axis.ts:247
DOM / registry cleanup (subscriptions are released afterwards).
Parameters
chart
data
AxisChartData
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
getAxisDomain()
ts
getAxisDomain(): D3PAxisDomain;Defined in: core/axis.ts:360
The domain the axis reads.
Returns
Inherited from
getCharts()
ts
getCharts(): D3PChart[];Defined in: core/object.ts:105
The charts the object is attached to.
Returns
D3PChart[]
Inherited from
getExtent()
ts
getExtent(chart): number | undefined;Defined in: core/axis.ts:330
How far the axis reaches from its line, outward: the ticks and their labels, in pixels. undefined before it is drawn, or where nothing is laid out. A title that sits against the axis uses it.
Parameters
chart
Returns
number | undefined
Inherited from
getOffset()
ts
getOffset(chart): number;Defined in: core/axis.ts:388
How far the axis is from the plot, outward, in pixels: what stacks several axes on a side.
Parameters
chart
Returns
number
Inherited from
getScale()
ts
getScale(chart): D3PScale | undefined;Defined in: core/axis.ts:289
The scale of the axis on a chart, in line with its domain (undefined if the axis is not on it).
Parameters
chart
Returns
D3PScale | undefined
Inherited from
getSystem()
ts
getSystem(chart): D3PCoordinateSystem<any> | undefined;Defined in: core/axis.ts:355
Coordinate system of the axis on chart.
Parameters
chart
Returns
D3PCoordinateSystem<any> | undefined
Inherited from
getTickFormatter()
ts
getTickFormatter(chart): (v) => string;Defined in: core/axis.ts:367
The function that writes a value of this axis: props.tickFormat, or the default format of its scale.
Parameters
chart
Returns
(v) => string
Inherited from
getTranslation()
ts
getTranslation(chart): object;Defined in: core/axis.ts:374
Translation of a side axis inside the chart's inner coordinates (nothing for polar axes).
Parameters
chart
Returns
object
x
ts
x: number;y
ts
y: number;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
isVisible()
ts
isVisible(chart): boolean;Defined in: core/axis.ts:403
Whether the axis is drawn on this chart.
Parameters
chart
Returns
boolean
Inherited from
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?
): D3PDomainValue | undefined;Defined in: core/axis.ts:309
The value of this axis under a point of the chart, or undefined if there is none (strict refuses the points outside of the plot).
Parameters
point
options?
strict?
boolean
cache?
Returns
D3PDomainValue | undefined
Inherited from
projectTo()
ts
projectTo(
chart,
value,
cache?
): number | undefined;Defined in: core/axis.ts:299
The place of a value along this axis, in range units (undefined if the scale has none for it).
Parameters
chart
value
cache?
Returns
number | undefined
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
render()
ts
render(chart): void;Defined in: core/axis.ts:419
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
Inherited from
setOffset()
ts
setOffset(chart, px): void;Defined in: core/axis.ts:380
Move the axis away from the plot (see the offset option), to stack several axes on one side.
Parameters
chart
px
number
Returns
void
Inherited from
setVisible()
ts
setVisible(visible, chart?): void;Defined in: core/axis.ts:393
Show/hide on one chart, or on all of them.
Parameters
visible
boolean
chart?
Returns
void
Inherited from
snapshot()
ts
snapshot(chart, system): D3PAxisSnapshot;Defined in: core/axis.ts:321
The axis as it is now on chart (see D3PAxisSnapshot); system is the snapshot of its system.
Parameters
chart
system
Returns
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
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, AxisChartData>;Defined in: core/object.ts:66
What the object keeps for each chart it is attached to.
Inherited from
component
ts
readonly component: D3PAxisComponent;Defined in: core/axis.ts:177
x or y: the dimension of the axis (the angle is x and the radius y in polar).
Inherited from
domain
ts
readonly domain: D3PAxisDomain;Defined in: core/axis.ts:173
The domain the axis reads.
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
name
ts
readonly name: string;Defined in: core/axis.ts:171
The name of the axis. It is unique among the axes of a dimension in a chart.
Inherited from
position
ts
readonly position: D3PAxisPosition;Defined in: core/axis.ts:175
Where the axis is drawn: bottom, top, left, right, or angle and radius in polar.
Inherited from
renderer
ts
readonly renderer: D3PAxisRenderer;Defined in: core/axis.ts:181
What draws the axis: a line along a side, a ring, a radius.
Inherited from
scaleOptions
ts
readonly scaleOptions: D3PScaleOptions;Defined in: core/axis.ts:185
Options of the scale.
Inherited from
scaleType
ts
readonly scaleType: D3PScaleType;Defined in: core/axis.ts:183
The type of scale.
Inherited from
subs
ts
protected readonly subs: D3PSubscriptions;Defined in: core/object.ts:33
The subscriptions of the object, released when it is destroyed.
Inherited from
systemName
ts
readonly systemName: string;Defined in: core/axis.ts:179
The name of the coordinate system the axis is in.