npm.io
4.3.0 • Published 4d ago

@d3plus/core

Licence
MIT
Version
4.3.0
Deps
31
Size
16.4 MB
Vulns
0
Weekly
0
Stars
1.6K

@d3plus/core

NPM version codecov

Data visualization made easy. A javascript library that extends the popular D3.js to enable fast and beautiful visualizations.

Installing

If using npm, npm install @d3plus/core. Otherwise, you can download the latest release from GitHub or load from a CDN.

import {*} from "@d3plus/core";

In a vanilla environment, a d3plus global is exported from the pre-bundled version:

<script src="https://cdn.jsdelivr.net/npm/@d3plus/core"></script>
<script>
  console.log(d3plus);
</script>

Examples

Live examples can be found on d3plus.org, which includes a collection of example visualizations using @d3plus/react.

API Reference

Charts Description
AreaPlot Creates an area plot based on an array of data.
BarChart Creates a bar chart based on an array of data.
BoxWhisker Creates a simple box and whisker based on an array of data.
BumpChart Creates a bump chart based on an array of data.
Donut Extends the Pie visualization to create a donut chart.
Geomap Creates a geographical map with zooming, panning, image tiles, and the ability to layer choropleth paths and coordinate
LinePlot Creates a line plot based on an array of data.
Matrix Creates a simple rows/columns Matrix view of any dataset.
Network Creates a network visualization based on a defined set of nodes and edges.
Pack Uses the d3 pack layout to create a Circle Packing chart based on an array of data.
Pie Uses the d3 pie layout to create SVG arcs based on an array of data.
Priestley Creates a Priestley timeline based on an array of data.
Radar Creates a radar visualization based on an array of data.
RadialMatrix Creates a radial layout of a rows/columns Matrix of any dataset.
Rings Creates a ring visualization based on a defined set of nodes and edges.
Sankey Creates a Sankey visualization based on a defined set of nodes and links.
StackedArea Creates a stacked area plot based on an array of data.
Tree Uses d3's tree layout to create a tidy tree chart based on an array of data.
Treemap Uses the d3 treemap layout to create SVG rectangles based on an array of data.
Classes Description
Area Creates SVG areas based on an array of data.
Axis Creates an SVG scale based on an array of data.
AxisBottom Shorthand method for creating an axis where the ticks are drawn below the horizontal domain path. Extends all functional
AxisLeft Shorthand method for creating an axis where the ticks are drawn to the left of the vertical domain path. Extends all fun
AxisRight Shorthand method for creating an axis where the ticks are drawn to the right of the vertical domain path. Extends all fu
AxisTop Shorthand method for creating an axis where the ticks are drawn above the vertical domain path. Extends all functionalit
Bar Creates SVG areas based on an array of data.
BaseClass Provides shared configuration, event handling, and locale management inherited by all d3plus classes.
Box Creates SVG box based on an array of data.
Circle Creates SVG circles based on an array of data.
ColorScale Creates an SVG color scale based on an array of data.
Image Creates SVG images based on an array of data.
Legend Creates an SVG legend based on an array of data.
Line Creates SVG lines based on an array of data.
Path Creates SVG Paths based on an array of data.
Plot Creates an x/y plot based on an array of data.
Rect Creates SVG rectangles based on an array of data. See [this example](https://d3plus.org/examples/d3plus-shape/getting-st
Shape An abstracted class for generating shapes.
TextBox Creates a wrapped text box for each point in an array of data. See [this example](https://d3plus.org/examples/d3plus-tex
Timeline Creates an interactive timeline brush component for selecting time periods within a visualization.
Tooltip Creates HTML tooltips in the body of a webpage.
Viz Creates an x/y plot based on an array of data. See [this example](https://d3plus.org/examples/d3plus-treemap/getting-sta
Whisker Creates SVG whisker based on an array of data.
Functions Description
accessor Wraps an object key in a simple accessor function.
configPrep Preps a config object for d3plus data, and optionally bubbles up a specific nested type. When using this function, you m
constant Wraps non-function variables in a simple return function.
Variables Description
RESET String constant used to reset an individual config property.
Interfaces Description
AreaConfig Area-specific config (curve, defined, dual-edge x/y).
AxisConfig
BarConfig Bar-specific config (Rect + start/end coords).
BaseShapeConfig Common props inherited from Shape — every shape subclass accepts
BoxConfig Box-specific config (whisker + median + outliers; subset of Shape).
CircleConfig Circle-specific config (radius).
ColorScaleConfig
D3plusConfig
ImageConfig Image-specific config (url + dimensions).
LegendConfig
LineConfig Line-specific config (curve + defined).
Margin Margin object with all four sides.
Padding Padding object with all four sides.
PathConfig Path-specific config (raw SVG path d string or generator).
RectConfig Rect-specific config (width + height on top of base).
TextBoxConfig
TimelineConfig
TooltipConfig
WhiskerConfig Whisker-specific config.
Type Aliases Description
AnyShapeConfig Union of every shape config — useful for code that composes
ConstOrAccessor A value that can either be a function (called per-datum) or a literal
D3Selection D3-style selection — deliberately loose. d3-selection's element/datum
StringOrAccessor A value that can be a function, a string key (wrapped in accessor),

Classes

Area

Defined in: shapes/Area.ts:25

Creates SVG areas based on an array of data.

Extends
Indexable

[key: string]: any

Methods

active()
Call Signature

active(): ((d: DataPoint, i: number) => boolean) | null

Defined in: shapes/Shape.ts:632

The active callback function for highlighting shapes.

Returns

((d: DataPoint, i: number) => boolean) | null

Inherited from

Shape.active

Call Signature

active(_: ((d: DataPoint, i: number) => boolean) | null): this

Defined in: shapes/Shape.ts:633

The active callback function for highlighting shapes.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

this

Inherited from

Shape.active

activeStyle()
Call Signature

activeStyle(): Record<string, unknown>

Defined in: shapes/Shape.ts:647

The style to apply to active shapes.

Returns

Record<string, unknown>

Inherited from

Shape.activeStyle

Call Signature

activeStyle(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:648

The style to apply to active shapes.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.activeStyle

config()
Call Signature

config(): AreaConfig

Defined in: shapes/Area.ts:268

Narrowed .config() for Area. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Returns

AreaConfig

Overrides

Shape.config

Call Signature

config(_: Partial<AreaConfig>): this

Defined in: shapes/Area.ts:269

Narrowed .config() for Area. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Parameters
Parameter Type
_ Partial<AreaConfig>
Returns

this

Overrides

Shape.config

data()
Call Signature

data(): DataPoint[]

Defined in: shapes/Shape.ts:659

The data array used to create shapes. A shape will be drawn for each object in the array.

Returns

DataPoint[]

Inherited from

Shape.data

Call Signature

data(_: DataPoint[]): this

Defined in: shapes/Shape.ts:660

The data array used to create shapes. A shape will be drawn for each object in the array.

Parameters
Parameter Type
_ DataPoint[]
Returns

this

Inherited from

Shape.data

hover()
Call Signature

hover(): ((d: DataPoint, i: number) => boolean) | null

Defined in: shapes/Shape.ts:668

The hover callback function for highlighting shapes on mouseover.

Returns

((d: DataPoint, i: number) => boolean) | null

Inherited from

Shape.hover

Call Signature

hover(_: ((d: DataPoint, i: number) => boolean) | null): this

Defined in: shapes/Shape.ts:669

The hover callback function for highlighting shapes on mouseover.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

this

Inherited from

Shape.hover

hoverStyle()
Call Signature

hoverStyle(): Record<string, unknown>

Defined in: shapes/Shape.ts:682

The style to apply to hovered shapes.

Returns

Record<string, unknown>

Inherited from

Shape.hoverStyle

Call Signature

hoverStyle(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:683

The style to apply to hovered shapes.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.hoverStyle

labelConfig()
Call Signature

labelConfig(): Record<string, unknown>

Defined in: shapes/Shape.ts:693

A pass-through to the config method of the TextBox class used to create a shape's labels.

Returns

Record<string, unknown>

Inherited from

Shape.labelConfig

Call Signature

labelConfig(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:694

A pass-through to the config method of the TextBox class used to create a shape's labels.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.labelConfig

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Shape.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Shape.locale

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

Shape.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

Shape.parent

render()

render(callback?: () => void): this

Defined in: shapes/Shape.ts:524

Parameters
Parameter Type
callback? () => void
Returns

this

Inherited from

Shape.render

select()
Call Signature

select(): Selection

Defined in: shapes/Shape.ts:704

The SVG container element as a d3 selector or DOM element.

Returns

Selection

Inherited from

Shape.select

Call Signature

select(_: string | HTMLElement | SVGElement | null): this

Defined in: shapes/Shape.ts:705

The SVG container element as a d3 selector or DOM element.

Parameters
Parameter Type
_ string | HTMLElement | SVGElement | null
Returns

this

Inherited from

Shape.select

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: utils/BaseClass.ts:246

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Inherited from

Shape.shapeConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:247

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

Shape.shapeConfig

sort()
Call Signature

sort(): ((a: DataPoint, b: DataPoint) => number) | null

Defined in: shapes/Shape.ts:715

A comparator function used to sort shapes for layering order.

Returns

((a: DataPoint, b: DataPoint) => number) | null

Inherited from

Shape.sort

Call Signature

sort(_: ((a: DataPoint, b: DataPoint) => number) | null): this

Defined in: shapes/Shape.ts:716

A comparator function used to sort shapes for layering order.

Parameters
Parameter Type
_ ((a: DataPoint, b: DataPoint) => number) | null
Returns

this

Inherited from

Shape.sort

textureDefault()
Call Signature

textureDefault(): Record<string, unknown>

Defined in: shapes/Shape.ts:728

A series of global texture methods to be used for all textures (ie. {stroke: "darkorange", strokeWidth: 2}).

Returns

Record<string, unknown>

Inherited from

Shape.textureDefault

Call Signature

textureDefault(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:729

A series of global texture methods to be used for all textures (ie. {stroke: "darkorange", strokeWidth: 2}).

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.textureDefault

toScene()

toScene(): GroupNode

Defined in: shapes/Shape.ts:421

Produces a backend-agnostic scene graph for this shape's data, reusing the same accessors render() applies to the DOM. This is the migration seam toward the @d3plus/render pluggable backends; it has no effect on render().

Returns

GroupNode

Inherited from

Shape.toScene

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Shape.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Shape.translate

x()
Call Signature

x(): AccessorFn

Defined in: shapes/Area.ts:192

The x position accessor. Also sets x0 to the same value.

Returns

AccessorFn

Call Signature

x(_: number | AccessorFn): this

Defined in: shapes/Area.ts:193

The x position accessor. Also sets x0 to the same value.

Parameters
Parameter Type
_ number | AccessorFn
Returns

this

x0()
Call Signature

x0(): AccessorFn

Defined in: shapes/Area.ts:204

The x0 (left edge) position accessor for the area.

Returns

AccessorFn

Call Signature

x0(_: number | AccessorFn): this

Defined in: shapes/Area.ts:205

The x0 (left edge) position accessor for the area.

Parameters
Parameter Type
_ number | AccessorFn
Returns

this

x1()
Call Signature

x1(): AccessorFn | null

Defined in: shapes/Area.ts:216

The x1 (right edge) position accessor for the area.

Returns

AccessorFn | null

Call Signature

x1(_: number | AccessorFn | null): this

Defined in: shapes/Area.ts:217

The x1 (right edge) position accessor for the area.

Parameters
Parameter Type
_ number | AccessorFn | null
Returns

this

y()
Call Signature

y(): AccessorFn

Defined in: shapes/Area.ts:229

The y position accessor. Also sets y0 to the same value.

Returns

AccessorFn

Call Signature

y(_: number | AccessorFn): this

Defined in: shapes/Area.ts:230

The y position accessor. Also sets y0 to the same value.

Parameters
Parameter Type
_ number | AccessorFn
Returns

this

y0()
Call Signature

y0(): AccessorFn

Defined in: shapes/Area.ts:241

The y0 (top edge) position accessor for the area.

Returns

AccessorFn

Call Signature

y0(_: number | AccessorFn): this

Defined in: shapes/Area.ts:242

The y0 (top edge) position accessor for the area.

Parameters
Parameter Type
_ number | AccessorFn
Returns

this

y1()
Call Signature

y1(): AccessorFn | null

Defined in: shapes/Area.ts:253

The y1 (bottom edge) position accessor for the area.

Returns

AccessorFn | null

Call Signature

y1(_: number | AccessorFn | null): this

Defined in: shapes/Area.ts:254

The y1 (bottom edge) position accessor for the area.

Parameters
Parameter Type
_ number | AccessorFn | null
Returns

this

Properties
Property Type Description Inherited from Defined in
_activeGroup Selection - Shape._activeGroup shapes/Shape.ts:130
_configDefault? D3plusConfig - Shape._configDefault utils/BaseClass.ts:82
_data DataPoint[] - Shape._data shapes/Shape.ts:116
_enter Selection - Shape._enter shapes/Shape.ts:127
_exit Selection - Shape._exit shapes/Shape.ts:128
_group Selection - Shape._group shapes/Shape.ts:125
_hoverGroup Selection - Shape._hoverGroup shapes/Shape.ts:129
_labelClass TextBox - Shape._labelClass shapes/Shape.ts:117
_name string - Shape._name shapes/Shape.ts:118
_path Record<string, unknown> - Shape._path shapes/Shape.ts:131
_sceneRenderer? SvgRenderer SvgRenderer mounted by the standalone render() path; reused across redraws. Shape._sceneRenderer shapes/Shape.ts:133
_select Selection - Shape._select shapes/Shape.ts:121
_tagName string - Shape._tagName shapes/Shape.ts:119
_textureDefs Record<string, Record<string, unknown>> - Shape._textureDefs shapes/Shape.ts:120
_transition Transition<BaseType> - Bar._transition shapes/Shape.ts:122
_update Selection - Shape._update shapes/Shape.ts:126
_uuid string - Shape._uuid utils/BaseClass.ts:81
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). Shape.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. Shape.schema utils/BaseClass.ts:77

Axis

Defined in: components/Axis/Axis.ts:69

Creates an SVG scale based on an array of data.

Extends
Extended by
Indexable

[key: string]: any

Methods

barConfig()
Call Signature

barConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:424

Axis line style.

Returns

Record<string, unknown>

Call Signature

barConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:425

Axis line style.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

config()
Call Signature

config(): D3plusConfig

Defined in: utils/BaseClass.ts:108

Methods that correspond to the key/value pairs and returns this class.

Returns

D3plusConfig

Inherited from

BaseClass.config

Call Signature

config(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:109

Methods that correspond to the key/value pairs and returns this class.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

BaseClass.config

data()
Call Signature

data(): unknown[]

Defined in: components/Axis/Axis.ts:435

An array of data points, which helps determine which ticks should be shown and which time resolution should be displayed.

Returns

unknown[]

Call Signature

data(_: unknown[]): this

Defined in: components/Axis/Axis.ts:436

An array of data points, which helps determine which ticks should be shown and which time resolution should be displayed.

Parameters
Parameter Type
_ unknown[]
Returns

this

gridConfig()
Call Signature

gridConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:444

Grid config of the axis.

Returns

Record<string, unknown>

Call Signature

gridConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:445

Grid config of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

labelRotation()
Call Signature

labelRotation(): boolean | undefined

Defined in: components/Axis/Axis.ts:455

Whether to rotate horizontal axis labels -90 degrees.

Returns

boolean | undefined

Call Signature

labelRotation(_: boolean): this

Defined in: components/Axis/Axis.ts:456

Whether to rotate horizontal axis labels -90 degrees.

Parameters
Parameter Type
_ boolean
Returns

this

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

measure()

measure(): this

Defined in: components/Axis/Axis.ts:511

Runs the layout pass only — scale construction, tick selection, label textWrap, and outerBounds — with no DOM access. After it returns, outerBounds() / _d3Scale / _getPosition() are populated exactly as they would be after a full render(), but no <svg>, <g>, tick shapes, or label TextBoxes are created. Answers "how much room will this axis need?" without rendering; Plot uses it to size its test-axes. Delegates to the standalone measureAxis(axis) in axisLayout.ts, so callers can run layout without owning an Axis instance.

Returns

this

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

orient()
Call Signature

orient(): string

Defined in: components/Axis/Axis.ts:466

The orientation of the shape.

Returns

string

Call Signature

orient(_: string): this

Defined in: components/Axis/Axis.ts:467

The orientation of the shape.

Parameters
Parameter Type
_ string
Returns

this

outerBounds()

outerBounds(): Record<string, number>

Defined in: components/Axis/Axis.ts:497

Returns the outer bounds of the axis content. Must be called after rendering.

Returns

Record<string, number>

Example
{"width": 180, "height": 24, "x": 10, "y": 20}

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

BaseClass.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

BaseClass.parent

render()

render(callback?: (...args: unknown[]) => unknown): this

Defined in: components/Axis/Axis.ts:325

Renders the current Axis to the page.

Parameters
Parameter Type Description
callback? (...args: unknown[]) => unknown Optional callback invoked after rendering completes.
Returns

this

select()
Call Signature

select(): Selection

Defined in: components/Axis/Axis.ts:525

The SVG container element as a d3 selector or DOM element.

Passing null or undefined deliberately leaves the axis unmounted — renderMode("compute") plus select(null) produces a scene-only axis (no detached SVG fallback). This is the formal contract callers in plotPaint use to compute axis layout without mounting DOM.

Returns

Selection

Call Signature

select(_: string | HTMLElement | null | undefined): this

Defined in: components/Axis/Axis.ts:526

The SVG container element as a d3 selector or DOM element.

Passing null or undefined deliberately leaves the axis unmounted — renderMode("compute") plus select(null) produces a scene-only axis (no detached SVG fallback). This is the formal contract callers in plotPaint use to compute axis layout without mounting DOM.

Parameters
Parameter Type
_ string | HTMLElement | null | required
Returns

this

shapeConfig()
Call Signature

shapeConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:540

Tick style of the axis.

Returns

Record<string, unknown>

Overrides

BaseClass.shapeConfig

Call Signature

shapeConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:541

Tick style of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Overrides

BaseClass.shapeConfig

titleConfig()
Call Signature

titleConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:551

Title configuration of the axis.

Returns

Record<string, unknown>

Call Signature

titleConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:552

Title configuration of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

toScene()

toScene(): GroupNode

Defined in: components/Axis/Axis.ts:317

Produces a backend-agnostic scene graph for this axis with no DOM dependency: gridlines + domain bar emitted natively, tick marks/labels composed from the tick Shape's toScene(), and the title from the title TextBox's toScene().

Returns

GroupNode

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

Properties
Property Type Default Description Inherited from Defined in
_availableTicks unknown[] required - - components/Axis/Axis.ts:98
_configDefault? D3plusConfig required - BaseClass._configDefault utils/BaseClass.ts:82
_d3Scale D3Scale<number> | null null - - components/Axis/Axis.ts:94
_d3ScaleNegative D3Scale<number> | null null - - components/Axis/Axis.ts:95
_data unknown[] required - - components/Axis/Axis.ts:75
_gridLineData? object[] required - - components/Axis/Axis.ts:93
_group Selection required - - components/Axis/Axis.ts:96
_labelRotation boolean | required undefined - - components/Axis/Axis.ts:76
_lastScale ((d: unknown) => number) | required undefined - - components/Axis/Axis.ts:97
_managesOwnScenePaint? boolean required - - components/Axis/Axis.ts:107
_margin Record<string, number> required - - components/Axis/Axis.ts:77
_outerBounds Record<string, number> required - - components/Axis/Axis.ts:78
_position object required - - components/Axis/Axis.ts:79
_position.height string required - - components/Axis/Axis.ts:82
_position.horizontal boolean required - - components/Axis/Axis.ts:80
_position.opposite string required - - components/Axis/Axis.ts:85
_position.width string required - - components/Axis/Axis.ts:81
_position.x string required - - components/Axis/Axis.ts:83
_position.y string required - - components/Axis/Axis.ts:84
_sceneRenderer? SvgRenderer required - - components/Axis/Axis.ts:104
_select Selection required - - components/Axis/Axis.ts:74
_tickShape? Shape required - - components/Axis/Axis.ts:92
_tickUnit number required - - components/Axis/Axis.ts:87
_titleClass TextBox required - - components/Axis/Axis.ts:88
_transition Transition<BaseType> required - - components/Axis/Axis.ts:100
_userFormat false | ((d: unknown) => string) | required undefined - - components/Axis/Axis.ts:101
_uuid string required - BaseClass._uuid utils/BaseClass.ts:81
_visibleTicks unknown[] required - - components/Axis/Axis.ts:99
ctx Record<string, unknown> required Chart-internal scratch (d3 layout instances, computed derived state). BaseClass.ctx utils/BaseClass.ts:79
schema Record<string, any> required Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. BaseClass.schema utils/BaseClass.ts:77

AxisBottom

Defined in: components/Axis/AxisBottom.ts:6

Shorthand method for creating an axis where the ticks are drawn below the horizontal domain path. Extends all functionality of the base Axis class.

Extends
Indexable

[key: string]: any

Methods

barConfig()
Call Signature

barConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:424

Axis line style.

Returns

Record<string, unknown>

Inherited from

Axis.barConfig

Call Signature

barConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:425

Axis line style.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.barConfig

config()
Call Signature

config(): D3plusConfig

Defined in: utils/BaseClass.ts:108

Methods that correspond to the key/value pairs and returns this class.

Returns

D3plusConfig

Inherited from

Axis.config

Call Signature

config(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:109

Methods that correspond to the key/value pairs and returns this class.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

Axis.config

data()
Call Signature

data(): unknown[]

Defined in: components/Axis/Axis.ts:435

An array of data points, which helps determine which ticks should be shown and which time resolution should be displayed.

Returns

unknown[]

Inherited from

Axis.data

Call Signature

data(_: unknown[]): this

Defined in: components/Axis/Axis.ts:436

An array of data points, which helps determine which ticks should be shown and which time resolution should be displayed.

Parameters
Parameter Type
_ unknown[]
Returns

this

Inherited from

Axis.data

gridConfig()
Call Signature

gridConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:444

Grid config of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.gridConfig

Call Signature

gridConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:445

Grid config of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.gridConfig

labelRotation()
Call Signature

labelRotation(): boolean | undefined

Defined in: components/Axis/Axis.ts:455

Whether to rotate horizontal axis labels -90 degrees.

Returns

boolean | undefined

Inherited from

Axis.labelRotation

Call Signature

labelRotation(_: boolean): this

Defined in: components/Axis/Axis.ts:456

Whether to rotate horizontal axis labels -90 degrees.

Parameters
Parameter Type
_ boolean
Returns

this

Inherited from

Axis.labelRotation

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Axis.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Axis.locale

measure()

measure(): this

Defined in: components/Axis/Axis.ts:511

Runs the layout pass only — scale construction, tick selection, label textWrap, and outerBounds — with no DOM access. After it returns, outerBounds() / _d3Scale / _getPosition() are populated exactly as they would be after a full render(), but no <svg>, <g>, tick shapes, or label TextBoxes are created. Answers "how much room will this axis need?" without rendering; Plot uses it to size its test-axes. Delegates to the standalone measureAxis(axis) in axisLayout.ts, so callers can run layout without owning an Axis instance.

Returns

this

Inherited from

Axis.measure

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

orient()
Call Signature

orient(): string

Defined in: components/Axis/Axis.ts:466

The orientation of the shape.

Returns

string

Inherited from

Axis.orient

Call Signature

orient(_: string): this

Defined in: components/Axis/Axis.ts:467

The orientation of the shape.

Parameters
Parameter Type
_ string
Returns

this

Inherited from

Axis.orient

outerBounds()

outerBounds(): Record<string, number>

Defined in: components/Axis/Axis.ts:497

Returns the outer bounds of the axis content. Must be called after rendering.

Returns

Record<string, number>

Example
{"width": 180, "height": 24, "x": 10, "y": 20}
Inherited from

Axis.outerBounds

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

Axis.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

Axis.parent

render()

render(callback?: (...args: unknown[]) => unknown): this

Defined in: components/Axis/Axis.ts:325

Renders the current Axis to the page.

Parameters
Parameter Type Description
callback? (...args: unknown[]) => unknown Optional callback invoked after rendering completes.
Returns

this

Inherited from

Axis.render

select()
Call Signature

select(): Selection

Defined in: components/Axis/Axis.ts:525

The SVG container element as a d3 selector or DOM element.

Passing null or undefined deliberately leaves the axis unmounted — renderMode("compute") plus select(null) produces a scene-only axis (no detached SVG fallback). This is the formal contract callers in plotPaint use to compute axis layout without mounting DOM.

Returns

Selection

Inherited from

Axis.select

Call Signature

select(_: string | HTMLElement | null | undefined): this

Defined in: components/Axis/Axis.ts:526

The SVG container element as a d3 selector or DOM element.

Passing null or undefined deliberately leaves the axis unmounted — renderMode("compute") plus select(null) produces a scene-only axis (no detached SVG fallback). This is the formal contract callers in plotPaint use to compute axis layout without mounting DOM.

Parameters
Parameter Type
_ string | HTMLElement | null | required
Returns

this

Inherited from

Axis.select

shapeConfig()
Call Signature

shapeConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:540

Tick style of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.shapeConfig

Call Signature

shapeConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:541

Tick style of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.shapeConfig

titleConfig()
Call Signature

titleConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:551

Title configuration of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.titleConfig

Call Signature

titleConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:552

Title configuration of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.titleConfig

toScene()

toScene(): GroupNode

Defined in: components/Axis/Axis.ts:317

Produces a backend-agnostic scene graph for this axis with no DOM dependency: gridlines + domain bar emitted natively, tick marks/labels composed from the tick Shape's toScene(), and the title from the title TextBox's toScene().

Returns

GroupNode

Inherited from

Axis.toScene

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Axis.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Axis.translate

Properties
Property Type Default Description Inherited from Defined in
_availableTicks unknown[] required - Axis._availableTicks components/Axis/Axis.ts:98
_configDefault? D3plusConfig required - Axis._configDefault utils/BaseClass.ts:82
_d3Scale D3Scale<number> | null null - Axis._d3Scale components/Axis/Axis.ts:94
_d3ScaleNegative D3Scale<number> | null null - Axis._d3ScaleNegative components/Axis/Axis.ts:95
_data unknown[] required - Axis._data components/Axis/Axis.ts:75
_gridLineData? object[] required - Axis._gridLineData components/Axis/Axis.ts:93
_group Selection required - Axis._group components/Axis/Axis.ts:96
_labelRotation boolean | required undefined - Axis._labelRotation components/Axis/Axis.ts:76
_lastScale ((d: unknown) => number) | required undefined - Axis._lastScale components/Axis/Axis.ts:97
_managesOwnScenePaint? boolean required - Axis._managesOwnScenePaint components/Axis/Axis.ts:107
_margin Record<string, number> required - Axis._margin components/Axis/Axis.ts:77
_outerBounds Record<string, number> required - Axis._outerBounds components/Axis/Axis.ts:78
_position object required - Axis._position components/Axis/Axis.ts:79
_position.height string required - - components/Axis/Axis.ts:82
_position.horizontal boolean required - - components/Axis/Axis.ts:80
_position.opposite string required - - components/Axis/Axis.ts:85
_position.width string required - - components/Axis/Axis.ts:81
_position.x string required - - components/Axis/Axis.ts:83
_position.y string required - - components/Axis/Axis.ts:84
_sceneRenderer? SvgRenderer required - Axis._sceneRenderer components/Axis/Axis.ts:104
_select Selection required - Axis._select components/Axis/Axis.ts:74
_tickShape? Shape required - Axis._tickShape components/Axis/Axis.ts:92
_tickUnit number required - Axis._tickUnit components/Axis/Axis.ts:87
_titleClass TextBox required - Axis._titleClass components/Axis/Axis.ts:88
_transition Transition<BaseType> required - Axis._transition components/Axis/Axis.ts:100
_userFormat false | ((d: unknown) => string) | required undefined - Axis._userFormat components/Axis/Axis.ts:101
_uuid string required - Axis._uuid utils/BaseClass.ts:81
_visibleTicks unknown[] required - Axis._visibleTicks components/Axis/Axis.ts:99
ctx Record<string, unknown> required Chart-internal scratch (d3 layout instances, computed derived state). Axis.ctx utils/BaseClass.ts:79
schema Record<string, any> required Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. Axis.schema utils/BaseClass.ts:77

AxisLeft

Defined in: components/Axis/AxisLeft.ts:6

Shorthand method for creating an axis where the ticks are drawn to the left of the vertical domain path. Extends all functionality of the base Axis class.

Extends
Indexable

[key: string]: any

Methods

barConfig()
Call Signature

barConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:424

Axis line style.

Returns

Record<string, unknown>

Inherited from

Axis.barConfig

Call Signature

barConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:425

Axis line style.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.barConfig

config()
Call Signature

config(): D3plusConfig

Defined in: utils/BaseClass.ts:108

Methods that correspond to the key/value pairs and returns this class.

Returns

D3plusConfig

Inherited from

Axis.config

Call Signature

config(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:109

Methods that correspond to the key/value pairs and returns this class.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

Axis.config

data()
Call Signature

data(): unknown[]

Defined in: components/Axis/Axis.ts:435

An array of data points, which helps determine which ticks should be shown and which time resolution should be displayed.

Returns

unknown[]

Inherited from

Axis.data

Call Signature

data(_: unknown[]): this

Defined in: components/Axis/Axis.ts:436

An array of data points, which helps determine which ticks should be shown and which time resolution should be displayed.

Parameters
Parameter Type
_ unknown[]
Returns

this

Inherited from

Axis.data

gridConfig()
Call Signature

gridConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:444

Grid config of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.gridConfig

Call Signature

gridConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:445

Grid config of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.gridConfig

labelRotation()
Call Signature

labelRotation(): boolean | undefined

Defined in: components/Axis/Axis.ts:455

Whether to rotate horizontal axis labels -90 degrees.

Returns

boolean | undefined

Inherited from

Axis.labelRotation

Call Signature

labelRotation(_: boolean): this

Defined in: components/Axis/Axis.ts:456

Whether to rotate horizontal axis labels -90 degrees.

Parameters
Parameter Type
_ boolean
Returns

this

Inherited from

Axis.labelRotation

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Axis.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Axis.locale

measure()

measure(): this

Defined in: components/Axis/Axis.ts:511

Runs the layout pass only — scale construction, tick selection, label textWrap, and outerBounds — with no DOM access. After it returns, outerBounds() / _d3Scale / _getPosition() are populated exactly as they would be after a full render(), but no <svg>, <g>, tick shapes, or label TextBoxes are created. Answers "how much room will this axis need?" without rendering; Plot uses it to size its test-axes. Delegates to the standalone measureAxis(axis) in axisLayout.ts, so callers can run layout without owning an Axis instance.

Returns

this

Inherited from

Axis.measure

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

orient()
Call Signature

orient(): string

Defined in: components/Axis/Axis.ts:466

The orientation of the shape.

Returns

string

Inherited from

Axis.orient

Call Signature

orient(_: string): this

Defined in: components/Axis/Axis.ts:467

The orientation of the shape.

Parameters
Parameter Type
_ string
Returns

this

Inherited from

Axis.orient

outerBounds()

outerBounds(): Record<string, number>

Defined in: components/Axis/Axis.ts:497

Returns the outer bounds of the axis content. Must be called after rendering.

Returns

Record<string, number>

Example
{"width": 180, "height": 24, "x": 10, "y": 20}
Inherited from

Axis.outerBounds

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

Axis.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

Axis.parent

render()

render(callback?: (...args: unknown[]) => unknown): this

Defined in: components/Axis/Axis.ts:325

Renders the current Axis to the page.

Parameters
Parameter Type Description
callback? (...args: unknown[]) => unknown Optional callback invoked after rendering completes.
Returns

this

Inherited from

Axis.render

select()
Call Signature

select(): Selection

Defined in: components/Axis/Axis.ts:525

The SVG container element as a d3 selector or DOM element.

Passing null or undefined deliberately leaves the axis unmounted — renderMode("compute") plus select(null) produces a scene-only axis (no detached SVG fallback). This is the formal contract callers in plotPaint use to compute axis layout without mounting DOM.

Returns

Selection

Inherited from

Axis.select

Call Signature

select(_: string | HTMLElement | null | undefined): this

Defined in: components/Axis/Axis.ts:526

The SVG container element as a d3 selector or DOM element.

Passing null or undefined deliberately leaves the axis unmounted — renderMode("compute") plus select(null) produces a scene-only axis (no detached SVG fallback). This is the formal contract callers in plotPaint use to compute axis layout without mounting DOM.

Parameters
Parameter Type
_ string | HTMLElement | null | required
Returns

this

Inherited from

Axis.select

shapeConfig()
Call Signature

shapeConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:540

Tick style of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.shapeConfig

Call Signature

shapeConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:541

Tick style of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.shapeConfig

titleConfig()
Call Signature

titleConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:551

Title configuration of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.titleConfig

Call Signature

titleConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:552

Title configuration of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.titleConfig

toScene()

toScene(): GroupNode

Defined in: components/Axis/Axis.ts:317

Produces a backend-agnostic scene graph for this axis with no DOM dependency: gridlines + domain bar emitted natively, tick marks/labels composed from the tick Shape's toScene(), and the title from the title TextBox's toScene().

Returns

GroupNode

Inherited from

Axis.toScene

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Axis.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Axis.translate

Properties
Property Type Default Description Inherited from Defined in
_availableTicks unknown[] required - Axis._availableTicks components/Axis/Axis.ts:98
_configDefault? D3plusConfig required - Axis._configDefault utils/BaseClass.ts:82
_d3Scale D3Scale<number> | null null - Axis._d3Scale components/Axis/Axis.ts:94
_d3ScaleNegative D3Scale<number> | null null - Axis._d3ScaleNegative components/Axis/Axis.ts:95
_data unknown[] required - Axis._data components/Axis/Axis.ts:75
_gridLineData? object[] required - Axis._gridLineData components/Axis/Axis.ts:93
_group Selection required - Axis._group components/Axis/Axis.ts:96
_labelRotation boolean | required undefined - Axis._labelRotation components/Axis/Axis.ts:76
_lastScale ((d: unknown) => number) | required undefined - Axis._lastScale components/Axis/Axis.ts:97
_managesOwnScenePaint? boolean required - Axis._managesOwnScenePaint components/Axis/Axis.ts:107
_margin Record<string, number> required - Axis._margin components/Axis/Axis.ts:77
_outerBounds Record<string, number> required - Axis._outerBounds components/Axis/Axis.ts:78
_position object required - Axis._position components/Axis/Axis.ts:79
_position.height string required - - components/Axis/Axis.ts:82
_position.horizontal boolean required - - components/Axis/Axis.ts:80
_position.opposite string required - - components/Axis/Axis.ts:85
_position.width string required - - components/Axis/Axis.ts:81
_position.x string required - - components/Axis/Axis.ts:83
_position.y string required - - components/Axis/Axis.ts:84
_sceneRenderer? SvgRenderer required - Axis._sceneRenderer components/Axis/Axis.ts:104
_select Selection required - Axis._select components/Axis/Axis.ts:74
_tickShape? Shape required - Axis._tickShape components/Axis/Axis.ts:92
_tickUnit number required - Axis._tickUnit components/Axis/Axis.ts:87
_titleClass TextBox required - Axis._titleClass components/Axis/Axis.ts:88
_transition Transition<BaseType> required - Axis._transition components/Axis/Axis.ts:100
_userFormat false | ((d: unknown) => string) | required undefined - Axis._userFormat components/Axis/Axis.ts:101
_uuid string required - Axis._uuid utils/BaseClass.ts:81
_visibleTicks unknown[] required - Axis._visibleTicks components/Axis/Axis.ts:99
ctx Record<string, unknown> required Chart-internal scratch (d3 layout instances, computed derived state). Axis.ctx utils/BaseClass.ts:79
schema Record<string, any> required Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. Axis.schema utils/BaseClass.ts:77

AxisRight

Defined in: components/Axis/AxisRight.ts:6

Shorthand method for creating an axis where the ticks are drawn to the right of the vertical domain path. Extends all functionality of the base Axis class.

Extends
Indexable

[key: string]: any

Methods

barConfig()
Call Signature

barConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:424

Axis line style.

Returns

Record<string, unknown>

Inherited from

Axis.barConfig

Call Signature

barConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:425

Axis line style.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.barConfig

config()
Call Signature

config(): D3plusConfig

Defined in: utils/BaseClass.ts:108

Methods that correspond to the key/value pairs and returns this class.

Returns

D3plusConfig

Inherited from

Axis.config

Call Signature

config(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:109

Methods that correspond to the key/value pairs and returns this class.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

Axis.config

data()
Call Signature

data(): unknown[]

Defined in: components/Axis/Axis.ts:435

An array of data points, which helps determine which ticks should be shown and which time resolution should be displayed.

Returns

unknown[]

Inherited from

Axis.data

Call Signature

data(_: unknown[]): this

Defined in: components/Axis/Axis.ts:436

An array of data points, which helps determine which ticks should be shown and which time resolution should be displayed.

Parameters
Parameter Type
_ unknown[]
Returns

this

Inherited from

Axis.data

gridConfig()
Call Signature

gridConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:444

Grid config of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.gridConfig

Call Signature

gridConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:445

Grid config of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.gridConfig

labelRotation()
Call Signature

labelRotation(): boolean | undefined

Defined in: components/Axis/Axis.ts:455

Whether to rotate horizontal axis labels -90 degrees.

Returns

boolean | undefined

Inherited from

Axis.labelRotation

Call Signature

labelRotation(_: boolean): this

Defined in: components/Axis/Axis.ts:456

Whether to rotate horizontal axis labels -90 degrees.

Parameters
Parameter Type
_ boolean
Returns

this

Inherited from

Axis.labelRotation

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Axis.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Axis.locale

measure()

measure(): this

Defined in: components/Axis/Axis.ts:511

Runs the layout pass only — scale construction, tick selection, label textWrap, and outerBounds — with no DOM access. After it returns, outerBounds() / _d3Scale / _getPosition() are populated exactly as they would be after a full render(), but no <svg>, <g>, tick shapes, or label TextBoxes are created. Answers "how much room will this axis need?" without rendering; Plot uses it to size its test-axes. Delegates to the standalone measureAxis(axis) in axisLayout.ts, so callers can run layout without owning an Axis instance.

Returns

this

Inherited from

Axis.measure

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

orient()
Call Signature

orient(): string

Defined in: components/Axis/Axis.ts:466

The orientation of the shape.

Returns

string

Inherited from

Axis.orient

Call Signature

orient(_: string): this

Defined in: components/Axis/Axis.ts:467

The orientation of the shape.

Parameters
Parameter Type
_ string
Returns

this

Inherited from

Axis.orient

outerBounds()

outerBounds(): Record<string, number>

Defined in: components/Axis/Axis.ts:497

Returns the outer bounds of the axis content. Must be called after rendering.

Returns

Record<string, number>

Example
{"width": 180, "height": 24, "x": 10, "y": 20}
Inherited from

Axis.outerBounds

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

Axis.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

Axis.parent

render()

render(callback?: (...args: unknown[]) => unknown): this

Defined in: components/Axis/Axis.ts:325

Renders the current Axis to the page.

Parameters
Parameter Type Description
callback? (...args: unknown[]) => unknown Optional callback invoked after rendering completes.
Returns

this

Inherited from

Axis.render

select()
Call Signature

select(): Selection

Defined in: components/Axis/Axis.ts:525

The SVG container element as a d3 selector or DOM element.

Passing null or undefined deliberately leaves the axis unmounted — renderMode("compute") plus select(null) produces a scene-only axis (no detached SVG fallback). This is the formal contract callers in plotPaint use to compute axis layout without mounting DOM.

Returns

Selection

Inherited from

Axis.select

Call Signature

select(_: string | HTMLElement | null | undefined): this

Defined in: components/Axis/Axis.ts:526

The SVG container element as a d3 selector or DOM element.

Passing null or undefined deliberately leaves the axis unmounted — renderMode("compute") plus select(null) produces a scene-only axis (no detached SVG fallback). This is the formal contract callers in plotPaint use to compute axis layout without mounting DOM.

Parameters
Parameter Type
_ string | HTMLElement | null | required
Returns

this

Inherited from

Axis.select

shapeConfig()
Call Signature

shapeConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:540

Tick style of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.shapeConfig

Call Signature

shapeConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:541

Tick style of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.shapeConfig

titleConfig()
Call Signature

titleConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:551

Title configuration of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.titleConfig

Call Signature

titleConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:552

Title configuration of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.titleConfig

toScene()

toScene(): GroupNode

Defined in: components/Axis/Axis.ts:317

Produces a backend-agnostic scene graph for this axis with no DOM dependency: gridlines + domain bar emitted natively, tick marks/labels composed from the tick Shape's toScene(), and the title from the title TextBox's toScene().

Returns

GroupNode

Inherited from

Axis.toScene

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Axis.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Axis.translate

Properties
Property Type Default Description Inherited from Defined in
_availableTicks unknown[] required - Axis._availableTicks components/Axis/Axis.ts:98
_configDefault? D3plusConfig required - Axis._configDefault utils/BaseClass.ts:82
_d3Scale D3Scale<number> | null null - Axis._d3Scale components/Axis/Axis.ts:94
_d3ScaleNegative D3Scale<number> | null null - Axis._d3ScaleNegative components/Axis/Axis.ts:95
_data unknown[] required - Axis._data components/Axis/Axis.ts:75
_gridLineData? object[] required - Axis._gridLineData components/Axis/Axis.ts:93
_group Selection required - Axis._group components/Axis/Axis.ts:96
_labelRotation boolean | required undefined - Axis._labelRotation components/Axis/Axis.ts:76
_lastScale ((d: unknown) => number) | required undefined - Axis._lastScale components/Axis/Axis.ts:97
_managesOwnScenePaint? boolean required - Axis._managesOwnScenePaint components/Axis/Axis.ts:107
_margin Record<string, number> required - Axis._margin components/Axis/Axis.ts:77
_outerBounds Record<string, number> required - Axis._outerBounds components/Axis/Axis.ts:78
_position object required - Axis._position components/Axis/Axis.ts:79
_position.height string required - - components/Axis/Axis.ts:82
_position.horizontal boolean required - - components/Axis/Axis.ts:80
_position.opposite string required - - components/Axis/Axis.ts:85
_position.width string required - - components/Axis/Axis.ts:81
_position.x string required - - components/Axis/Axis.ts:83
_position.y string required - - components/Axis/Axis.ts:84
_sceneRenderer? SvgRenderer required - Axis._sceneRenderer components/Axis/Axis.ts:104
_select Selection required - Axis._select components/Axis/Axis.ts:74
_tickShape? Shape required - Axis._tickShape components/Axis/Axis.ts:92
_tickUnit number required - Axis._tickUnit components/Axis/Axis.ts:87
_titleClass TextBox required - Axis._titleClass components/Axis/Axis.ts:88
_transition Transition<BaseType> required - Axis._transition components/Axis/Axis.ts:100
_userFormat false | ((d: unknown) => string) | required undefined - Axis._userFormat components/Axis/Axis.ts:101
_uuid string required - Axis._uuid utils/BaseClass.ts:81
_visibleTicks unknown[] required - Axis._visibleTicks components/Axis/Axis.ts:99
ctx Record<string, unknown> required Chart-internal scratch (d3 layout instances, computed derived state). Axis.ctx utils/BaseClass.ts:79
schema Record<string, any> required Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. Axis.schema utils/BaseClass.ts:77

AxisTop

Defined in: components/Axis/AxisTop.ts:6

Shorthand method for creating an axis where the ticks are drawn above the vertical domain path. Extends all functionality of the base Axis class.

Extends
Indexable

[key: string]: any

Methods

barConfig()
Call Signature

barConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:424

Axis line style.

Returns

Record<string, unknown>

Inherited from

Axis.barConfig

Call Signature

barConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:425

Axis line style.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.barConfig

config()
Call Signature

config(): D3plusConfig

Defined in: utils/BaseClass.ts:108

Methods that correspond to the key/value pairs and returns this class.

Returns

D3plusConfig

Inherited from

Axis.config

Call Signature

config(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:109

Methods that correspond to the key/value pairs and returns this class.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

Axis.config

data()
Call Signature

data(): unknown[]

Defined in: components/Axis/Axis.ts:435

An array of data points, which helps determine which ticks should be shown and which time resolution should be displayed.

Returns

unknown[]

Inherited from

Axis.data

Call Signature

data(_: unknown[]): this

Defined in: components/Axis/Axis.ts:436

An array of data points, which helps determine which ticks should be shown and which time resolution should be displayed.

Parameters
Parameter Type
_ unknown[]
Returns

this

Inherited from

Axis.data

gridConfig()
Call Signature

gridConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:444

Grid config of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.gridConfig

Call Signature

gridConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:445

Grid config of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.gridConfig

labelRotation()
Call Signature

labelRotation(): boolean | undefined

Defined in: components/Axis/Axis.ts:455

Whether to rotate horizontal axis labels -90 degrees.

Returns

boolean | undefined

Inherited from

Axis.labelRotation

Call Signature

labelRotation(_: boolean): this

Defined in: components/Axis/Axis.ts:456

Whether to rotate horizontal axis labels -90 degrees.

Parameters
Parameter Type
_ boolean
Returns

this

Inherited from

Axis.labelRotation

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Axis.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Axis.locale

measure()

measure(): this

Defined in: components/Axis/Axis.ts:511

Runs the layout pass only — scale construction, tick selection, label textWrap, and outerBounds — with no DOM access. After it returns, outerBounds() / _d3Scale / _getPosition() are populated exactly as they would be after a full render(), but no <svg>, <g>, tick shapes, or label TextBoxes are created. Answers "how much room will this axis need?" without rendering; Plot uses it to size its test-axes. Delegates to the standalone measureAxis(axis) in axisLayout.ts, so callers can run layout without owning an Axis instance.

Returns

this

Inherited from

Axis.measure

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Axis.on

orient()
Call Signature

orient(): string

Defined in: components/Axis/Axis.ts:466

The orientation of the shape.

Returns

string

Inherited from

Axis.orient

Call Signature

orient(_: string): this

Defined in: components/Axis/Axis.ts:467

The orientation of the shape.

Parameters
Parameter Type
_ string
Returns

this

Inherited from

Axis.orient

outerBounds()

outerBounds(): Record<string, number>

Defined in: components/Axis/Axis.ts:497

Returns the outer bounds of the axis content. Must be called after rendering.

Returns

Record<string, number>

Example
{"width": 180, "height": 24, "x": 10, "y": 20}
Inherited from

Axis.outerBounds

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

Axis.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

Axis.parent

render()

render(callback?: (...args: unknown[]) => unknown): this

Defined in: components/Axis/Axis.ts:325

Renders the current Axis to the page.

Parameters
Parameter Type Description
callback? (...args: unknown[]) => unknown Optional callback invoked after rendering completes.
Returns

this

Inherited from

Axis.render

select()
Call Signature

select(): Selection

Defined in: components/Axis/Axis.ts:525

The SVG container element as a d3 selector or DOM element.

Passing null or undefined deliberately leaves the axis unmounted — renderMode("compute") plus select(null) produces a scene-only axis (no detached SVG fallback). This is the formal contract callers in plotPaint use to compute axis layout without mounting DOM.

Returns

Selection

Inherited from

Axis.select

Call Signature

select(_: string | HTMLElement | null | undefined): this

Defined in: components/Axis/Axis.ts:526

The SVG container element as a d3 selector or DOM element.

Passing null or undefined deliberately leaves the axis unmounted — renderMode("compute") plus select(null) produces a scene-only axis (no detached SVG fallback). This is the formal contract callers in plotPaint use to compute axis layout without mounting DOM.

Parameters
Parameter Type
_ string | HTMLElement | null | required
Returns

this

Inherited from

Axis.select

shapeConfig()
Call Signature

shapeConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:540

Tick style of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.shapeConfig

Call Signature

shapeConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:541

Tick style of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.shapeConfig

titleConfig()
Call Signature

titleConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:551

Title configuration of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.titleConfig

Call Signature

titleConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:552

Title configuration of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.titleConfig

toScene()

toScene(): GroupNode

Defined in: components/Axis/Axis.ts:317

Produces a backend-agnostic scene graph for this axis with no DOM dependency: gridlines + domain bar emitted natively, tick marks/labels composed from the tick Shape's toScene(), and the title from the title TextBox's toScene().

Returns

GroupNode

Inherited from

Axis.toScene

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Axis.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Axis.translate

Properties
Property Type Default Description Inherited from Defined in
_availableTicks unknown[] required - Axis._availableTicks components/Axis/Axis.ts:98
_configDefault? D3plusConfig required - Axis._configDefault utils/BaseClass.ts:82
_d3Scale D3Scale<number> | null null - Axis._d3Scale components/Axis/Axis.ts:94
_d3ScaleNegative D3Scale<number> | null null - Axis._d3ScaleNegative components/Axis/Axis.ts:95
_data unknown[] required - Axis._data components/Axis/Axis.ts:75
_gridLineData? object[] required - Axis._gridLineData components/Axis/Axis.ts:93
_group Selection required - Axis._group components/Axis/Axis.ts:96
_labelRotation boolean | required undefined - Axis._labelRotation components/Axis/Axis.ts:76
_lastScale ((d: unknown) => number) | required undefined - Axis._lastScale components/Axis/Axis.ts:97
_managesOwnScenePaint? boolean required - Axis._managesOwnScenePaint components/Axis/Axis.ts:107
_margin Record<string, number> required - Axis._margin components/Axis/Axis.ts:77
_outerBounds Record<string, number> required - Axis._outerBounds components/Axis/Axis.ts:78
_position object required - Axis._position components/Axis/Axis.ts:79
_position.height string required - - components/Axis/Axis.ts:82
_position.horizontal boolean required - - components/Axis/Axis.ts:80
_position.opposite string required - - components/Axis/Axis.ts:85
_position.width string required - - components/Axis/Axis.ts:81
_position.x string required - - components/Axis/Axis.ts:83
_position.y string required - - components/Axis/Axis.ts:84
_sceneRenderer? SvgRenderer required - Axis._sceneRenderer components/Axis/Axis.ts:104
_select Selection required - Axis._select components/Axis/Axis.ts:74
_tickShape? Shape required - Axis._tickShape components/Axis/Axis.ts:92
_tickUnit number required - Axis._tickUnit components/Axis/Axis.ts:87
_titleClass TextBox required - Axis._titleClass components/Axis/Axis.ts:88
_transition Transition<BaseType> required - Axis._transition components/Axis/Axis.ts:100
_userFormat false | ((d: unknown) => string) | required undefined - Axis._userFormat components/Axis/Axis.ts:101
_uuid string required - Axis._uuid utils/BaseClass.ts:81
_visibleTicks unknown[] required - Axis._visibleTicks components/Axis/Axis.ts:99
ctx Record<string, unknown> required Chart-internal scratch (d3 layout instances, computed derived state). Axis.ctx utils/BaseClass.ts:79
schema Record<string, any> required Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. Axis.schema utils/BaseClass.ts:77

Bar

Defined in: shapes/Bar.ts:22

Creates SVG areas based on an array of data.

Extends
Indexable

[key: string]: any

Methods

_dataFilter()?

optional _dataFilter(data: DataPoint[]): DataPoint[]

Defined in: shapes/Shape.ts:124

Parameters
Parameter Type Description
data DataPoint[] The raw data array to filter.
Returns

DataPoint[]

Inherited from

Shape._dataFilter

active()
Call Signature

active(): ((d: DataPoint, i: number) => boolean) | null

Defined in: shapes/Shape.ts:632

The active callback function for highlighting shapes.

Returns

((d: DataPoint, i: number) => boolean) | null

Inherited from

Shape.active

Call Signature

active(_: ((d: DataPoint, i: number) => boolean) | null): this

Defined in: shapes/Shape.ts:633

The active callback function for highlighting shapes.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

this

Inherited from

Shape.active

activeStyle()
Call Signature

activeStyle(): Record<string, unknown>

Defined in: shapes/Shape.ts:647

The style to apply to active shapes.

Returns

Record<string, unknown>

Inherited from

Shape.activeStyle

Call Signature

activeStyle(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:648

The style to apply to active shapes.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.activeStyle

config()
Call Signature

config(): BarConfig

Defined in: shapes/Bar.ts:207

Narrowed .config() for Bar. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Returns

BarConfig

Overrides

Shape.config

Call Signature

config(_: Partial<BarConfig>): this

Defined in: shapes/Bar.ts:208

Narrowed .config() for Bar. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Parameters
Parameter Type
_ Partial<BarConfig>
Returns

this

Overrides

Shape.config

data()
Call Signature

data(): DataPoint[]

Defined in: shapes/Shape.ts:659

The data array used to create shapes. A shape will be drawn for each object in the array.

Returns

DataPoint[]

Inherited from

Shape.data

Call Signature

data(_: DataPoint[]): this

Defined in: shapes/Shape.ts:660

The data array used to create shapes. A shape will be drawn for each object in the array.

Parameters
Parameter Type
_ DataPoint[]
Returns

this

Inherited from

Shape.data

hover()
Call Signature

hover(): ((d: DataPoint, i: number) => boolean) | null

Defined in: shapes/Shape.ts:668

The hover callback function for highlighting shapes on mouseover.

Returns

((d: DataPoint, i: number) => boolean) | null

Inherited from

Shape.hover

Call Signature

hover(_: ((d: DataPoint, i: number) => boolean) | null): this

Defined in: shapes/Shape.ts:669

The hover callback function for highlighting shapes on mouseover.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

this

Inherited from

Shape.hover

hoverStyle()
Call Signature

hoverStyle(): Record<string, unknown>

Defined in: shapes/Shape.ts:682

The style to apply to hovered shapes.

Returns

Record<string, unknown>

Inherited from

Shape.hoverStyle

Call Signature

hoverStyle(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:683

The style to apply to hovered shapes.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.hoverStyle

labelConfig()
Call Signature

labelConfig(): Record<string, unknown>

Defined in: shapes/Shape.ts:693

A pass-through to the config method of the TextBox class used to create a shape's labels.

Returns

Record<string, unknown>

Inherited from

Shape.labelConfig

Call Signature

labelConfig(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:694

A pass-through to the config method of the TextBox class used to create a shape's labels.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.labelConfig

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Shape.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Shape.locale

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

Shape.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

Shape.parent

render()

render(callback?: () => void): this

Defined in: shapes/Shape.ts:524

Parameters
Parameter Type
callback? () => void
Returns

this

Inherited from

Shape.render

select()
Call Signature

select(): Selection

Defined in: shapes/Shape.ts:704

The SVG container element as a d3 selector or DOM element.

Returns

Selection

Inherited from

Shape.select

Call Signature

select(_: string | HTMLElement | SVGElement | null): this

Defined in: shapes/Shape.ts:705

The SVG container element as a d3 selector or DOM element.

Parameters
Parameter Type
_ string | HTMLElement | SVGElement | null
Returns

this

Inherited from

Shape.select

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: utils/BaseClass.ts:246

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Inherited from

Shape.shapeConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:247

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

Shape.shapeConfig

sort()
Call Signature

sort(): ((a: DataPoint, b: DataPoint) => number) | null

Defined in: shapes/Shape.ts:715

A comparator function used to sort shapes for layering order.

Returns

((a: DataPoint, b: DataPoint) => number) | null

Inherited from

Shape.sort

Call Signature

sort(_: ((a: DataPoint, b: DataPoint) => number) | null): this

Defined in: shapes/Shape.ts:716

A comparator function used to sort shapes for layering order.

Parameters
Parameter Type
_ ((a: DataPoint, b: DataPoint) => number) | null
Returns

this

Inherited from

Shape.sort

textureDefault()
Call Signature

textureDefault(): Record<string, unknown>

Defined in: shapes/Shape.ts:728

A series of global texture methods to be used for all textures (ie. {stroke: "darkorange", strokeWidth: 2}).

Returns

Record<string, unknown>

Inherited from

Shape.textureDefault

Call Signature

textureDefault(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:729

A series of global texture methods to be used for all textures (ie. {stroke: "darkorange", strokeWidth: 2}).

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.textureDefault

toScene()

toScene(): GroupNode

Defined in: shapes/Shape.ts:421

Produces a backend-agnostic scene graph for this shape's data, reusing the same accessors render() applies to the DOM. This is the migration seam toward the @d3plus/render pluggable backends; it has no effect on render().

Returns

GroupNode

Inherited from

Shape.toScene

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Shape.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Shape.translate

x0()
Call Signature

x0(): AccessorFn

Defined in: shapes/Bar.ts:155

The x0 (left edge) position accessor for each bar.

Returns

AccessorFn

Call Signature

x0(_: number | AccessorFn): this

Defined in: shapes/Bar.ts:156

The x0 (left edge) position accessor for each bar.

Parameters
Parameter Type
_ number | AccessorFn
Returns

this

x1()
Call Signature

x1(): AccessorFn | null

Defined in: shapes/Bar.ts:167

The x1 (right edge) position accessor for each bar.

Returns

AccessorFn | null

Call Signature

x1(_: number | AccessorFn | null): this

Defined in: shapes/Bar.ts:168

The x1 (right edge) position accessor for each bar.

Parameters
Parameter Type
_ number | AccessorFn | null
Returns

this

y0()
Call Signature

y0(): AccessorFn

Defined in: shapes/Bar.ts:180

The y0 (top edge) position accessor for each bar.

Returns

AccessorFn

Call Signature

y0(_: number | AccessorFn): this

Defined in: shapes/Bar.ts:181

The y0 (top edge) position accessor for each bar.

Parameters
Parameter Type
_ number | AccessorFn
Returns

this

y1()
Call Signature

y1(): AccessorFn | null

Defined in: shapes/Bar.ts:192

The y1 (bottom edge) position accessor for each bar.

Returns

AccessorFn | null

Call Signature

y1(_: number | AccessorFn | null): this

Defined in: shapes/Bar.ts:193

The y1 (bottom edge) position accessor for each bar.

Parameters
Parameter Type
_ number | AccessorFn | null
Returns

this

Properties
Property Type Description Inherited from Defined in
_activeGroup Selection - Shape._activeGroup shapes/Shape.ts:130
_configDefault? D3plusConfig - Shape._configDefault utils/BaseClass.ts:82
_data DataPoint[] - Shape._data shapes/Shape.ts:116
_enter Selection - Shape._enter shapes/Shape.ts:127
_exit Selection - Shape._exit shapes/Shape.ts:128
_group Selection - Shape._group shapes/Shape.ts:125
_hoverGroup Selection - Shape._hoverGroup shapes/Shape.ts:129
_labelClass TextBox - Shape._labelClass shapes/Shape.ts:117
_name string - Shape._name shapes/Shape.ts:118
_path Record<string, unknown> - Shape._path shapes/Shape.ts:131
_sceneRenderer? SvgRenderer SvgRenderer mounted by the standalone render() path; reused across redraws. Shape._sceneRenderer shapes/Shape.ts:133
_select Selection - Shape._select shapes/Shape.ts:121
_tagName string - Shape._tagName shapes/Shape.ts:119
_textureDefs Record<string, Record<string, unknown>> - Shape._textureDefs shapes/Shape.ts:120
_transition Transition<BaseType> - Shape._transition shapes/Shape.ts:122
_update Selection - Shape._update shapes/Shape.ts:126
_uuid string - Shape._uuid utils/BaseClass.ts:81
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). Shape.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. Shape.schema utils/BaseClass.ts:77

BaseClass

Defined in: utils/BaseClass.ts:67

Provides shared configuration, event handling, and locale management inherited by all d3plus classes.

Extended by
Methods

config()
Call Signature

config(): D3plusConfig

Defined in: utils/BaseClass.ts:108

Methods that correspond to the key/value pairs and returns this class.

Returns

D3plusConfig

Call Signature

config(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:109

Methods that correspond to the key/value pairs and returns this class.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: utils/BaseClass.ts:246

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:247

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Properties
Property Type Description Defined in
_configDefault? D3plusConfig - utils/BaseClass.ts:82
_uuid string - utils/BaseClass.ts:81
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. utils/BaseClass.ts:77

Box

Defined in: shapes/Box.ts:257

Creates SVG box based on an array of data.

Extends
Indexable

[key: string]: any

Methods

active()

active(_: ((d: DataPoint, i: number) => boolean) | null): void

Defined in: shapes/Box.ts:410

The active highlight state for all sub-shapes in this Box.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

void

config()
Call Signature

config(): BoxConfig

Defined in: shapes/Box.ts:502

Narrowed .config() for Box. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Returns

BoxConfig

Overrides

BaseClass.config

Call Signature

config(_: Partial<BoxConfig>): this

Defined in: shapes/Box.ts:503

Narrowed .config() for Box. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Parameters
Parameter Type
_ Partial<BoxConfig>
Returns

this

Overrides

BaseClass.config

data()
Call Signature

data(): DataPoint[]

Defined in: shapes/Box.ts:423

The data array used to create shapes.

Returns

DataPoint[]

Call Signature

data(_: DataPoint[]): this

Defined in: shapes/Box.ts:424

The data array used to create shapes.

Parameters
Parameter Type
_ DataPoint[]
Returns

this

hover()

hover(_: ((d: DataPoint, i: number) => boolean) | null): void

Defined in: shapes/Box.ts:432

The hover highlight state for all sub-shapes in this Box.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

void

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

medianConfig()
Call Signature

medianConfig(): Record<string, unknown>

Defined in: shapes/Box.ts:445

Configuration object for the median line.

Returns

Record<string, unknown>

Call Signature

medianConfig(_: Record<string, unknown>): this

Defined in: shapes/Box.ts:446

Configuration object for the median line.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

outlierConfig()
Call Signature

outlierConfig(): Record<string, unknown>

Defined in: shapes/Box.ts:456

Configuration object for each outlier point.

Returns

Record<string, unknown>

Call Signature

outlierConfig(_: Record<string, unknown>): this

Defined in: shapes/Box.ts:457

Configuration object for each outlier point.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

BaseClass.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

BaseClass.parent

rectConfig()
Call Signature

rectConfig(): Record<string, unknown>

Defined in: shapes/Box.ts:467

Configuration object for the rect shape.

Returns

Record<string, unknown>

Call Signature

rectConfig(_: Record<string, unknown>): this

Defined in: shapes/Box.ts:468

Configuration object for the rect shape.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

render()

render(): this

Defined in: shapes/Box.ts:300

Draws the Box.

Returns

this

select()
Call Signature

select(): Selection

Defined in: shapes/Box.ts:478

The SVG container element for this visualization. 3 selector or DOM element.

Returns

Selection

Call Signature

select(_: string | HTMLElement | SVGElement | null): this

Defined in: shapes/Box.ts:479

The SVG container element for this visualization. 3 selector or DOM element.

Parameters
Parameter Type
_ string | HTMLElement | SVGElement | null
Returns

this

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: utils/BaseClass.ts:246

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Inherited from

BaseClass.shapeConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:247

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

BaseClass.shapeConfig

toScene()

toScene(): GroupNode

Defined in: shapes/Box.ts:389

Compute-mode scene aggregation. When Box is rendered with renderMode("compute"), the inner Rect/Whisker/Circle/etc. shapes are mounted scene-only (no parent ); their toScene() methods produce GroupNodes that we wrap into a single Box-level group so collectComputed(boxInstance) yields the union.

Returns

GroupNode

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

whiskerConfig()
Call Signature

whiskerConfig(): Record<string, unknown>

Defined in: shapes/Box.ts:489

Configuration object for the whisker.

Returns

Record<string, unknown>

Call Signature

whiskerConfig(_: Record<string, unknown>): this

Defined in: shapes/Box.ts:490

Configuration object for the whisker.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Properties
Property Type Description Inherited from Defined in
_box Rect - - shapes/Box.ts:264
_configDefault? D3plusConfig - BaseClass._configDefault utils/BaseClass.ts:82
_data DataPoint[] - - shapes/Box.ts:262
_median Rect - - shapes/Box.ts:265
_select Selection - - shapes/Box.ts:263
_uuid string - BaseClass._uuid utils/BaseClass.ts:81
_whisker Whisker - - shapes/Box.ts:266
_whiskerEndpoint (Rect | Circle)[] - - shapes/Box.ts:267
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). BaseClass.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. BaseClass.schema utils/BaseClass.ts:77

Circle

Defined in: shapes/Circle.ts:31

Creates SVG circles based on an array of data.

Extends
Indexable

[key: string]: any

Methods

_dataFilter()?

optional _dataFilter(data: DataPoint[]): DataPoint[]

Defined in: shapes/Shape.ts:124

Parameters
Parameter Type Description
data DataPoint[] The raw data array to filter.
Returns

DataPoint[]

Inherited from

Shape._dataFilter

active()
Call Signature

active(): ((d: DataPoint, i: number) => boolean) | null

Defined in: shapes/Shape.ts:632

The active callback function for highlighting shapes.

Returns

((d: DataPoint, i: number) => boolean) | null

Inherited from

Shape.active

Call Signature

active(_: ((d: DataPoint, i: number) => boolean) | null): this

Defined in: shapes/Shape.ts:633

The active callback function for highlighting shapes.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

this

Inherited from

Shape.active

activeStyle()
Call Signature

activeStyle(): Record<string, unknown>

Defined in: shapes/Shape.ts:647

The style to apply to active shapes.

Returns

Record<string, unknown>

Inherited from

Shape.activeStyle

Call Signature

activeStyle(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:648

The style to apply to active shapes.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.activeStyle

config()
Call Signature

config(): CircleConfig

Defined in: shapes/Circle.ts:103

Narrowed .config() for Circle. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Returns

CircleConfig

Overrides

Shape.config

Call Signature

config(_: Partial<CircleConfig>): this

Defined in: shapes/Circle.ts:104

Narrowed .config() for Circle. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Parameters
Parameter Type
_ Partial<CircleConfig>
Returns

this

Overrides

Shape.config

data()
Call Signature

data(): DataPoint[]

Defined in: shapes/Shape.ts:659

The data array used to create shapes. A shape will be drawn for each object in the array.

Returns

DataPoint[]

Inherited from

Shape.data

Call Signature

data(_: DataPoint[]): this

Defined in: shapes/Shape.ts:660

The data array used to create shapes. A shape will be drawn for each object in the array.

Parameters
Parameter Type
_ DataPoint[]
Returns

this

Inherited from

Shape.data

hover()
Call Signature

hover(): ((d: DataPoint, i: number) => boolean) | null

Defined in: shapes/Shape.ts:668

The hover callback function for highlighting shapes on mouseover.

Returns

((d: DataPoint, i: number) => boolean) | null

Inherited from

Shape.hover

Call Signature

hover(_: ((d: DataPoint, i: number) => boolean) | null): this

Defined in: shapes/Shape.ts:669

The hover callback function for highlighting shapes on mouseover.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

this

Inherited from

Shape.hover

hoverStyle()
Call Signature

hoverStyle(): Record<string, unknown>

Defined in: shapes/Shape.ts:682

The style to apply to hovered shapes.

Returns

Record<string, unknown>

Inherited from

Shape.hoverStyle

Call Signature

hoverStyle(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:683

The style to apply to hovered shapes.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.hoverStyle

labelConfig()
Call Signature

labelConfig(): Record<string, unknown>

Defined in: shapes/Shape.ts:693

A pass-through to the config method of the TextBox class used to create a shape's labels.

Returns

Record<string, unknown>

Inherited from

Shape.labelConfig

Call Signature

labelConfig(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:694

A pass-through to the config method of the TextBox class used to create a shape's labels.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.labelConfig

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Shape.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Shape.locale

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

Shape.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

Shape.parent

render()

render(callback?: () => void): this

Defined in: shapes/Shape.ts:524

Parameters
Parameter Type
callback? () => void
Returns

this

Inherited from

Shape.render

select()
Call Signature

select(): Selection

Defined in: shapes/Shape.ts:704

The SVG container element as a d3 selector or DOM element.

Returns

Selection

Inherited from

Shape.select

Call Signature

select(_: string | HTMLElement | SVGElement | null): this

Defined in: shapes/Shape.ts:705

The SVG container element as a d3 selector or DOM element.

Parameters
Parameter Type
_ string | HTMLElement | SVGElement | null
Returns

this

Inherited from

Shape.select

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: utils/BaseClass.ts:246

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Inherited from

Shape.shapeConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:247

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

Shape.shapeConfig

sort()
Call Signature

sort(): ((a: DataPoint, b: DataPoint) => number) | null

Defined in: shapes/Shape.ts:715

A comparator function used to sort shapes for layering order.

Returns

((a: DataPoint, b: DataPoint) => number) | null

Inherited from

Shape.sort

Call Signature

sort(_: ((a: DataPoint, b: DataPoint) => number) | null): this

Defined in: shapes/Shape.ts:716

A comparator function used to sort shapes for layering order.

Parameters
Parameter Type
_ ((a: DataPoint, b: DataPoint) => number) | null
Returns

this

Inherited from

Shape.sort

textureDefault()
Call Signature

textureDefault(): Record<string, unknown>

Defined in: shapes/Shape.ts:728

A series of global texture methods to be used for all textures (ie. {stroke: "darkorange", strokeWidth: 2}).

Returns

Record<string, unknown>

Inherited from

Shape.textureDefault

Call Signature

textureDefault(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:729

A series of global texture methods to be used for all textures (ie. {stroke: "darkorange", strokeWidth: 2}).

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.textureDefault

toScene()

toScene(): GroupNode

Defined in: shapes/Shape.ts:421

Produces a backend-agnostic scene graph for this shape's data, reusing the same accessors render() applies to the DOM. This is the migration seam toward the @d3plus/render pluggable backends; it has no effect on render().

Returns

GroupNode

Inherited from

Shape.toScene

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Shape.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Shape.translate

Properties
Property Type Description Inherited from Defined in
_activeGroup Selection - Shape._activeGroup shapes/Shape.ts:130
_configDefault? D3plusConfig - Shape._configDefault utils/BaseClass.ts:82
_data DataPoint[] - Shape._data shapes/Shape.ts:116
_enter Selection - Shape._enter shapes/Shape.ts:127
_exit Selection - Shape._exit shapes/Shape.ts:128
_group Selection - Shape._group shapes/Shape.ts:125
_hoverGroup Selection - Shape._hoverGroup shapes/Shape.ts:129
_labelClass TextBox - Shape._labelClass shapes/Shape.ts:117
_name string - Shape._name shapes/Shape.ts:118
_path Record<string, unknown> - Shape._path shapes/Shape.ts:131
_sceneRenderer? SvgRenderer SvgRenderer mounted by the standalone render() path; reused across redraws. Shape._sceneRenderer shapes/Shape.ts:133
_select Selection - Shape._select shapes/Shape.ts:121
_tagName string - Shape._tagName shapes/Shape.ts:119
_textureDefs Record<string, Record<string, unknown>> - Shape._textureDefs shapes/Shape.ts:120
_transition Transition<BaseType> - Shape._transition shapes/Shape.ts:122
_update Selection - Shape._update shapes/Shape.ts:126
_uuid string - Shape._uuid utils/BaseClass.ts:81
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). Shape.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. Shape.schema utils/BaseClass.ts:77

ColorScale

Defined in: components/ColorScale/ColorScale.ts:63

Creates an SVG color scale based on an array of data.

Extends
Indexable

[key: string]: any

Methods

axisConfig()
Call Signature

axisConfig(): Record<string, unknown>

Defined in: components/ColorScale/ColorScale.ts:300

The ColorScale is constructed by combining an Axis for the ticks/labels and a Rect for the actual color box (or multiple boxes, as in a jenks scale). Because of this, there are separate configs for the Axis class used to display the text (axisConfig) and the Rect class used to draw the color breaks (rectConfig). This method acts as a pass-through to the config method of the Axis. An example usage of this method can be seen here.

Returns

Record<string, unknown>

Call Signature

axisConfig(_: Record<string, unknown>): this

Defined in: components/ColorScale/ColorScale.ts:301

The ColorScale is constructed by combining an Axis for the ticks/labels and a Rect for the actual color box (or multiple boxes, as in a jenks scale). Because of this, there are separate configs for the Axis class used to display the text (axisConfig) and the Rect class used to draw the color breaks (rectConfig). This method acts as a pass-through to the config method of the Axis. An example usage of this method can be seen here.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

config()
Call Signature

config(): D3plusConfig

Defined in: utils/BaseClass.ts:108

Methods that correspond to the key/value pairs and returns this class.

Returns

D3plusConfig

Inherited from

BaseClass.config

Call Signature

config(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:109

Methods that correspond to the key/value pairs and returns this class.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

BaseClass.config

data()
Call Signature

data(): DataPoint[]

Defined in: components/ColorScale/ColorScale.ts:311

The data array used to create shapes. A shape key will be drawn for each object in the array.

Returns

DataPoint[]

Call Signature

data(_: DataPoint[]): this

Defined in: components/ColorScale/ColorScale.ts:312

The data array used to create shapes. A shape key will be drawn for each object in the array.

Parameters
Parameter Type
_ DataPoint[]
Returns

this

labelConfig()
Call Signature

labelConfig(): Record<string, unknown>

Defined in: components/ColorScale/ColorScale.ts:320

A pass-through for the TextBox class used to style the labelMin and labelMax text.

Returns

Record<string, unknown>

Call Signature

labelConfig(_: Record<string, unknown>): this

Defined in: components/ColorScale/ColorScale.ts:321

A pass-through for the TextBox class used to style the labelMin and labelMax text.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

labelMax()
Call Signature

labelMax(): string | undefined

Defined in: components/ColorScale/ColorScale.ts:340

Defines a text label to be displayed off of the end of the maximum point in the scale (currently only available in horizontal orientation).

Returns

string | undefined

Call Signature

labelMax(_: string): this

Defined in: components/ColorScale/ColorScale.ts:341

Defines a text label to be displayed off of the end of the maximum point in the scale (currently only available in horizontal orientation).

Parameters
Parameter Type
_ string
Returns

this

labelMin()
Call Signature

labelMin(): string | undefined

Defined in: components/ColorScale/ColorScale.ts:331

Defines a text label to be displayed off of the end of the minimum point in the scale (currently only available in horizontal orientation).

Returns

string | undefined

Call Signature

labelMin(_: string): this

Defined in: components/ColorScale/ColorScale.ts:332

Defines a text label to be displayed off of the end of the minimum point in the scale (currently only available in horizontal orientation).

Parameters
Parameter Type
_ string
Returns

this

legendConfig()
Call Signature

legendConfig(): Record<string, unknown>

Defined in: components/ColorScale/ColorScale.ts:349

The ColorScale is constructed by combining an Axis for the ticks/labels and a Rect for the actual color box (or multiple boxes, as in a jenks scale). Because of this, there are separate configs for the Axis class used to display the text (axisConfig) and the Rect class used to draw the color breaks (rectConfig). This method acts as a pass-through to the config method of the Axis. An example usage of this method can be seen here.

Returns

Record<string, unknown>

Call Signature

legendConfig(_: Record<string, unknown>): this

Defined in: components/ColorScale/ColorScale.ts:350

The ColorScale is constructed by combining an Axis for the ticks/labels and a Rect for the actual color box (or multiple boxes, as in a jenks scale). Because of this, there are separate configs for the Axis class used to display the text (axisConfig) and the Rect class used to draw the color breaks (rectConfig). This method acts as a pass-through to the config method of the Axis. An example usage of this method can be seen here.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

outerBounds()

outerBounds(): Record<string, number>

Defined in: components/ColorScale/ColorScale.ts:362

Returns the outer bounds of the ColorScale content. Must be called after rendering.

Returns

Record<string, number>

Example
{"width": 180, "height": 24, "x": 10, "y": 20}

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

BaseClass.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

BaseClass.parent

rectConfig()
Call Signature

rectConfig(): Record<string, unknown>

Defined in: components/ColorScale/ColorScale.ts:369

The ColorScale is constructed by combining an Axis for the ticks/labels and a Rect for the actual color box (or multiple boxes, as in a jenks scale). Because of this, there are separate configs for the Axis class used to display the text (axisConfig) and the Rect class used to draw the color breaks (rectConfig). This method acts as a pass-through to the config method of the Rect. An example usage of this method can be seen here.

Returns

Record<string, unknown>

Call Signature

rectConfig(_: Record<string, unknown>): this

Defined in: components/ColorScale/ColorScale.ts:370

The ColorScale is constructed by combining an Axis for the ticks/labels and a Rect for the actual color box (or multiple boxes, as in a jenks scale). Because of this, there are separate configs for the Axis class used to display the text (axisConfig) and the Rect class used to draw the color breaks (rectConfig). This method acts as a pass-through to the config method of the Rect. An example usage of this method can be seen here.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

render()

render(callback?: (...args: unknown[]) => unknown): this

Defined in: components/ColorScale/ColorScale.ts:180

Renders the current ColorScale to the page.

Parameters
Parameter Type Description
callback? (...args: unknown[]) => unknown Optional callback invoked after rendering completes.
Returns

this

select()
Call Signature

select(): Selection

Defined in: components/ColorScale/ColorScale.ts:380

The SVG container element for this visualization. 3 selector or DOM element.

Returns

Selection

Call Signature

select(_: string | HTMLElement): this

Defined in: components/ColorScale/ColorScale.ts:381

The SVG container element for this visualization. 3 selector or DOM element.

Parameters
Parameter Type
_ string | HTMLElement
Returns

this

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: utils/BaseClass.ts:246

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Inherited from

BaseClass.shapeConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:247

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

BaseClass.shapeConfig

toScene()

toScene(): GroupNode

Defined in: components/ColorScale/ColorScale.ts:251

Produces a backend-agnostic scene graph for this ColorScale with no DOM dependency. The discrete variant (jenks/buckets/quantile) delegates to the internal Legend's toScene(); the gradient variant composes the Rect, Axis, and label TextBox scenes. The scaleGroup's translate (set by the chart's colorScale feature on g.d3plus-viz-colorScale) is read off _select so the content lands at its on-screen position.

A smooth (non-bucketed) gradient paints its Rect with a gradient:<json> fill token (see renderGradientStops); the backend materializes it into a <linearGradient> (SVG) or a CanvasGradient (Canvas). Bucketed gradients and the discrete variant use concrete per-bucket fills.

Returns

GroupNode

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

Properties
Property Type Description Inherited from Defined in
_axisClass Axis - - components/ColorScale/ColorScale.ts:69
_axisTest Axis - - components/ColorScale/ColorScale.ts:70
_colorScale? D3Scale<string> - - components/ColorScale/ColorScale.ts:71
_configDefault? D3plusConfig - BaseClass._configDefault utils/BaseClass.ts:82
_data DataPoint[] - - components/ColorScale/ColorScale.ts:72
_gradientFill? string Smooth-gradient fill token (gradient:<json>), set by renderGradientStops. - components/ColorScale/ColorScale.ts:81
_group Selection - - components/ColorScale/ColorScale.ts:73
_labelClass TextBox - - components/ColorScale/ColorScale.ts:74
_labelMax string | required - - components/ColorScale/ColorScale.ts:76
_labelMin string | required - - components/ColorScale/ColorScale.ts:75
_legendClass Legend - - components/ColorScale/ColorScale.ts:77
_outerBounds Record<string, number> - - components/ColorScale/ColorScale.ts:78
_rectClass Rect - - components/ColorScale/ColorScale.ts:79
_sceneRenderer? SvgRenderer - - components/ColorScale/ColorScale.ts:84
_select Selection - - components/ColorScale/ColorScale.ts:68
_uuid string - BaseClass._uuid utils/BaseClass.ts:81
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). BaseClass.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. BaseClass.schema utils/BaseClass.ts:77

Image

Defined in: shapes/Image.ts:39

Creates SVG images based on an array of data.

Examples
var data = {"url": "file.png", "width": "100", "height": "50"};
new Image().data([data]).render();
<image class="d3plus-Image" opacity="1" href="file.png" width="100" height="50" x="0" y="0"></image>
image().data([data])();
image().data([data])(function() { alert("draw complete!"); })
Indexable

[key: string]: any

Methods

config()
Call Signature

config(): Record<string, unknown>

Defined in: shapes/Image.ts:63

Get/set multiple config values at once. Mirrors the BaseClass.config() contract used by the other shapes (and relied on by the React wrapper): each patch key is routed through its matching fluent accessor (or data/select), with unknown keys stored on schema verbatim.

Returns

Record<string, unknown>

Call Signature

config(_: Record<string, unknown>): this

Defined in: shapes/Image.ts:64

Get/set multiple config values at once. Mirrors the BaseClass.config() contract used by the other shapes (and relied on by the React wrapper): each patch key is routed through its matching fluent accessor (or data/select), with unknown keys stored on schema verbatim.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

data()
Call Signature

data(): DataPoint[]

Defined in: shapes/Image.ts:176

The data array used to create image shapes. An tag will be drawn for each object in the array.

Returns

DataPoint[]

Call Signature

data(_: DataPoint[]): this

Defined in: shapes/Image.ts:177

The data array used to create image shapes. An tag will be drawn for each object in the array.

Parameters
Parameter Type
_ DataPoint[]
Returns

this

render()

render(callback?: () => void): this

Defined in: shapes/Image.ts:82

Renders the current Image to the page. If a callback is specified, it will be called once the images are done drawing.

Parameters
Parameter Type Description
callback? () => void Optional callback invoked after rendering completes.
Returns

this

select()
Call Signature

select(): Selection

Defined in: shapes/Image.ts:212

The SVG container element as a d3 selector or DOM element.

Returns

Selection

Call Signature

select(_: string | HTMLElement | SVGElement | null): this

Defined in: shapes/Image.ts:213

The SVG container element as a d3 selector or DOM element.

Parameters
Parameter Type
_ string | HTMLElement | SVGElement | null
Returns

this

toScene()

toScene(): GroupNode

Defined in: shapes/Image.ts:188

Compute-mode scene emission. Mirrors Shape.toScene's shape — a keyed GroupNode wrapping per-datum ImageNodes. Used by chart compositors (e.g. plotPaint) that need Image to participate in the scene graph rather than emit d3-selection DOM.

Returns

GroupNode

Properties
Property Type Defined in
_data DataPoint[] shapes/Image.ts:47
_select Selection shapes/Image.ts:46
schema Record<string, any> shapes/Image.ts:45

Legend

Defined in: components/Legend/Legend.ts:44

Creates an SVG legend based on an array of data.

Extends
Indexable

[key: string]: any

Methods

active()

active(_: unknown): this

Defined in: components/Legend/Legend.ts:237

The active method for all shapes.

Parameters
Parameter Type
_ unknown
Returns

this

config()
Call Signature

config(): D3plusConfig

Defined in: utils/BaseClass.ts:108

Methods that correspond to the key/value pairs and returns this class.

Returns

D3plusConfig

Inherited from

BaseClass.config

Call Signature

config(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:109

Methods that correspond to the key/value pairs and returns this class.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

BaseClass.config

data()
Call Signature

data(): DataPoint[]

Defined in: components/Legend/Legend.ts:247

The data array used to create shapes. A shape key will be drawn for each object in the array.

Returns

DataPoint[]

Call Signature

data(_: DataPoint[]): this

Defined in: components/Legend/Legend.ts:248

The data array used to create shapes. A shape key will be drawn for each object in the array.

Parameters
Parameter Type
_ DataPoint[]
Returns

this

hover()

hover(_: unknown): this

Defined in: components/Legend/Legend.ts:256

The hover method for all shapes.

Parameters
Parameter Type
_ unknown
Returns

this

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

outerBounds()

outerBounds(): Record<string, number>

Defined in: components/Legend/Legend.ts:268

Returns the outer bounds of the legend content. Must be called after rendering.

Returns

Record<string, number>

Example
{"width": 180, "height": 24, "x": 10, "y": 20}

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

BaseClass.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

BaseClass.parent

render()

render(callback?: (...args: unknown[]) => unknown): this

Defined in: components/Legend/Legend.ts:198

Renders the current Legend to the page.

Parameters
Parameter Type Description
callback? (...args: unknown[]) => unknown Optional callback invoked after rendering completes.
Returns

this

select()
Call Signature

select(): Selection

Defined in: components/Legend/Legend.ts:275

The SVG container element as a d3 selector or DOM element.

Returns

Selection

Call Signature

select(_: string | HTMLElement | SVGElement | null): this

Defined in: components/Legend/Legend.ts:276

The SVG container element as a d3 selector or DOM element.

Parameters
Parameter Type
_ string | HTMLElement | SVGElement | null
Returns

this

shapeConfig()
Call Signature

shapeConfig(): Record<string, unknown>

Defined in: components/Legend/Legend.ts:289

Methods that correspond to the key/value pairs for each shape.

Returns

Record<string, unknown>

Overrides

BaseClass.shapeConfig

Call Signature

shapeConfig(_: Record<string, unknown>): this

Defined in: components/Legend/Legend.ts:290

Methods that correspond to the key/value pairs for each shape.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Overrides

BaseClass.shapeConfig

titleConfig()
Call Signature

titleConfig(): Record<string, unknown>

Defined in: components/Legend/Legend.ts:300

Title configuration of the legend.

Returns

Record<string, unknown>

Call Signature

titleConfig(_: Record<string, unknown>): this

Defined in: components/Legend/Legend.ts:301

Title configuration of the legend.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

toScene()

toScene(): GroupNode

Defined in: components/Legend/Legend.ts:140

Produces a backend-agnostic scene graph for this legend with no DOM dependency: the title is composed from its TextBox.toScene(), and each swatch group is composed from the stored Shape instances' toScene() (positions resolve through the x/y accessors against this._lineData / this._outerBounds).

Returns

GroupNode

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

Properties
Property Type Description Inherited from Defined in
_configDefault? D3plusConfig - BaseClass._configDefault utils/BaseClass.ts:82
_data DataPoint[] - - components/Legend/Legend.ts:50
_group Selection - - components/Legend/Legend.ts:56
_lineData Record<string, unknown>[] - - components/Legend/Legend.ts:51
_outerBounds Record<string, number> - - components/Legend/Legend.ts:52
_rtl boolean - - components/Legend/Legend.ts:55
_sceneRenderer? SvgRenderer - - components/Legend/Legend.ts:65
_select Selection - - components/Legend/Legend.ts:53
_shapeGroup Selection - - components/Legend/Legend.ts:58
_shapes unknown[] - - components/Legend/Legend.ts:54
_titleClass TextBox - - components/Legend/Legend.ts:49
_titleGroup Selection - - components/Legend/Legend.ts:57
_titleHeight number - - components/Legend/Legend.ts:59
_titleWidth number - - components/Legend/Legend.ts:60
_uuid string - BaseClass._uuid utils/BaseClass.ts:81
_wrapLines (() => void) | required - - components/Legend/Legend.ts:61
_wrapRows (() => void) | required - - components/Legend/Legend.ts:62
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). BaseClass.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. BaseClass.schema utils/BaseClass.ts:77

Line

Defined in: shapes/Line.ts:27

Creates SVG lines based on an array of data.

Extends
Indexable

[key: string]: any

Methods

active()
Call Signature

active(): ((d: DataPoint, i: number) => boolean) | null

Defined in: shapes/Shape.ts:632

The active callback function for highlighting shapes.

Returns

((d: DataPoint, i: number) => boolean) | null

Inherited from

Shape.active

Call Signature

active(_: ((d: DataPoint, i: number) => boolean) | null): this

Defined in: shapes/Shape.ts:633

The active callback function for highlighting shapes.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

this

Inherited from

Shape.active

activeStyle()
Call Signature

activeStyle(): Record<string, unknown>

Defined in: shapes/Shape.ts:647

The style to apply to active shapes.

Returns

Record<string, unknown>

Inherited from

Shape.activeStyle

Call Signature

activeStyle(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:648

The style to apply to active shapes.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.activeStyle

config()
Call Signature

config(): LineConfig

Defined in: shapes/Line.ts:152

Narrowed .config() for Line. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Returns

LineConfig

Overrides

Shape.config

Call Signature

config(_: Partial<LineConfig>): this

Defined in: shapes/Line.ts:153

Narrowed .config() for Line. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Parameters
Parameter Type
_ Partial<LineConfig>
Returns

this

Overrides

Shape.config

data()
Call Signature

data(): DataPoint[]

Defined in: shapes/Shape.ts:659

The data array used to create shapes. A shape will be drawn for each object in the array.

Returns

DataPoint[]

Inherited from

Shape.data

Call Signature

data(_: DataPoint[]): this

Defined in: shapes/Shape.ts:660

The data array used to create shapes. A shape will be drawn for each object in the array.

Parameters
Parameter Type
_ DataPoint[]
Returns

this

Inherited from

Shape.data

hover()
Call Signature

hover(): ((d: DataPoint, i: number) => boolean) | null

Defined in: shapes/Shape.ts:668

The hover callback function for highlighting shapes on mouseover.

Returns

((d: DataPoint, i: number) => boolean) | null

Inherited from

Shape.hover

Call Signature

hover(_: ((d: DataPoint, i: number) => boolean) | null): this

Defined in: shapes/Shape.ts:669

The hover callback function for highlighting shapes on mouseover.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

this

Inherited from

Shape.hover

hoverStyle()
Call Signature

hoverStyle(): Record<string, unknown>

Defined in: shapes/Shape.ts:682

The style to apply to hovered shapes.

Returns

Record<string, unknown>

Inherited from

Shape.hoverStyle

Call Signature

hoverStyle(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:683

The style to apply to hovered shapes.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.hoverStyle

labelConfig()
Call Signature

labelConfig(): Record<string, unknown>

Defined in: shapes/Shape.ts:693

A pass-through to the config method of the TextBox class used to create a shape's labels.

Returns

Record<string, unknown>

Inherited from

Shape.labelConfig

Call Signature

labelConfig(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:694

A pass-through to the config method of the TextBox class used to create a shape's labels.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.labelConfig

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Shape.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Shape.locale

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

Shape.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

Shape.parent

render()

render(callback?: () => void): this

Defined in: shapes/Shape.ts:524

Parameters
Parameter Type
callback? () => void
Returns

this

Inherited from

Shape.render

select()
Call Signature

select(): Selection

Defined in: shapes/Shape.ts:704

The SVG container element as a d3 selector or DOM element.

Returns

Selection

Inherited from

Shape.select

Call Signature

select(_: string | HTMLElement | SVGElement | null): this

Defined in: shapes/Shape.ts:705

The SVG container element as a d3 selector or DOM element.

Parameters
Parameter Type
_ string | HTMLElement | SVGElement | null
Returns

this

Inherited from

Shape.select

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: utils/BaseClass.ts:246

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Inherited from

Shape.shapeConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:247

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

Shape.shapeConfig

sort()
Call Signature

sort(): ((a: DataPoint, b: DataPoint) => number) | null

Defined in: shapes/Shape.ts:715

A comparator function used to sort shapes for layering order.

Returns

((a: DataPoint, b: DataPoint) => number) | null

Inherited from

Shape.sort

Call Signature

sort(_: ((a: DataPoint, b: DataPoint) => number) | null): this

Defined in: shapes/Shape.ts:716

A comparator function used to sort shapes for layering order.

Parameters
Parameter Type
_ ((a: DataPoint, b: DataPoint) => number) | null
Returns

this

Inherited from

Shape.sort

textureDefault()
Call Signature

textureDefault(): Record<string, unknown>

Defined in: shapes/Shape.ts:728

A series of global texture methods to be used for all textures (ie. {stroke: "darkorange", strokeWidth: 2}).

Returns

Record<string, unknown>

Inherited from

Shape.textureDefault

Call Signature

textureDefault(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:729

A series of global texture methods to be used for all textures (ie. {stroke: "darkorange", strokeWidth: 2}).

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.textureDefault

toScene()

toScene(): GroupNode

Defined in: shapes/Shape.ts:421

Produces a backend-agnostic scene graph for this shape's data, reusing the same accessors render() applies to the DOM. This is the migration seam toward the @d3plus/render pluggable backends; it has no effect on render().

Returns

GroupNode

Inherited from

Shape.toScene

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Shape.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Shape.translate

Properties
Property Type Description Inherited from Defined in
_activeGroup Selection - Shape._activeGroup shapes/Shape.ts:130
_configDefault? D3plusConfig - Shape._configDefault utils/BaseClass.ts:82
_data DataPoint[] - Shape._data shapes/Shape.ts:116
_enter Selection - Shape._enter shapes/Shape.ts:127
_exit Selection - Shape._exit shapes/Shape.ts:128
_group Selection - Shape._group shapes/Shape.ts:125
_hoverGroup Selection - Shape._hoverGroup shapes/Shape.ts:129
_labelClass TextBox - Shape._labelClass shapes/Shape.ts:117
_name string - Shape._name shapes/Shape.ts:118
_path Record<string, unknown> - Shape._path shapes/Shape.ts:131
_sceneRenderer? SvgRenderer SvgRenderer mounted by the standalone render() path; reused across redraws. Shape._sceneRenderer shapes/Shape.ts:133
_select Selection - Shape._select shapes/Shape.ts:121
_tagName string - Shape._tagName shapes/Shape.ts:119
_textureDefs Record<string, Record<string, unknown>> - Shape._textureDefs shapes/Shape.ts:120
_transition Transition<BaseType> - Shape._transition shapes/Shape.ts:122
_update Selection - Shape._update shapes/Shape.ts:126
_uuid string - Shape._uuid utils/BaseClass.ts:81
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). Shape.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. Shape.schema utils/BaseClass.ts:77

Path

Defined in: shapes/Path.ts:18

Creates SVG Paths based on an array of data.

Extends
Indexable

[key: string]: any

Methods

_dataFilter()?

optional _dataFilter(data: DataPoint[]): DataPoint[]

Defined in: shapes/Shape.ts:124

Parameters
Parameter Type Description
data DataPoint[] The raw data array to filter.
Returns

DataPoint[]

Inherited from

Shape._dataFilter

active()
Call Signature

active(): ((d: DataPoint, i: number) => boolean) | null

Defined in: shapes/Shape.ts:632

The active callback function for highlighting shapes.

Returns

((d: DataPoint, i: number) => boolean) | null

Inherited from

Shape.active

Call Signature

active(_: ((d: DataPoint, i: number) => boolean) | null): this

Defined in: shapes/Shape.ts:633

The active callback function for highlighting shapes.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

this

Inherited from

Shape.active

activeStyle()
Call Signature

activeStyle(): Record<string, unknown>

Defined in: shapes/Shape.ts:647

The style to apply to active shapes.

Returns

Record<string, unknown>

Inherited from

Shape.activeStyle

Call Signature

activeStyle(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:648

The style to apply to active shapes.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.activeStyle

config()
Call Signature

config(): PathConfig

Defined in: shapes/Path.ts:72

Narrowed .config() for Path. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Returns

PathConfig

Overrides

Shape.config

Call Signature

config(_: Partial<PathConfig>): this

Defined in: shapes/Path.ts:73

Narrowed .config() for Path. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Parameters
Parameter Type
_ Partial<PathConfig>
Returns

this

Overrides

Shape.config

data()
Call Signature

data(): DataPoint[]

Defined in: shapes/Shape.ts:659

The data array used to create shapes. A shape will be drawn for each object in the array.

Returns

DataPoint[]

Inherited from

Shape.data

Call Signature

data(_: DataPoint[]): this

Defined in: shapes/Shape.ts:660

The data array used to create shapes. A shape will be drawn for each object in the array.

Parameters
Parameter Type
_ DataPoint[]
Returns

this

Inherited from

Shape.data

hover()
Call Signature

hover(): ((d: DataPoint, i: number) => boolean) | null

Defined in: shapes/Shape.ts:668

The hover callback function for highlighting shapes on mouseover.

Returns

((d: DataPoint, i: number) => boolean) | null

Inherited from

Shape.hover

Call Signature

hover(_: ((d: DataPoint, i: number) => boolean) | null): this

Defined in: shapes/Shape.ts:669

The hover callback function for highlighting shapes on mouseover.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

this

Inherited from

Shape.hover

hoverStyle()
Call Signature

hoverStyle(): Record<string, unknown>

Defined in: shapes/Shape.ts:682

The style to apply to hovered shapes.

Returns

Record<string, unknown>

Inherited from

Shape.hoverStyle

Call Signature

hoverStyle(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:683

The style to apply to hovered shapes.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.hoverStyle

labelConfig()
Call Signature

labelConfig(): Record<string, unknown>

Defined in: shapes/Shape.ts:693

A pass-through to the config method of the TextBox class used to create a shape's labels.

Returns

Record<string, unknown>

Inherited from

Shape.labelConfig

Call Signature

labelConfig(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:694

A pass-through to the config method of the TextBox class used to create a shape's labels.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.labelConfig

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Shape.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Shape.locale

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

Shape.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

Shape.parent

render()

render(callback?: () => void): this

Defined in: shapes/Shape.ts:524

Parameters
Parameter Type
callback? () => void
Returns

this

Inherited from

Shape.render

select()
Call Signature

select(): Selection

Defined in: shapes/Shape.ts:704

The SVG container element as a d3 selector or DOM element.

Returns

Selection

Inherited from

Shape.select

Call Signature

select(_: string | HTMLElement | SVGElement | null): this

Defined in: shapes/Shape.ts:705

The SVG container element as a d3 selector or DOM element.

Parameters
Parameter Type
_ string | HTMLElement | SVGElement | null
Returns

this

Inherited from

Shape.select

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: utils/BaseClass.ts:246

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Inherited from

Shape.shapeConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:247

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

Shape.shapeConfig

sort()
Call Signature

sort(): ((a: DataPoint, b: DataPoint) => number) | null

Defined in: shapes/Shape.ts:715

A comparator function used to sort shapes for layering order.

Returns

((a: DataPoint, b: DataPoint) => number) | null

Inherited from

Shape.sort

Call Signature

sort(_: ((a: DataPoint, b: DataPoint) => number) | null): this

Defined in: shapes/Shape.ts:716

A comparator function used to sort shapes for layering order.

Parameters
Parameter Type
_ ((a: DataPoint, b: DataPoint) => number) | null
Returns

this

Inherited from

Shape.sort

textureDefault()
Call Signature

textureDefault(): Record<string, unknown>

Defined in: shapes/Shape.ts:728

A series of global texture methods to be used for all textures (ie. {stroke: "darkorange", strokeWidth: 2}).

Returns

Record<string, unknown>

Inherited from

Shape.textureDefault

Call Signature

textureDefault(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:729

A series of global texture methods to be used for all textures (ie. {stroke: "darkorange", strokeWidth: 2}).

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.textureDefault

toScene()

toScene(): GroupNode

Defined in: shapes/Shape.ts:421

Produces a backend-agnostic scene graph for this shape's data, reusing the same accessors render() applies to the DOM. This is the migration seam toward the @d3plus/render pluggable backends; it has no effect on render().

Returns

GroupNode

Inherited from

Shape.toScene

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Shape.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Shape.translate

Properties
Property Type Description Inherited from Defined in
_activeGroup Selection - Shape._activeGroup shapes/Shape.ts:130
_configDefault? D3plusConfig - Shape._configDefault utils/BaseClass.ts:82
_data DataPoint[] - Shape._data shapes/Shape.ts:116
_enter Selection - Shape._enter shapes/Shape.ts:127
_exit Selection - Shape._exit shapes/Shape.ts:128
_group Selection - Shape._group shapes/Shape.ts:125
_hoverGroup Selection - Shape._hoverGroup shapes/Shape.ts:129
_labelClass TextBox - Shape._labelClass shapes/Shape.ts:117
_name string - Shape._name shapes/Shape.ts:118
_path Record<string, unknown> - Shape._path shapes/Shape.ts:131
_sceneRenderer? SvgRenderer SvgRenderer mounted by the standalone render() path; reused across redraws. Shape._sceneRenderer shapes/Shape.ts:133
_select Selection - Shape._select shapes/Shape.ts:121
_tagName string - Shape._tagName shapes/Shape.ts:119
_textureDefs Record<string, Record<string, unknown>> - Shape._textureDefs shapes/Shape.ts:120
_transition Transition<BaseType> - Shape._transition shapes/Shape.ts:122
_update Selection - Shape._update shapes/Shape.ts:126
_uuid string - Shape._uuid utils/BaseClass.ts:81
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). Shape.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. Shape.schema utils/BaseClass.ts:77

Plot

Defined in: charts/Plot/index.ts:88

Creates an x/y plot based on an array of data.

Extends
Indexable

[key: string]: any

Methods

_drawSceneToTarget()

_drawSceneToTarget(durationOverride?: number): void

Defined in: charts/viz/Viz.ts:344

Renders this chart through the @d3plus/render pluggable backends. Called automatically by render(). The compute pass draws into this._select (an auto-created svg INSIDE the user's target div) — that svg is the off-stage detached compute svg. SvgRenderer mounts to the user's target div (the parent), as a sibling to the detached compute svg. The compute svg's children get cleared so only the scene output is visible.

Parameters
Parameter Type
durationOverride? number
Returns

void

Inherited from

Viz._drawSceneToTarget

_paint()

_paint(pCtx: PlotPaintContext): Plot

Defined in: charts/Plot/index.ts:394

Paint phase: production axis rendering, shape buffer setup, and shape emission with event handlers. Receives all cross-phase locals from _draw via pCtx (so this method has zero coupling to _draw's local scope beyond the explicit context).

Parameters
Parameter Type
pCtx PlotPaintContext
Returns

Plot

_scheduleSceneRepaint()

_scheduleSceneRepaint(): void

Defined in: charts/viz/Viz.ts:644

Coalesces interaction-driven scene repaints (hover/active dimming) into a single paint per animation frame. A fast pointer sweep across a dense chart fires a hover transition per shape crossed; painting each one synchronously rebuilt the whole scene back-to-back, saturating the main thread (~200ms stalls) so the tooltip couldn't reposition and appeared stuck at its last spot. Only the latest hover state is visible, so the intermediate paints are wasted — collapse them to one rAF-scheduled draw.

Returns

void

Inherited from

Viz._scheduleSceneRepaint

_wirePlotShapeEvents()

_wirePlotShapeEvents(shape: object, shapeKey: string, events: string[]): void

Defined in: charts/Plot/index.ts:296

Wires user-registered on() event handlers onto a freshly-configured shape instance. Splits the registered events into three buckets: global ("click"), shape-scoped ("click.shape"), and shape-class-scoped ("click.Bar" etc.). All three forward into this.schema.on[event](d.data, d.i, x, event). Extracted from Plot._paint so the chart-level event wiring is in one place.

On the scene path (SvgRenderer/CanvasRenderer) these d3-selection bindings don't fire — compute-mode shapes mount no per-shape DOM. Pointer events are instead routed by Viz._drawSceneToTarget's renderer bridge: it hit-tests via Renderer.pick, reads the picked node's stamped shapeType, and dispatches the matching global, .shape, and shape-class-scoped (.Bar) handlers — the same three buckets this method wires, so SVG and Canvas behave identically.

Parameters
Parameter Type
shape { on: unknown; }
shape.on
shapeKey string
events string[]
Returns

void

active()

active(_?: false | ((d: DataPoint, i: number) => boolean)): false | Plot | ((d: DataPoint, i: number) => boolean)

Defined in: charts/viz/VizBaseConfig.ts:29

The active callback function for highlighting shapes.

Parameters
Parameter Type
_? false | ((d: DataPoint, i: number) => boolean)
Returns

false | Plot | ((d: DataPoint, i: number) => boolean)

Inherited from

Viz.active

aggs()

aggs(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/viz/VizBaseConfig.ts:48

Custom aggregation methods for each data key.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

Inherited from

Viz.aggs

annotations()

annotations(_?: unknown): Plot | unknown[]

Defined in: charts/Plot/index.ts:409

Allows drawing custom shapes to be used as annotations in the provided x/y plot. This method accepts custom config objects for the Shape class, either a single config object or an array of config objects. Each config object requires an additional parameter, the "shape", which denotes which Shape sub-class to use (Rect, Line, etc).

Additionally, each config object can also contain an optional "layer" key, which defines whether the annotations will be displayed in "front" or in "back" of the primary visualization shapes. This value defaults to "back" if not present.

Parameters
Parameter Type
_? unknown
Returns

Plot | unknown[]

attribution()

attribution(_?: string | boolean): string | boolean | Plot

Defined in: charts/viz/VizBaseConfig.ts:57

Sets text to be shown positioned absolute on top of the visualization in the bottom-right corner. This is most often used in Geomaps to display the copyright of map tiles. The text is rendered as HTML, so any valid HTML string will render as expected (eg. anchor links work).

Parameters
Parameter Type
_? string | boolean
Returns

string | boolean | Plot

Inherited from

Viz.attribution

attributionStyle()

attributionStyle(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/viz/VizBaseConfig.ts:66

Configuration object for the attribution style.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

Inherited from

Viz.attributionStyle

axisPersist()

axisPersist(_?: boolean): boolean | Plot

Defined in: charts/Plot/index.ts:418

Determines whether the x and y axes should have their scales persist while users filter the data, the timeline being the prime example (set this to true to make the axes stay consistent when the timeline changes).

Parameters
Parameter Type
_? boolean
Returns

boolean | Plot

backConfig()

backConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/viz/VizBaseConfig.ts:77

Configuration object for the back button.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

Inherited from

Viz.backConfig

backgroundConfig()

backgroundConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/Plot/index.ts:427

A d3plus-shape configuration Object used for styling the background rectangle of the inner x/y plot (behind all of the shapes and gridlines).

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

buffer()

buffer(_?: boolean | Record<string, boolean>): Record<string, unknown> | Plot

Defined in: charts/Plot/index.ts:436

Determines whether or not to add additional padding at the ends of x or y scales. The most commone use for this is in Scatter Plots, so that the shapes do not appear directly on the axis itself. The value provided can either be true or false to toggle the behavior for all shape types, or a keyed Object for each shape type (ie. {Bar: false, Circle: true, Line: false}).

Parameters
Parameter Type
_? boolean | Record<string, boolean>
Returns

Record<string, unknown> | Plot

color()

color(_?: string | false | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)): string | false | Plot | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Defined in: charts/viz/VizBaseConfig.ts:86

Defines the main color to be used for each data point in a visualization. Can be either an accessor function or a string key to reference in each data point. If a color value is returned, it will be used as is. If a string is returned, a unique color will be assigned based on the string.

Parameters
Parameter Type
_? string | false | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)
Returns

string | false | Plot | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Inherited from

Viz.color

colorScale()

colorScale(_?: string | false | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)): string | false | Plot | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Defined in: charts/viz/VizBaseConfig.ts:104

Defines the value to be used for a color scale. Can be either an accessor function or a string key to reference in each data point.

Parameters
Parameter Type
_? string | false | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)
Returns

string | false | Plot | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Inherited from

Viz.colorScale

colorScaleConfig()

colorScaleConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/viz/VizBaseConfig.ts:123

A pass-through to the config method of ColorScale.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

Inherited from

Viz.colorScaleConfig

colorScaleMaxSize()

colorScaleMaxSize(_?: number): number | Plot

Defined in: charts/viz/VizBaseConfig.ts:158

The maximum pixel size for drawing the color scale: width for horizontal scales and height for vertical scales.

Parameters
Parameter Type
_? number
Returns

number | Plot

Inherited from

Viz.colorScaleMaxSize

colorScalePadding()

colorScalePadding(_?: boolean | ((viz: VizBase) => boolean)): boolean | Plot | ((viz: VizBase) => boolean)

Defined in: charts/viz/VizBaseConfig.ts:134

Tells the colorScale whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the colorScale appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.

Parameters
Parameter Type
_? boolean | ((viz: VizBase) => boolean)
Returns

boolean | Plot | ((viz: VizBase) => boolean)

Inherited from

Viz.colorScalePadding

colorScalePosition()

colorScalePosition(_?: string | boolean | (() => string | boolean)): string | boolean | Plot | (() => string | boolean)

Defined in: charts/viz/VizBaseConfig.ts:146

Defines which side of the visualization to anchor the color scale. Acceptable values are "top", "bottom", "left", "right", and false. A false value will cause the color scale to not be displayed, but will still color shapes based on the scale.

Parameters
Parameter Type
_? string | boolean | (() => string | boolean)
Returns

string | boolean | Plot | (() => string | boolean)

Inherited from

Viz.colorScalePosition

confidence()

confidence(_?: unknown): false | Plot | [number, number]

Defined in: charts/Plot/index.ts:464

The confidence interval as an array of [lower, upper] bounds.

Parameters
Parameter Type
_? unknown
Returns

false | Plot | [number, number]

Example
var data = {id: "alpha", value: 10, lci: 9, hci: 11};
...
// Accessor functions
.confidence([function(d) { return d.lci }, function(d) { return d.hci }])

// Or static keys
.confidence(["lci", "hci"])

confidenceConfig()

confidenceConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/Plot/index.ts:481

Configuration object for shapes rendered as confidence intervals.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

config()
Call Signature

config(): D3plusConfig

Defined in: utils/BaseClass.ts:108

Methods that correspond to the key/value pairs and returns this class.

Returns

D3plusConfig

Inherited from

Viz.config

Call Signature

config(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:109

Methods that correspond to the key/value pairs and returns this class.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

Viz.config

data()

data(_?: string | DataPoint[] | { headers: Record<string, string>; url: string; }, f?: (data: DataPoint[]) => Record<string, unknown> | DataPoint[]): Plot | DataPoint[]

Defined in: charts/viz/VizBaseConfig.ts:176

The primary data array used to draw the visualization. The value passed should be an Array of objects or a String representing a filepath or URL to be loaded. The following filetypes are supported: csv, tsv, txt, and json.

If your data URL needs specific headers to be set, an Object with "url" and "headers" keys may also be passed.

Additionally, a custom formatting function can be passed as a second argument to this method. This custom function will be passed the data that has been loaded, as long as there are no errors. This function should return the final array of obejcts to be used as the primary data array. For example, some JSON APIs return the headers split from the data values to save bandwidth. These would need be joined using a custom formatter.

If you would like to specify certain configuration options based on the yet-to-be-loaded data, you can also return a full config object from the data formatter (including the new data array as a key in the object).

Defaults to an empty array ([]).

Parameters
Parameter Type Description
_? string | DataPoint[] | { headers: Record<string, string>; url: string; } -
f? (data: DataPoint[]) => Record<string, unknown> | DataPoint[] The data array or a URL string to load data from.
Returns

Plot | DataPoint[]

Inherited from

Viz.data

destroy()

destroy(): this

Defined in: charts/viz/Viz.ts:660

Tears down the visualization: disconnects the ResizeObserver and removes DOM event listeners. Call this when unmounting to avoid memory leaks.

Returns

this

Inherited from

Viz.destroy

detectResize()

detectResize(_?: boolean): boolean | Plot

Defined in: charts/viz/VizBaseConfig.ts:204

If the width and/or height of a Viz is not user-defined, it is determined by the size of it's parent element. When this method is set to true, the Viz will listen for the window.onresize event and adjust it's dimensions accordingly.

Parameters
Parameter Type
_? boolean
Returns

boolean | Plot

Inherited from

Viz.detectResize

detectResizeDelay()

detectResizeDelay(_?: number): number | Plot

Defined in: charts/viz/VizBaseConfig.ts:213

When resizing the browser window, this is the millisecond delay to trigger the resize event.

Parameters
Parameter Type
_? number
Returns

number | Plot

Inherited from

Viz.detectResizeDelay

detectVisible()

detectVisible(_?: boolean): boolean | Plot

Defined in: charts/viz/VizBaseConfig.ts:222

Toggles whether or not the Viz should try to detect if it visible in the current viewport. When this method is set to true, the Viz will only be rendered when it has entered the viewport either through scrolling or if it's display or visibility is changed.

Parameters
Parameter Type
_? boolean
Returns

boolean | Plot

Inherited from

Viz.detectVisible

detectVisibleInterval()

detectVisibleInterval(_?: number): number | Plot

Defined in: charts/viz/VizBaseConfig.ts:231

The interval, in milliseconds, for checking if the visualization is visible on the page.

Parameters
Parameter Type
_? number
Returns

number | Plot

Inherited from

Viz.detectVisibleInterval

discreteCutoff()

discreteCutoff(_?: number): number | Plot

Defined in: charts/Plot/index.ts:490

When the width or height of the chart is less than or equal to this pixel value, the discrete axis will not be shown. This helps produce slick sparklines. Set this value to 0 to disable the behavior entirely.

Parameters
Parameter Type
_? number
Returns

number | Plot

downloadButton()

downloadButton(_?: boolean): boolean | Plot

Defined in: charts/viz/VizBaseConfig.ts:240

Shows a button that allows for downloading the current visualization.

Parameters
Parameter Type
_? boolean
Returns

boolean | Plot

Inherited from

Viz.downloadButton

downloadConfig()

downloadConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/viz/VizBaseConfig.ts:249

Sets specific options of the saveElement function used when downloading the visualization.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

Inherited from

Viz.downloadConfig

downloadPosition()

downloadPosition(_?: string): string | Plot

Defined in: charts/viz/VizBaseConfig.ts:258

Defines which control group to add the download button into.

Parameters
Parameter Type
_? string
Returns

string | Plot

Inherited from

Viz.downloadPosition

fontFamily()

fontFamily(_?: string | string[]): string | Plot | string[]

Defined in: charts/viz/VizBaseConfig.ts:267

The font family used throughout the visualization.

Parameters
Parameter Type
_? string | string[]
Returns

string | Plot | string[]

Inherited from

Viz.fontFamily

groupBy()

groupBy(_?: string | ((d: DataPoint, i: number) => string | number | boolean | DataPoint) | (string | ((d: DataPoint, i: number) => string | number | boolean | DataPoint))[]): Plot | (d: DataPoint, i: number) => string | number | boolean | DataPoint[]

Defined in: charts/viz/VizBaseConfig.ts:300

Defines the mapping between data and shape. The value can be a String matching a key in each data point (default is "id"), or an accessor Function that returns a unique value for each data point. Additionally, an Array of these values may be provided if the visualization supports nested hierarchies.

Parameters
Parameter Type
_? string | ((d: DataPoint, i: number) => string | number | boolean | DataPoint) | (string | ((d: DataPoint, i: number) => string | number | boolean | DataPoint))[]
Returns

Plot | (d: DataPoint, i: number) => string | number | boolean | DataPoint[]

Inherited from

Viz.groupBy

groupPadding()

groupPadding(_?: number): number | Plot

Defined in: charts/Plot/index.ts:499

The pixel space between groups of bars.

Parameters
Parameter Type
_? number
Returns

number | Plot

hiddenColor()

hiddenColor(_?: string | ((d: DataPoint, i: number) => string)): string | Plot | ((d: DataPoint, i: number) => string)

Defined in: charts/viz/VizBaseConfig.ts:337

Defines the color used for legend shapes when the corresponding grouping is hidden from display (by clicking on the legend).

Parameters
Parameter Type
_? string | ((d: DataPoint, i: number) => string)
Returns

string | Plot | ((d: DataPoint, i: number) => string)

Inherited from

Viz.hiddenColor

hiddenOpacity()

hiddenOpacity(_?: number | ((d: DataPoint, i: number) => number)): number | Plot | ((d: DataPoint, i: number) => number)

Defined in: charts/viz/VizBaseConfig.ts:348

Defines the opacity used for legend labels when the corresponding grouping is hidden from display (by clicking on the legend).

Parameters
Parameter Type
_? number | ((d: DataPoint, i: number) => number)
Returns

number | Plot | ((d: DataPoint, i: number) => number)

Inherited from

Viz.hiddenOpacity

highlight()

highlight(_?: false | ((d: DataPoint, i: number) => boolean)): false | Plot | ((d: DataPoint, i: number) => boolean) | undefined

Defined in: charts/viz/VizBaseConfig.ts:418

Persistently emphasizes the data points matching the given predicate: the matching marks keep their color while every other mark is de-emphasized to a neutral gray (the "emphasis" form — highlight one series, gray the rest). Unlike hover/active (transient, opacity-based), highlight is a standing state that survives pointer movement. Pass false to clear it.

Parameters
Parameter Type
_? false | ((d: DataPoint, i: number) => boolean)
Returns

false | Plot | ((d: DataPoint, i: number) => boolean) | undefined

Inherited from

Viz.highlight

hover()

hover(_?: false | ((d: DataPoint, i: number) => boolean)): this

Defined in: charts/viz/VizBaseConfig.ts:360

The hover callback function for highlighting shapes on mouseover.

Parameters
Parameter Type
_? false | ((d: DataPoint, i: number) => boolean)
Returns

this

Inherited from

Viz.hover

label()

label(_?: string | ((d: DataPoint, i: number) => string)): string | Plot | ((d: DataPoint, i: number) => string)

Defined in: charts/viz/VizBaseConfig.ts:432

Accessor function or string key for the label of each data point.

Parameters
Parameter Type
_? string | ((d: DataPoint, i: number) => string)
Returns

string | Plot | ((d: DataPoint, i: number) => string)

Inherited from

Viz.label

labelConnectorConfig()

labelConnectorConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/Plot/index.ts:508

The d3plus-shape config used on the Line shapes created to connect lineLabels to the end of their associated Line path.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

labelPosition()

labelPosition(_?: string | ((d: DataPoint, i: number) => string)): Plot | ((d: DataPoint, i: number) => string)

Defined in: charts/Plot/index.ts:518

The behavior to be used when calculating the position and size of each shape's label(s). The value passed can either be the String name of the behavior to be used for all shapes, or an accessor Function that will be provided each data point and will be expected to return the behavior to be used for that data point. The availability and options for this method depend on the default logic for each Shape. As an example, the values "outside" or "inside" can be set for Bar shapes, whose "auto" default will calculate the best position dynamically based on the available space.

Parameters
Parameter Type
_? string | ((d: DataPoint, i: number) => string)
Returns

Plot | ((d: DataPoint, i: number) => string)

legend()

legend(_?: boolean | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean)): boolean | Plot | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean)

Defined in: charts/viz/VizBaseConfig.ts:443

Whether to display the legend.

Parameters
Parameter Type
_? boolean | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean)
Returns

boolean | Plot | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean)

Inherited from

Viz.legend

legendConfig()

legendConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/viz/VizBaseConfig.ts:459

Configuration object passed to the legend's config method.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

Inherited from

Viz.legendConfig

legendFilterInvert()

legendFilterInvert(_?: boolean | ((viz: VizBase) => boolean)): boolean | Plot | ((viz: VizBase) => boolean)

Defined in: charts/viz/VizBaseConfig.ts:468

Defines the click functionality of categorical legend squares. When set to false, clicking will hide that category and shift+clicking will solo that category. When set to true, clicking with solo that category and shift+clicking will hide that category.

Parameters
Parameter Type
_? boolean | ((viz: VizBase) => boolean)
Returns

boolean | Plot | ((viz: VizBase) => boolean)

Inherited from

Viz.legendFilterInvert

legendPadding()

legendPadding(_?: boolean | ((viz: VizBase) => boolean)): boolean | Plot | ((viz: VizBase) => boolean)

Defined in: charts/viz/VizBaseConfig.ts:480

Tells the legend whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the legend appears centered underneath the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.

Parameters
Parameter Type
_? boolean | ((viz: VizBase) => boolean)
Returns

boolean | Plot | ((viz: VizBase) => boolean)

Inherited from

Viz.legendPadding

legendPosition()

legendPosition(_?: string | (() => string)): string | Plot | (() => string)

Defined in: charts/viz/VizBaseConfig.ts:492

Defines which side of the visualization to anchor the legend. Expected values are "top", "bottom", "left", and "right".

Parameters
Parameter Type
_? string | (() => string)
Returns

string | Plot | (() => string)

Inherited from

Viz.legendPosition

legendTooltip()

legendTooltip(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/viz/VizBaseConfig.ts:502

Configuration object for the legend tooltip.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

Inherited from

Viz.legendTooltip

lineMarkerConfig()

lineMarkerConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/Plot/index.ts:530

Shape config for the Circle shapes drawn by the lineMarkers method.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

lineMarkers()

lineMarkers(_?: boolean): boolean | Plot

Defined in: charts/Plot/index.ts:539

Draws circle markers on each vertex of a Line.

Parameters
Parameter Type
_? boolean
Returns

boolean | Plot

loadingHTML()

loadingHTML(_?: string | ((viz: VizBase) => string)): string | Plot | ((viz: VizBase) => string)

Defined in: charts/viz/VizBase.ts:24

The inner HTML of the status message displayed when loading AJAX requests and displaying errors. Must be a valid HTML string or a function that, when passed this Viz instance, returns a valid HTML string.

Parameters
Parameter Type
_? string | ((viz: VizBase) => string)
Returns

string | Plot | ((viz: VizBase) => string)

Inherited from

Viz.loadingHTML

loadingMessage()

loadingMessage(_?: boolean): boolean | Plot

Defined in: charts/viz/VizBase.ts:35

Toggles the visibility of the status message that is displayed when loading AJAX requests and displaying errors.

Parameters
Parameter Type
_? boolean
Returns

boolean | Plot

Inherited from

Viz.loadingMessage

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Viz.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Viz.locale

messageMask()

messageMask(_?: string | boolean): string | boolean | Plot

Defined in: charts/viz/VizBase.ts:44

The color of the mask displayed underneath the status message when loading AJAX requests and displaying errors. Set to false to turn off the mask completely.

Parameters
Parameter Type
_? string | boolean
Returns

string | boolean | Plot

Inherited from

Viz.messageMask

messageStyle()

messageStyle(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/viz/VizBase.ts:53

Defines the CSS style properties for the status message that is displayed when loading AJAX requests and displaying errors.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

Inherited from

Viz.messageStyle

noDataHTML()

noDataHTML(_?: string | ((viz: VizBase) => string)): string | Plot | ((viz: VizBase) => string)

Defined in: charts/viz/VizBase.ts:62

The inner HTML of the status message displayed when no data is supplied to the visualization. Must be a valid HTML string or a function that, when passed this Viz instance, returns a valid HTML string.

Parameters
Parameter Type
_? string | ((viz: VizBase) => string)
Returns

string | Plot | ((viz: VizBase) => string)

Inherited from

Viz.noDataHTML

noDataMessage()

noDataMessage(_?: boolean): boolean | Plot

Defined in: charts/viz/VizBase.ts:73

Toggles the visibility of the status message that is displayed when no data is supplied to the visualization.

Parameters
Parameter Type
_? boolean
Returns

boolean | Plot

Inherited from

Viz.noDataMessage

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Viz.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Viz.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Viz.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Viz.on

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

Viz.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

Viz.parent

render()

render(callback?: () => void): this

Defined in: charts/viz/Viz.ts:260

Draws the visualization given the specified configuration.

Parameters
Parameter Type Description
callback? () => void Optional callback invoked after rendering completes.
Returns

this

Inherited from

Viz.render

renderer()
Call Signature

renderer(): "svg" | "canvas"

Defined in: charts/viz/Viz.ts:292

Selects which @d3plus/render backend paints the visible output. "svg" = SvgRenderer (default), "canvas" = CanvasRenderer. Boolean arguments both normalize to "svg".

Returns

"svg" | "canvas"

Inherited from

Viz.renderer

Call Signature

renderer(_: boolean | "svg" | "canvas"): this

Defined in: charts/viz/Viz.ts:293

Selects which @d3plus/render backend paints the visible output. "svg" = SvgRenderer (default), "canvas" = CanvasRenderer. Boolean arguments both normalize to "svg".

Parameters
Parameter Type
_ boolean | "svg" | "canvas"
Returns

this

Inherited from

Viz.renderer

renderMode()
Call Signature

renderMode(): "full" | "compute"

Defined in: charts/viz/Viz.ts:306

"full" runs the DOM enter/update/exit for every shape; "compute" skips DOM work and only populates the scene data (_textData, _shapes[i]._select, etc.) for toScene() to read. Set automatically by renderScene callers; users can also opt-in.

Returns

"full" | "compute"

Inherited from

Viz.renderMode

Call Signature

renderMode(_: "full" | "compute"): this

Defined in: charts/viz/Viz.ts:307

"full" runs the DOM enter/update/exit for every shape; "compute" skips DOM work and only populates the scene data (_textData, _shapes[i]._select, etc.) for toScene() to read. Set automatically by renderScene callers; users can also opt-in.

Parameters
Parameter Type
_ "full" | "compute"
Returns

this

Inherited from

Viz.renderMode

renderScene()

renderScene(target: Element, opts?: object): Promise<{ renderer: Renderer; scene: Scene; }>

Defined in: charts/viz/Viz.ts:321

Public entry point that renders this chart through the @d3plus/render pluggable backends. The compute pass happens via render() (in an svg auto-created inside the target div); SvgRenderer/CanvasRenderer paints the scene to the target. Returns {renderer, scene} so callers can interact with the renderer (e.g. for picking) or read the scene data.

Parameters
Parameter Type
target Element
opts? { kind?: "svg" | "canvas"; }
opts.kind? "svg" | "canvas"
Returns

Promise<{ renderer: Renderer; scene: Scene; }>

Inherited from

Viz.renderScene

scrollContainer()

scrollContainer(_?: string | HTMLElement | Window): string | Plot | HTMLElement | Window

Defined in: charts/viz/VizBase.ts:82

If using scroll or visibility detection, this method allow a custom override of the element to which the scroll detection function gets attached.

Parameters
Parameter Type
_? string | HTMLElement | Window
Returns

string | Plot | HTMLElement | Window

Inherited from

Viz.scrollContainer

select()

select(_?: string | HTMLElement): Plot | Selection<BaseType, unknown, null, undefined>

Defined in: charts/viz/VizBase.ts:93

The SVG container element as a d3 selector or DOM element. Defaults to undefined.

Parameters
Parameter Type
_? string | HTMLElement
Returns

Plot | Selection<BaseType, unknown, null, undefined>

Inherited from

Viz.select

shape()

shape(_?: string | ((d: DataPoint, i: number) => string)): string | Plot | ((d: DataPoint, i: number) => string)

Defined in: charts/viz/VizBase.ts:102

Changes the primary shape used to represent each data point in a visualization. Not all visualizations support changing shapes, this method can be provided the String name of a D3plus shape class (for example, "Rect" or "Circle"), or an accessor Function that returns the String class name to be used for each individual data point.

Parameters
Parameter Type
_? string | ((d: DataPoint, i: number) => string)
Returns

string | Plot | ((d: DataPoint, i: number) => string)

Inherited from

Viz.shape

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: charts/viz/VizBase.ts:113

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Inherited from

Viz.shapeConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: charts/viz/VizBase.ts:114

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

Viz.shapeConfig

size()

size(_?: false | PlotAccessorArg): Plot | PlotAccessor

Defined in: charts/Plot/index.ts:548

Sets the size of bubbles to the given Number, data key, or function.

Parameters
Parameter Type
_? false | PlotAccessorArg
Returns

Plot | PlotAccessor

stackOffset()

stackOffset(_?: string | StackOffsetFn): Plot | StackOffsetFn

Defined in: charts/Plot/index.ts:561

Sets the vertical offset applied to stacked series. Accepts a named offset — "diverging" (default), "none", "expand", "silhouette", or "wiggle" — or a custom offset function. Unknown names warn and fall back to "diverging". If value is not specified, returns the current stack offset function.

Parameters
Parameter Type
_? string | StackOffsetFn
Returns

Plot | StackOffsetFn

stackOrder()

stackOrder(_?: StackOrderInput): Plot | string[] | StackOrderFn

Defined in: charts/Plot/index.ts:581

Sets the order of stacked series, from the bottom of the stack upward. Accepts:

  • a named order: "descending" (default) / "ascending" by summed value, "key" / "keyReverse" alphabetically by series key, "none" / "data" for input order, or d3's "insideOut", "appearance", "reverse";
  • an Array of series keys for an explicit order;
  • a value accessor, or a {value, order} config, to rank series by an aggregate of any data field.

Unknown named strings warn and fall back to "descending". If value is not specified, returns the current stack order.

Parameters
Parameter Type
_? StackOrderInput
Returns

Plot | string[] | StackOrderFn

subtitle()

subtitle(_?: string | ((data: DataPoint[]) => string)): string | Plot | ((data: DataPoint[]) => string)

Defined in: charts/viz/VizBase.ts:124

Accessor function or string for the visualization's subtitle.

Parameters
Parameter Type
_? string | ((data: DataPoint[]) => string)
Returns

string | Plot | ((data: DataPoint[]) => string)

Inherited from

Viz.subtitle

subtitleConfig()

subtitleConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/viz/VizBase.ts:135

Configuration object for the subtitle.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

Inherited from

Viz.subtitleConfig

subtitlePadding()

subtitlePadding(_?: boolean | ((viz: VizBase) => boolean)): boolean | Plot | ((viz: VizBase) => boolean)

Defined in: charts/viz/VizBase.ts:144

Tells the subtitle whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the subtitle appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.

Parameters
Parameter Type
_? boolean | ((viz: VizBase) => boolean)
Returns

boolean | Plot | ((viz: VizBase) => boolean)

Inherited from

Viz.subtitlePadding

threshold()

threshold(_?: number | ((data: DataPoint[]) => number)): number | Plot | ((data: DataPoint[]) => number)

Defined in: charts/viz/VizBase.ts:156

The threshold value for bucketing small data points together.

Parameters
Parameter Type
_? number | ((data: DataPoint[]) => number)
Returns

number | Plot | ((data: DataPoint[]) => number)

Inherited from

Viz.threshold

thresholdKey()

thresholdKey(key?: string | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)): string | Plot | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Defined in: charts/viz/VizBase.ts:173

Accessor for the value used in the threshold algorithm.

Parameters
Parameter Type Description
key? string | ((d: DataPoint, i: number) => string | number | boolean | DataPoint) The data key used to group values for thresholding.
Returns

string | Plot | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Inherited from

Viz.thresholdKey

thresholdName()

thresholdName(_?: string | ((d: DataPoint, i: number) => string)): string | Plot | ((d: DataPoint, i: number) => string)

Defined in: charts/viz/VizBase.ts:189

The label displayed for bucketed threshold items.

Parameters
Parameter Type
_? string | ((d: DataPoint, i: number) => string)
Returns

string | Plot | ((d: DataPoint, i: number) => string)

Inherited from

Viz.thresholdName

time()

time(_?: string | false | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)): string | false | Plot | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Defined in: charts/viz/VizBase.ts:201

Accessor function or string key for the time dimension of each data point.

Parameters
Parameter Type
_? string | false | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)
Returns

string | false | Plot | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Inherited from

Viz.time

timelineConfig()

timelineConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/viz/VizBase.ts:246

Configuration object for the timeline.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

Inherited from

Viz.timelineConfig

timelineDefault()

timelineDefault(_?: string | Date | (string | Date)[]): Plot | Date[]

Defined in: charts/viz/VizBase.ts:255

The starting time or range for the timeline. Can be a single Date/String, or an Array of 2 values representing the min and max.

Parameters
Parameter Type
_? string | Date | (string | Date)[]
Returns

Plot | Date[]

Inherited from

Viz.timelineDefault

timelinePadding()

timelinePadding(_?: boolean | ((viz: VizBase) => boolean)): boolean | Plot | ((viz: VizBase) => boolean)

Defined in: charts/viz/VizBase.ts:268

Tells the timeline whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the timeline appears centered underneath the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.

Parameters
Parameter Type
_? boolean | ((viz: VizBase) => boolean)
Returns

boolean | Plot | ((viz: VizBase) => boolean)

Inherited from

Viz.timelinePadding

title()

title(_?: string | ((data: DataPoint[]) => string)): string | Plot | ((data: DataPoint[]) => string)

Defined in: charts/viz/VizBase.ts:280

Accessor function or string for the visualization's title.

Parameters
Parameter Type
_? string | ((data: DataPoint[]) => string)
Returns

string | Plot | ((data: DataPoint[]) => string)

Inherited from

Viz.title

titleConfig()

titleConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/viz/VizBase.ts:291

Configuration object for the title.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

Inherited from

Viz.titleConfig

titlePadding()

titlePadding(_?: boolean | ((viz: VizBase) => boolean)): boolean | Plot | ((viz: VizBase) => boolean)

Defined in: charts/viz/VizBase.ts:300

Tells the title whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the title appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.

Parameters
Parameter Type
_? boolean | ((viz: VizBase) => boolean)
Returns

boolean | Plot | ((viz: VizBase) => boolean)

Inherited from

Viz.titlePadding

toCanvas()

toCanvas(): unknown

Defined in: charts/viz/Viz.ts:281

Returns the underlying canvas element of the most recent render when the canvas backend is active (renderer("canvas")), or undefined otherwise. Server-side callers cast this to their native canvas to encode a raster (see @d3plus/ssr).

Returns

unknown

Inherited from

Viz.toCanvas

tooltip()

tooltip(_?: boolean | ((d: DataPoint, i: number) => boolean)): boolean | Plot | ((d: DataPoint, i: number) => boolean)

Defined in: charts/viz/VizBase.ts:311

Whether to display tooltips on hover.

Parameters
Parameter Type
_? boolean | ((d: DataPoint, i: number) => boolean)
Returns

boolean | Plot | ((d: DataPoint, i: number) => boolean)

Inherited from

Viz.tooltip

tooltipConfig()

tooltipConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/viz/VizBase.ts:322

Configuration object for the tooltip.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

Inherited from

Viz.tooltipConfig

toScene()

toScene(): Scene

Defined in: charts/Plot/index.ts:244

Composes the chart's scene graph: the native shape scenes from Viz.toScene (bars/lines/areas + labels) plus snapshots of the rendered axes, so a Plot renders fully — geometry and axes — through the @d3plus/render backends.

Returns

Scene

Overrides

Viz.toScene

toSVGString()

toSVGString(): string

Defined in: charts/viz/Viz.ts:271

Serializes the most recently rendered output to an SVG string. Returns "" if the chart has not been rendered yet. Both backends support this: the SVG backend returns its live <svg>, the canvas backend re-renders the retained scene through a throwaway SVG backend. Primarily used for server-side rendering (see @d3plus/ssr).

Returns

string

Inherited from

Viz.toSVGString

total()

total(_?: string | boolean | ((d: DataPoint, i: number) => number)): string | boolean | Plot | ((d: DataPoint, i: number) => number)

Defined in: charts/viz/VizBase.ts:331

Accessor function or string key for the total value displayed in the visualization.

Parameters
Parameter Type
_? string | boolean | ((d: DataPoint, i: number) => number)
Returns

string | boolean | Plot | ((d: DataPoint, i: number) => number)

Inherited from

Viz.total

totalConfig()

totalConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/viz/VizBase.ts:345

Configuration object for the total bar.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

Inherited from

Viz.totalConfig

totalFormat()

totalFormat(_?: (d: number) => string): Plot | ((d: number) => string)

Defined in: charts/viz/VizBase.ts:354

Formatter function for the value in the total bar.

Parameters
Parameter Type
_? (d: number) => string
Returns

Plot | ((d: number) => string)

Inherited from

Viz.totalFormat

totalPadding()

totalPadding(_?: boolean | ((viz: VizBase) => boolean)): boolean | Plot | ((viz: VizBase) => boolean)

Defined in: charts/viz/VizBase.ts:363

Tells the total whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the total appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.

Parameters
Parameter Type
_? boolean | ((viz: VizBase) => boolean)
Returns

boolean | Plot | ((viz: VizBase) => boolean)

Inherited from

Viz.totalPadding

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Viz.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Viz.translate

x()

x(_?: PlotAccessorArg): Plot | PlotAccessor

Defined in: charts/Plot/index.ts:590

Accessor function or string key for the x-axis value of each data point.

Parameters
Parameter Type
_? PlotAccessorArg
Returns

Plot | PlotAccessor

x2()

x2(_?: PlotAccessorArg): Plot | PlotAccessor

Defined in: charts/Plot/index.ts:604

Accessor function or string key for the secondary x-axis value of each data point.

Parameters
Parameter Type
_? PlotAccessorArg
Returns

Plot | PlotAccessor

x2Config()

x2Config(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/Plot/index.ts:627

A pass-through to the underlying Axis config used for the secondary x-axis. Includes additional functionality where passing "auto" as the value for the scale method will determine if the scale should be "linear" or "log" based on the provided data.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

xConfig()

xConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/Plot/index.ts:618

A pass-through to the underlying Axis config used for the x-axis. Includes additional functionality where passing "auto" as the value for the scale method will determine if the scale should be "linear" or "log" based on the provided data.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

y()

y(_?: PlotAccessorArg): Plot | PlotAccessor

Defined in: charts/Plot/index.ts:636

Accessor function or string key for the y-axis value of each data point.

Parameters
Parameter Type
_? PlotAccessorArg
Returns

Plot | PlotAccessor

y2()

y2(_?: PlotAccessorArg): Plot | PlotAccessor

Defined in: charts/Plot/index.ts:650

Accessor function or string key for the secondary y-axis value of each data point.

Parameters
Parameter Type
_? PlotAccessorArg
Returns

Plot | PlotAccessor

y2Config()

y2Config(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/Plot/index.ts:679

A pass-through to the underlying Axis config used for the secondary y-axis. Includes additional functionality where passing "auto" as the value for the scale method will determine if the scale should be "linear" or "log" based on the provided data.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

yConfig()

yConfig(_?: Record<string, unknown>): Record<string, unknown> | Plot

Defined in: charts/Plot/index.ts:666

A pass-through to the underlying Axis config used for the y-axis. Includes additional functionality where passing "auto" as the value for the scale method will determine if the scale should be "linear" or "log" based on the provided data.

Note: If a "domain" array is passed to the y-axis config, it will be reversed.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Plot

zoomBrushHandleSize()

zoomBrushHandleSize(_?: number): number | Plot

Defined in: charts/viz/VizBase.ts:374

The pixel stroke-width of the zoom brush area.

Parameters
Parameter Type
_? number
Returns

number | Plot

Inherited from

Viz.zoomBrushHandleSize

zoomBrushHandleStyle()

zoomBrushHandleStyle(_?: false | Record<string, unknown>): false | Record<string, unknown> | Plot

Defined in: charts/viz/VizBase.ts:383

An object containing CSS key/value pairs that is used to style the outer handle area of the zoom brush. Passing false will remove all default styling.

Parameters
Parameter Type
_? false | Record<string, unknown>
Returns

false | Record<string, unknown> | Plot

Inherited from

Viz.zoomBrushHandleStyle

zoomBrushSelectionStyle()

zoomBrushSelectionStyle(_?: false | Record<string, unknown>): false | Record<string, unknown> | Plot

Defined in: charts/viz/VizBase.ts:394

An object containing CSS key/value pairs that is used to style the inner selection area of the zoom brush. Passing false will remove all default styling.

Parameters
Parameter Type
_? false | Record<string, unknown>
Returns

false | Record<string, unknown> | Plot

Inherited from

Viz.zoomBrushSelectionStyle

zoomControlStyle()

zoomControlStyle(_?: false | Record<string, unknown>): false | Record<string, unknown> | Plot

Defined in: charts/viz/VizBase.ts:405

An object containing CSS key/value pairs that is used to style each zoom control button (.zoom-in, .zoom-out, .zoom-reset, and .zoom-brush). Passing false will remove all default styling.

Parameters
Parameter Type
_? false | Record<string, unknown>
Returns

false | Record<string, unknown> | Plot

Inherited from

Viz.zoomControlStyle

zoomControlStyleActive()

zoomControlStyleActive(_?: false | Record<string, unknown>): false | Record<string, unknown> | Plot

Defined in: charts/viz/VizBase.ts:416

An object containing CSS key/value pairs that is used to style each zoom control button when active (.zoom-in, .zoom-out, .zoom-reset, and .zoom-brush). Passing false will remove all default styling.

Parameters
Parameter Type
_? false | Record<string, unknown>
Returns

false | Record<string, unknown> | Plot

Inherited from

Viz.zoomControlStyleActive

zoomControlStyleHover()

zoomControlStyleHover(_?: false | Record<string, unknown>): false | Record<string, unknown> | Plot

Defined in: charts/viz/VizBase.ts:427

An object containing CSS key/value pairs that is used to style each zoom control button on hover (.zoom-in, .zoom-out, .zoom-reset, and .zoom-brush). Passing false will remove all default styling.

Parameters
Parameter Type
_? false | Record<string, unknown>
Returns

false | Record<string, unknown> | Plot

Inherited from

Viz.zoomControlStyleHover

zoomPadding()

zoomPadding(_?: number): number | Plot

Defined in: charts/viz/VizBase.ts:438

A pixel value to be used to pad all sides of a zoomed area.

Parameters
Parameter Type
_? number
Returns

number | Plot

Inherited from

Viz.zoomPadding

Properties
Property Type Description Inherited from Defined in
_configDefault? D3plusConfig - Viz._configDefault utils/BaseClass.ts:82
_uuid string - Viz._uuid utils/BaseClass.ts:81
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). Viz.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. Viz.schema utils/BaseClass.ts:77

Rect

Defined in: shapes/Rect.ts:29

Creates SVG rectangles based on an array of data. See this example for help getting started using the rectangle generator.

Extends
Indexable

[key: string]: any

Methods

_dataFilter()?

optional _dataFilter(data: DataPoint[]): DataPoint[]

Defined in: shapes/Shape.ts:124

Parameters
Parameter Type Description
data DataPoint[] The raw data array to filter.
Returns

DataPoint[]

Inherited from

Shape._dataFilter

active()
Call Signature

active(): ((d: DataPoint, i: number) => boolean) | null

Defined in: shapes/Shape.ts:632

The active callback function for highlighting shapes.

Returns

((d: DataPoint, i: number) => boolean) | null

Inherited from

Shape.active

Call Signature

active(_: ((d: DataPoint, i: number) => boolean) | null): this

Defined in: shapes/Shape.ts:633

The active callback function for highlighting shapes.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

this

Inherited from

Shape.active

activeStyle()
Call Signature

activeStyle(): Record<string, unknown>

Defined in: shapes/Shape.ts:647

The style to apply to active shapes.

Returns

Record<string, unknown>

Inherited from

Shape.activeStyle

Call Signature

activeStyle(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:648

The style to apply to active shapes.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.activeStyle

config()
Call Signature

config(): RectConfig

Defined in: shapes/Rect.ts:106

Narrowed .config() for Rect. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Returns

RectConfig

Overrides

Shape.config

Call Signature

config(_: Partial<RectConfig>): this

Defined in: shapes/Rect.ts:107

Narrowed .config() for Rect. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Parameters
Parameter Type
_ Partial<RectConfig>
Returns

this

Overrides

Shape.config

data()
Call Signature

data(): DataPoint[]

Defined in: shapes/Shape.ts:659

The data array used to create shapes. A shape will be drawn for each object in the array.

Returns

DataPoint[]

Inherited from

Shape.data

Call Signature

data(_: DataPoint[]): this

Defined in: shapes/Shape.ts:660

The data array used to create shapes. A shape will be drawn for each object in the array.

Parameters
Parameter Type
_ DataPoint[]
Returns

this

Inherited from

Shape.data

hover()
Call Signature

hover(): ((d: DataPoint, i: number) => boolean) | null

Defined in: shapes/Shape.ts:668

The hover callback function for highlighting shapes on mouseover.

Returns

((d: DataPoint, i: number) => boolean) | null

Inherited from

Shape.hover

Call Signature

hover(_: ((d: DataPoint, i: number) => boolean) | null): this

Defined in: shapes/Shape.ts:669

The hover callback function for highlighting shapes on mouseover.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

this

Inherited from

Shape.hover

hoverStyle()
Call Signature

hoverStyle(): Record<string, unknown>

Defined in: shapes/Shape.ts:682

The style to apply to hovered shapes.

Returns

Record<string, unknown>

Inherited from

Shape.hoverStyle

Call Signature

hoverStyle(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:683

The style to apply to hovered shapes.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.hoverStyle

labelConfig()
Call Signature

labelConfig(): Record<string, unknown>

Defined in: shapes/Shape.ts:693

A pass-through to the config method of the TextBox class used to create a shape's labels.

Returns

Record<string, unknown>

Inherited from

Shape.labelConfig

Call Signature

labelConfig(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:694

A pass-through to the config method of the TextBox class used to create a shape's labels.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.labelConfig

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Shape.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Shape.locale

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

Shape.on

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

Shape.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

Shape.parent

render()

render(callback?: () => void): this

Defined in: shapes/Shape.ts:524

Parameters
Parameter Type
callback? () => void
Returns

this

Inherited from

Shape.render

select()
Call Signature

select(): Selection

Defined in: shapes/Shape.ts:704

The SVG container element as a d3 selector or DOM element.

Returns

Selection

Inherited from

Shape.select

Call Signature

select(_: string | HTMLElement | SVGElement | null): this

Defined in: shapes/Shape.ts:705

The SVG container element as a d3 selector or DOM element.

Parameters
Parameter Type
_ string | HTMLElement | SVGElement | null
Returns

this

Inherited from

Shape.select

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: utils/BaseClass.ts:246

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Inherited from

Shape.shapeConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:247

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

Shape.shapeConfig

sort()
Call Signature

sort(): ((a: DataPoint, b: DataPoint) => number) | null

Defined in: shapes/Shape.ts:715

A comparator function used to sort shapes for layering order.

Returns

((a: DataPoint, b: DataPoint) => number) | null

Inherited from

Shape.sort

Call Signature

sort(_: ((a: DataPoint, b: DataPoint) => number) | null): this

Defined in: shapes/Shape.ts:716

A comparator function used to sort shapes for layering order.

Parameters
Parameter Type
_ ((a: DataPoint, b: DataPoint) => number) | null
Returns

this

Inherited from

Shape.sort

textureDefault()
Call Signature

textureDefault(): Record<string, unknown>

Defined in: shapes/Shape.ts:728

A series of global texture methods to be used for all textures (ie. {stroke: "darkorange", strokeWidth: 2}).

Returns

Record<string, unknown>

Inherited from

Shape.textureDefault

Call Signature

textureDefault(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:729

A series of global texture methods to be used for all textures (ie. {stroke: "darkorange", strokeWidth: 2}).

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Shape.textureDefault

toScene()

toScene(): GroupNode

Defined in: shapes/Shape.ts:421

Produces a backend-agnostic scene graph for this shape's data, reusing the same accessors render() applies to the DOM. This is the migration seam toward the @d3plus/render pluggable backends; it has no effect on render().

Returns

GroupNode

Inherited from

Shape.toScene

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Shape.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Shape.translate

Properties
Property Type Description Inherited from Defined in
_activeGroup Selection - Shape._activeGroup shapes/Shape.ts:130
_configDefault? D3plusConfig - Shape._configDefault utils/BaseClass.ts:82
_data DataPoint[] - Shape._data shapes/Shape.ts:116
_enter Selection - Shape._enter shapes/Shape.ts:127
_exit Selection - Shape._exit shapes/Shape.ts:128
_group Selection - Shape._group shapes/Shape.ts:125
_hoverGroup Selection - Shape._hoverGroup shapes/Shape.ts:129
_labelClass TextBox - Shape._labelClass shapes/Shape.ts:117
_name string - Shape._name shapes/Shape.ts:118
_path Record<string, unknown> - Shape._path shapes/Shape.ts:131
_sceneRenderer? SvgRenderer SvgRenderer mounted by the standalone render() path; reused across redraws. Shape._sceneRenderer shapes/Shape.ts:133
_select Selection - Shape._select shapes/Shape.ts:121
_tagName string - Shape._tagName shapes/Shape.ts:119
_textureDefs Record<string, Record<string, unknown>> - Shape._textureDefs shapes/Shape.ts:120
_transition Transition<BaseType> - Shape._transition shapes/Shape.ts:122
_update Selection - Shape._update shapes/Shape.ts:126
_uuid string - Shape._uuid utils/BaseClass.ts:81
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). Shape.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. Shape.schema utils/BaseClass.ts:77

Shape

Defined in: shapes/Shape.ts:110

An abstracted class for generating shapes.

Extends
Extended by
Indexable

[key: string]: any

Methods

_dataFilter()?

optional _dataFilter(data: DataPoint[]): DataPoint[]

Defined in: shapes/Shape.ts:124

Parameters
Parameter Type Description
data DataPoint[] The raw data array to filter.
Returns

DataPoint[]

active()
Call Signature

active(): ((d: DataPoint, i: number) => boolean) | null

Defined in: shapes/Shape.ts:632

The active callback function for highlighting shapes.

Returns

((d: DataPoint, i: number) => boolean) | null

Call Signature

active(_: ((d: DataPoint, i: number) => boolean) | null): this

Defined in: shapes/Shape.ts:633

The active callback function for highlighting shapes.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

this

activeStyle()
Call Signature

activeStyle(): Record<string, unknown>

Defined in: shapes/Shape.ts:647

The style to apply to active shapes.

Returns

Record<string, unknown>

Call Signature

activeStyle(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:648

The style to apply to active shapes.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

config()
Call Signature

config(): BaseShapeConfig

Defined in: shapes/Shape.ts:742

Narrowed .config() for Shape. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Returns

BaseShapeConfig

Overrides

BaseClass.config

Call Signature

config(_: Partial<BaseShapeConfig>): this

Defined in: shapes/Shape.ts:743

Narrowed .config() for Shape. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Parameters
Parameter Type
_ Partial<BaseShapeConfig>
Returns

this

Overrides

BaseClass.config

data()
Call Signature

data(): DataPoint[]

Defined in: shapes/Shape.ts:659

The data array used to create shapes. A shape will be drawn for each object in the array.

Returns

DataPoint[]

Call Signature

data(_: DataPoint[]): this

Defined in: shapes/Shape.ts:660

The data array used to create shapes. A shape will be drawn for each object in the array.

Parameters
Parameter Type
_ DataPoint[]
Returns

this

hover()
Call Signature

hover(): ((d: DataPoint, i: number) => boolean) | null

Defined in: shapes/Shape.ts:668

The hover callback function for highlighting shapes on mouseover.

Returns

((d: DataPoint, i: number) => boolean) | null

Call Signature

hover(_: ((d: DataPoint, i: number) => boolean) | null): this

Defined in: shapes/Shape.ts:669

The hover callback function for highlighting shapes on mouseover.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

this

hoverStyle()
Call Signature

hoverStyle(): Record<string, unknown>

Defined in: shapes/Shape.ts:682

The style to apply to hovered shapes.

Returns

Record<string, unknown>

Call Signature

hoverStyle(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:683

The style to apply to hovered shapes.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

labelConfig()
Call Signature

labelConfig(): Record<string, unknown>

Defined in: shapes/Shape.ts:693

A pass-through to the config method of the TextBox class used to create a shape's labels.

Returns

Record<string, unknown>

Call Signature

labelConfig(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:694

A pass-through to the config method of the TextBox class used to create a shape's labels.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

BaseClass.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

BaseClass.parent

render()

render(callback?: () => void): this

Defined in: shapes/Shape.ts:524

Parameters
Parameter Type
callback? () => void
Returns

this

select()
Call Signature

select(): Selection

Defined in: shapes/Shape.ts:704

The SVG container element as a d3 selector or DOM element.

Returns

Selection

Call Signature

select(_: string | HTMLElement | SVGElement | null): this

Defined in: shapes/Shape.ts:705

The SVG container element as a d3 selector or DOM element.

Parameters
Parameter Type
_ string | HTMLElement | SVGElement | null
Returns

this

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: utils/BaseClass.ts:246

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Inherited from

BaseClass.shapeConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:247

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

BaseClass.shapeConfig

sort()
Call Signature

sort(): ((a: DataPoint, b: DataPoint) => number) | null

Defined in: shapes/Shape.ts:715

A comparator function used to sort shapes for layering order.

Returns

((a: DataPoint, b: DataPoint) => number) | null

Call Signature

sort(_: ((a: DataPoint, b: DataPoint) => number) | null): this

Defined in: shapes/Shape.ts:716

A comparator function used to sort shapes for layering order.

Parameters
Parameter Type
_ ((a: DataPoint, b: DataPoint) => number) | null
Returns

this

textureDefault()
Call Signature

textureDefault(): Record<string, unknown>

Defined in: shapes/Shape.ts:728

A series of global texture methods to be used for all textures (ie. {stroke: "darkorange", strokeWidth: 2}).

Returns

Record<string, unknown>

Call Signature

textureDefault(_: Record<string, unknown>): this

Defined in: shapes/Shape.ts:729

A series of global texture methods to be used for all textures (ie. {stroke: "darkorange", strokeWidth: 2}).

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

toScene()

toScene(): GroupNode

Defined in: shapes/Shape.ts:421

Produces a backend-agnostic scene graph for this shape's data, reusing the same accessors render() applies to the DOM. This is the migration seam toward the @d3plus/render pluggable backends; it has no effect on render().

Returns

GroupNode

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

Properties
Property Type Description Inherited from Defined in
_activeGroup Selection - - shapes/Shape.ts:130
_configDefault? D3plusConfig - BaseClass._configDefault utils/BaseClass.ts:82
_data DataPoint[] - - shapes/Shape.ts:116
_enter Selection - - shapes/Shape.ts:127
_exit Selection - - shapes/Shape.ts:128
_group Selection - - shapes/Shape.ts:125
_hoverGroup Selection - - shapes/Shape.ts:129
_labelClass TextBox - - shapes/Shape.ts:117
_name string - - shapes/Shape.ts:118
_path Record<string, unknown> - - shapes/Shape.ts:131
_sceneRenderer? SvgRenderer SvgRenderer mounted by the standalone render() path; reused across redraws. - shapes/Shape.ts:133
_select Selection - - shapes/Shape.ts:121
_tagName string - - shapes/Shape.ts:119
_textureDefs Record<string, Record<string, unknown>> - - shapes/Shape.ts:120
_transition Transition<BaseType> - - shapes/Shape.ts:122
_update Selection - - shapes/Shape.ts:126
_uuid string - BaseClass._uuid utils/BaseClass.ts:81
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). BaseClass.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. BaseClass.schema utils/BaseClass.ts:77

TextBox

Defined in: components/TextBox.ts:411

Creates a wrapped text box for each point in an array of data. See this example for help getting started using the TextBox class.

Extends
Indexable

[key: string]: any

Methods

config()
Call Signature

config(): D3plusConfig

Defined in: utils/BaseClass.ts:108

Methods that correspond to the key/value pairs and returns this class.

Returns

D3plusConfig

Inherited from

BaseClass.config

Call Signature

config(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:109

Methods that correspond to the key/value pairs and returns this class.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

BaseClass.config

data()
Call Signature

data(): DataPoint[]

Defined in: components/TextBox.ts:587

The data array used to draw text boxes. A text box will be drawn for each object in the array.

Returns

DataPoint[]

Call Signature

data(_: DataPoint[]): this

Defined in: components/TextBox.ts:588

The data array used to draw text boxes. A text box will be drawn for each object in the array.

Parameters
Parameter Type
_ DataPoint[]
Returns

this

html()
Call Signature

html(): false | Record<string, string>

Defined in: components/TextBox.ts:596

Configures the ability to render simple HTML tags. Defaults to supporting <b>, <strong>, <i>, and <em>, set to false to disable or provide a mapping of tags to svg styles

Returns

false | Record<string, string>

Call Signature

html(_: boolean | Record<string, string>): this

Defined in: components/TextBox.ts:597

Configures the ability to render simple HTML tags. Defaults to supporting <b>, <strong>, <i>, and <em>, set to false to disable or provide a mapping of tags to svg styles

Parameters
Parameter Type
_ boolean | Record<string, string>
Returns

this

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

BaseClass.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

BaseClass.parent

render()

render(callback?: (...args: unknown[]) => unknown): this

Defined in: components/TextBox.ts:513

Renders the text boxes. If a callback is specified, it will be called once the shapes are done drawing.

Parameters
Parameter Type Description
callback? (...args: unknown[]) => unknown Optional callback invoked after rendering completes.
Returns

this

select()
Call Signature

select(): Selection

Defined in: components/TextBox.ts:609

The SVG container element as a d3 selector or DOM element. If not specified, an SVG element will be added to the page.

Returns

Selection

Call Signature

select(_: string | HTMLElement): this

Defined in: components/TextBox.ts:610

The SVG container element as a d3 selector or DOM element. If not specified, an SVG element will be added to the page.

Parameters
Parameter Type
_ string | HTMLElement
Returns

this

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: utils/BaseClass.ts:246

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Inherited from

BaseClass.shapeConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:247

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

BaseClass.shapeConfig

toScene()

toScene(): GroupNode

Defined in: components/TextBox.ts:448

Produces a backend-agnostic scene graph for the text boxes, reusing the same layout (_textData) and per-line positioning render() applies to the DOM.

Returns

GroupNode

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

Properties
Property Type Description Inherited from Defined in
_configDefault? D3plusConfig - BaseClass._configDefault utils/BaseClass.ts:82
_data DataPoint[] - - components/TextBox.ts:417
_select Selection - - components/TextBox.ts:416
_uuid string - BaseClass._uuid utils/BaseClass.ts:81
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). BaseClass.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. BaseClass.schema utils/BaseClass.ts:77

Timeline

Defined in: components/Timeline/Timeline.ts:44

Creates an interactive timeline brush component for selecting time periods within a visualization.

Extends
Indexable

[key: string]: any

Methods

barConfig()
Call Signature

barConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:424

Axis line style.

Returns

Record<string, unknown>

Inherited from

Axis.barConfig

Call Signature

barConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:425

Axis line style.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.barConfig

config()
Call Signature

config(): D3plusConfig

Defined in: utils/BaseClass.ts:108

Methods that correspond to the key/value pairs and returns this class.

Returns

D3plusConfig

Inherited from

Axis.config

Call Signature

config(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:109

Methods that correspond to the key/value pairs and returns this class.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

Axis.config

data()
Call Signature

data(): unknown[]

Defined in: components/Axis/Axis.ts:435

An array of data points, which helps determine which ticks should be shown and which time resolution should be displayed.

Returns

unknown[]

Inherited from

Axis.data

Call Signature

data(_: unknown[]): this

Defined in: components/Axis/Axis.ts:436

An array of data points, which helps determine which ticks should be shown and which time resolution should be displayed.

Parameters
Parameter Type
_ unknown[]
Returns

this

Inherited from

Axis.data

gridConfig()
Call Signature

gridConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:444

Grid config of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.gridConfig

Call Signature

gridConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:445

Grid config of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.gridConfig

handleConfig()
Call Signature

handleConfig(): Record<string, unknown>

Defined in: components/Timeline/Timeline.ts:616

Handle style.

Returns

Record<string, unknown>

Call Signature

handleConfig(_: Record<string, unknown>): this

Defined in: components/Timeline/Timeline.ts:617

Handle style.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

labelRotation()
Call Signature

labelRotation(): boolean | undefined

Defined in: components/Axis/Axis.ts:455

Whether to rotate horizontal axis labels -90 degrees.

Returns

boolean | undefined

Inherited from

Axis.labelRotation

Call Signature

labelRotation(_: boolean): this

Defined in: components/Axis/Axis.ts:456

Whether to rotate horizontal axis labels -90 degrees.

Parameters
Parameter Type
_ boolean
Returns

this

Inherited from

Axis.labelRotation

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Axis.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

Axis.locale

measure()

measure(): this

Defined in: components/Axis/Axis.ts:511

Runs the layout pass only — scale construction, tick selection, label textWrap, and outerBounds — with no DOM access. After it returns, outerBounds() / _d3Scale / _getPosition() are populated exactly as they would be after a full render(), but no <svg>, <g>, tick shapes, or label TextBoxes are created. Answers "how much room will this axis need?" without rendering; Plot uses it to size its test-axes. Delegates to the standalone measureAxis(axis) in axisLayout.ts, so callers can run layout without owning an Axis instance.

Returns

this

Inherited from

Axis.measure

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: components/Timeline/Timeline.ts:628

Event listener for the specified brush event typename. Mirrors the core d3-brush behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Overrides

Axis.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: components/Timeline/Timeline.ts:629

Event listener for the specified brush event typename. Mirrors the core d3-brush behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Overrides

Axis.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: components/Timeline/Timeline.ts:630

Event listener for the specified brush event typename. Mirrors the core d3-brush behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Overrides

Axis.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: components/Timeline/Timeline.ts:631

Event listener for the specified brush event typename. Mirrors the core d3-brush behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Overrides

Axis.on

orient()
Call Signature

orient(): string

Defined in: components/Axis/Axis.ts:466

The orientation of the shape.

Returns

string

Inherited from

Axis.orient

Call Signature

orient(_: string): this

Defined in: components/Axis/Axis.ts:467

The orientation of the shape.

Parameters
Parameter Type
_ string
Returns

this

Inherited from

Axis.orient

outerBounds()

outerBounds(): Record<string, number>

Defined in: components/Axis/Axis.ts:497

Returns the outer bounds of the axis content. Must be called after rendering.

Returns

Record<string, number>

Example
{"width": 180, "height": 24, "x": 10, "y": 20}
Inherited from

Axis.outerBounds

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

Axis.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

Axis.parent

playButtonConfig()
Call Signature

playButtonConfig(): Record<string, unknown>

Defined in: components/Timeline/Timeline.ts:648

The config Object for the Rect class used to create the playButton.

Returns

Record<string, unknown>

Call Signature

playButtonConfig(_: Record<string, unknown>): this

Defined in: components/Timeline/Timeline.ts:649

The config Object for the Rect class used to create the playButton.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

render()

render(callback?: (...args: unknown[]) => unknown): this

Defined in: components/Timeline/Timeline.ts:573

Draws the timeline.

Parameters
Parameter Type Description
callback? (...args: unknown[]) => unknown Optional callback invoked after rendering completes.
Returns

this

Overrides

Axis.render

select()
Call Signature

select(): Selection

Defined in: components/Axis/Axis.ts:525

The SVG container element as a d3 selector or DOM element.

Passing null or undefined deliberately leaves the axis unmounted — renderMode("compute") plus select(null) produces a scene-only axis (no detached SVG fallback). This is the formal contract callers in plotPaint use to compute axis layout without mounting DOM.

Returns

Selection

Inherited from

Axis.select

Call Signature

select(_: string | HTMLElement | null | undefined): this

Defined in: components/Axis/Axis.ts:526

The SVG container element as a d3 selector or DOM element.

Passing null or undefined deliberately leaves the axis unmounted — renderMode("compute") plus select(null) produces a scene-only axis (no detached SVG fallback). This is the formal contract callers in plotPaint use to compute axis layout without mounting DOM.

Parameters
Parameter Type
_ string | HTMLElement | null | required
Returns

this

Inherited from

Axis.select

selectionConfig()
Call Signature

selectionConfig(): Record<string, unknown>

Defined in: components/Timeline/Timeline.ts:659

Selection style.

Returns

Record<string, unknown>

Call Signature

selectionConfig(_: Record<string, unknown>): this

Defined in: components/Timeline/Timeline.ts:660

Selection style.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

shapeConfig()
Call Signature

shapeConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:540

Tick style of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.shapeConfig

Call Signature

shapeConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:541

Tick style of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.shapeConfig

titleConfig()
Call Signature

titleConfig(): Record<string, unknown>

Defined in: components/Axis/Axis.ts:551

Title configuration of the axis.

Returns

Record<string, unknown>

Inherited from

Axis.titleConfig

Call Signature

titleConfig(_: Record<string, unknown>): this

Defined in: components/Axis/Axis.ts:552

Title configuration of the axis.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Inherited from

Axis.titleConfig

toScene()

toScene(): GroupNode

Defined in: components/Timeline/Timeline.ts:555

Extends the native Axis scene with the Timeline-specific play-button TextBox.

The brush selection + handles are NOT composed here: d3-brush owns its own DOM (mounted in g.brushGroup and styled by _brushStyle), which the Viz lifts above the scene so it paints on top of the timeline ticks. That DOM brush is the sole brush visual and interaction layer — drawing a second copy from the scene only duplicated it at the wrong height (the full outer bounds rather than the tick band), so the overlay no longer lined up with the timeline.

Returns

GroupNode

Overrides

Axis.toScene

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Axis.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

Axis.translate

Properties
Property Type Default Description Inherited from Defined in
_availableTicks unknown[] required - Axis._availableTicks components/Axis/Axis.ts:98
_brush BrushBehavior<unknown> required - - components/Timeline/Timeline.ts:53
_brushGroup Selection required - - components/Timeline/Timeline.ts:54
_buttonBehaviorCurrent string required - - components/Timeline/Timeline.ts:45
_configDefault? D3plusConfig required - Axis._configDefault utils/BaseClass.ts:82
_d3Scale D3Scale<number> | null null - Axis._d3Scale components/Axis/Axis.ts:94
_d3ScaleNegative D3Scale<number> | null null - Axis._d3ScaleNegative components/Axis/Axis.ts:95
_data unknown[] required - Axis._data components/Axis/Axis.ts:75
_gridLineData? object[] required - Axis._gridLineData components/Axis/Axis.ts:93
_group Selection required - Axis._group components/Axis/Axis.ts:96
_hiddenHandles boolean required - - components/Timeline/Timeline.ts:46
_labelRotation boolean | required undefined - Axis._labelRotation components/Axis/Axis.ts:76
_lastScale ((d: unknown) => number) | required undefined - Axis._lastScale components/Axis/Axis.ts:97
_managesOwnScenePaint? boolean required - Axis._managesOwnScenePaint components/Axis/Axis.ts:107
_margin Record<string, number> required - Axis._margin components/Axis/Axis.ts:77
_onPlayToggle? () => void required - - components/Timeline/Timeline.ts:52
_outerBounds Record<string, number> required - Axis._outerBounds components/Axis/Axis.ts:78
_paddingLeft number required - - components/Timeline/Timeline.ts:55
_playButtonClass TextBox required - - components/Timeline/Timeline.ts:47
_playTimer number | false required - - components/Timeline/Timeline.ts:48
_position object required - Axis._position components/Axis/Axis.ts:79
_position.height string required - - components/Axis/Axis.ts:82
_position.horizontal boolean required - - components/Axis/Axis.ts:80
_position.opposite string required - - components/Axis/Axis.ts:85
_position.width string required - - components/Axis/Axis.ts:81
_position.x string required - - components/Axis/Axis.ts:83
_position.y string required - - components/Axis/Axis.ts:84
_sceneRenderer? SvgRenderer required - Axis._sceneRenderer components/Axis/Axis.ts:104
_select Selection required - Axis._select components/Axis/Axis.ts:74
_tickShape? Shape required - Axis._tickShape components/Axis/Axis.ts:92
_ticksWidth number required - - components/Timeline/Timeline.ts:56
_tickUnit number required - Axis._tickUnit components/Axis/Axis.ts:87
_titleClass TextBox required - Axis._titleClass components/Axis/Axis.ts:88
_transition Transition<BaseType> required - Axis._transition components/Axis/Axis.ts:100
_userFormat false | ((d: unknown) => string) | required undefined - Axis._userFormat components/Axis/Axis.ts:101
_uuid string required - Axis._uuid utils/BaseClass.ts:81
_visibleTicks unknown[] required - Axis._visibleTicks components/Axis/Axis.ts:99
ctx Record<string, unknown> required Chart-internal scratch (d3 layout instances, computed derived state). Axis.ctx utils/BaseClass.ts:79
schema Record<string, any> required Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. Axis.schema utils/BaseClass.ts:77

Tooltip

Defined in: components/Tooltip.ts:313

Creates HTML tooltips in the body of a webpage.

Extends
Indexable

[key: string]: any

Methods

arrowStyle()
Call Signature

arrowStyle(): Record<string, string>

Defined in: components/Tooltip.ts:444

CSS styles applied to the arrow element.

Returns

Record<string, string>

Call Signature

arrowStyle(_: Record<string, string>): this

Defined in: components/Tooltip.ts:445

CSS styles applied to the arrow element.

Parameters
Parameter Type
_ Record<string, string>
Returns

this

bodyStyle()
Call Signature

bodyStyle(): Record<string, string>

Defined in: components/Tooltip.ts:455

CSS styles applied to the body element.

Returns

Record<string, string>

Call Signature

bodyStyle(_: Record<string, string>): this

Defined in: components/Tooltip.ts:456

CSS styles applied to the body element.

Parameters
Parameter Type
_ Record<string, string>
Returns

this

config()
Call Signature

config(): D3plusConfig

Defined in: utils/BaseClass.ts:108

Methods that correspond to the key/value pairs and returns this class.

Returns

D3plusConfig

Inherited from

BaseClass.config

Call Signature

config(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:109

Methods that correspond to the key/value pairs and returns this class.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

BaseClass.config

data()
Call Signature

data(): DataPoint[]

Defined in: components/Tooltip.ts:492

The data array used to create tooltips.

Returns

DataPoint[]

Call Signature

data(_: DataPoint[]): this

Defined in: components/Tooltip.ts:493

The data array used to create tooltips.

Parameters
Parameter Type
_ DataPoint[]
Returns

this

footerStyle()
Call Signature

footerStyle(): Record<string, string>

Defined in: components/Tooltip.ts:501

CSS styles applied to the footer element.

Returns

Record<string, string>

Call Signature

footerStyle(_: Record<string, string>): this

Defined in: components/Tooltip.ts:502

CSS styles applied to the footer element.

Parameters
Parameter Type
_ Record<string, string>
Returns

this

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

parent()
Call Signature

parent(): HTMLElement | undefined

Defined in: components/Tooltip.ts:472

Parent element that scopes the tooltip's portal. Default (unset) uses the global <div id="d3plus-portal"> appended to <body>. When set, tooltips mount inside a .d3plus-tooltip-portal child of the given element instead — so multiple charts on a page don't fight over the global portal, and tooltips destroy cleanly when the chart goes away.

Viz auto-sets this when rendering: chart.tooltipClass.parent(chart._select.node().parentNode).

Returns

HTMLElement | undefined

Overrides

BaseClass.parent

Call Signature

parent(_: HTMLElement | null | undefined): this

Defined in: components/Tooltip.ts:473

Parent element that scopes the tooltip's portal. Default (unset) uses the global <div id="d3plus-portal"> appended to <body>. When set, tooltips mount inside a .d3plus-tooltip-portal child of the given element instead — so multiple charts on a page don't fight over the global portal, and tooltips destroy cleanly when the chart goes away.

Viz auto-sets this when rendering: chart.tooltipClass.parent(chart._select.node().parentNode).

Parameters
Parameter Type
_ HTMLElement | null | required
Returns

this

Overrides

BaseClass.parent

position()
Call Signature

position(): (d: DataPoint, i?: number) => HTMLElement | number[]

Defined in: components/Tooltip.ts:517

The position of each tooltip. Can be an HTMLElement to anchor to, a selection string, or coordinate points in reference to the client viewport (not the overall page).

Returns

(d: DataPoint, i?: number) => HTMLElement | number[]

Example
function value(d) {
return [d.x, d.y];
}
Call Signature

position(_: string | HTMLElement | number[] | ((d: DataPoint, i?: number) => HTMLElement | number[])): this

Defined in: components/Tooltip.ts:518

The position of each tooltip. Can be an HTMLElement to anchor to, a selection string, or coordinate points in reference to the client viewport (not the overall page).

Parameters
Parameter Type
_ string | HTMLElement | number[] | ((d: DataPoint, i?: number) => HTMLElement | number[])
Returns

this

Example
function value(d) {
return [d.x, d.y];
}

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: utils/BaseClass.ts:246

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Inherited from

BaseClass.shapeConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:247

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

BaseClass.shapeConfig

tableStyle()
Call Signature

tableStyle(): Record<string, string>

Defined in: components/Tooltip.ts:552

CSS styles applied to the table element.

Returns

Record<string, string>

Call Signature

tableStyle(_: Record<string, string>): this

Defined in: components/Tooltip.ts:553

CSS styles applied to the table element.

Parameters
Parameter Type
_ Record<string, string>
Returns

this

tbodyStyle()
Call Signature

tbodyStyle(): Record<string, string>

Defined in: components/Tooltip.ts:563

CSS styles applied to the table body element.

Returns

Record<string, string>

Call Signature

tbodyStyle(_: Record<string, string>): this

Defined in: components/Tooltip.ts:564

CSS styles applied to the table body element.

Parameters
Parameter Type
_ Record<string, string>
Returns

this

tdStyle()
Call Signature

tdStyle(): Record<string, string>

Defined in: components/Tooltip.ts:623

An object with CSS keys and values to be applied to all elements inside of each .

Returns

Record<string, string>

Call Signature

tdStyle(_: Record<string, string>): this

Defined in: components/Tooltip.ts:624

An object with CSS keys and values to be applied to all elements inside of each .

Parameters
Parameter Type
_ Record<string, string>
Returns

this

theadStyle()
Call Signature

theadStyle(): Record<string, string>

Defined in: components/Tooltip.ts:574

CSS styles applied to the table head element.

Returns

Record<string, string>

Call Signature

theadStyle(_: Record<string, string>): this

Defined in: components/Tooltip.ts:575

CSS styles applied to the table head element.

Parameters
Parameter Type
_ Record<string, string>
Returns

this

titleStyle()
Call Signature

titleStyle(): Record<string, string>

Defined in: components/Tooltip.ts:585

CSS styles applied to the title element.

Returns

Record<string, string>

Call Signature

titleStyle(_: Record<string, string>): this

Defined in: components/Tooltip.ts:586

CSS styles applied to the title element.

Parameters
Parameter Type
_ Record<string, string>
Returns

this

tooltipStyle()
Call Signature

tooltipStyle(): Record<string, string>

Defined in: components/Tooltip.ts:596

Overall CSS styles applied to the tooltip container.

Returns

Record<string, string>

Call Signature

tooltipStyle(_: Record<string, string>): this

Defined in: components/Tooltip.ts:597

Overall CSS styles applied to the tooltip container.

Parameters
Parameter Type
_ Record<string, string>
Returns

this

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

trStyle()
Call Signature

trStyle(): Record<string, unknown>

Defined in: components/Tooltip.ts:612

An object with CSS keys and values to be applied to all elements inside of each .

Returns

Record<string, unknown>

Example
{
"border-top": "1px solid rgba(0, 0, 0, 0.1)"
}
Call Signature

trStyle(_: Record<string, unknown>): this

Defined in: components/Tooltip.ts:613

An object with CSS keys and values to be applied to all elements inside of each .

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

Example
{
"border-top": "1px solid rgba(0, 0, 0, 0.1)"
}
Properties
Property Type Description Inherited from Defined in
_configDefault? D3plusConfig - BaseClass._configDefault utils/BaseClass.ts:82
_data DataPoint[] - - components/Tooltip.ts:318
_parentEl? HTMLElement v4: optional per-chart parent element (default: global #d3plus-portal). - components/Tooltip.ts:320
_portalEl? HTMLElement v4: this Tooltip's own portal div (a .d3plus-tooltip-portal appended to <body>). Tracked per-instance so that charts each own a distinct portal — and so parent() switches only remove THIS instance's portal, not a sibling Tooltip's. - components/Tooltip.ts:327
_tooltipRefs Record<string, { arrowDistance: number; arrowEl: HTMLElement; arrowHeight: number; reference: VirtualElement | HTMLElement; tooltip: HTMLElement; }> - - components/Tooltip.ts:328
_uuid string - BaseClass._uuid utils/BaseClass.ts:81
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). BaseClass.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. BaseClass.schema utils/BaseClass.ts:77

Viz

Defined in: charts/viz/Viz.ts:51

Creates an x/y plot based on an array of data. See this example for help getting started using the treemap generator.

Extends
  • default
Extended by
Indexable

[key: string]: any

Methods

_drawSceneToTarget()

_drawSceneToTarget(durationOverride?: number): void

Defined in: charts/viz/Viz.ts:344

Renders this chart through the @d3plus/render pluggable backends. Called automatically by render(). The compute pass draws into this._select (an auto-created svg INSIDE the user's target div) — that svg is the off-stage detached compute svg. SvgRenderer mounts to the user's target div (the parent), as a sibling to the detached compute svg. The compute svg's children get cleared so only the scene output is visible.

Parameters
Parameter Type
durationOverride? number
Returns

void

_scheduleSceneRepaint()

_scheduleSceneRepaint(): void

Defined in: charts/viz/Viz.ts:644

Coalesces interaction-driven scene repaints (hover/active dimming) into a single paint per animation frame. A fast pointer sweep across a dense chart fires a hover transition per shape crossed; painting each one synchronously rebuilt the whole scene back-to-back, saturating the main thread (~200ms stalls) so the tooltip couldn't reposition and appeared stuck at its last spot. Only the latest hover state is visible, so the intermediate paints are wasted — collapse them to one rAF-scheduled draw.

Returns

void

active()

active(_?: false | ((d: DataPoint, i: number) => boolean)): false | Viz | ((d: DataPoint, i: number) => boolean)

Defined in: charts/viz/VizBaseConfig.ts:29

The active callback function for highlighting shapes.

Parameters
Parameter Type
_? false | ((d: DataPoint, i: number) => boolean)
Returns

false | Viz | ((d: DataPoint, i: number) => boolean)

Inherited from

VizBase.active

aggs()

aggs(_?: Record<string, unknown>): Record<string, unknown> | Viz

Defined in: charts/viz/VizBaseConfig.ts:48

Custom aggregation methods for each data key.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Viz

Inherited from

VizBase.aggs

attribution()

attribution(_?: string | boolean): string | boolean | Viz

Defined in: charts/viz/VizBaseConfig.ts:57

Sets text to be shown positioned absolute on top of the visualization in the bottom-right corner. This is most often used in Geomaps to display the copyright of map tiles. The text is rendered as HTML, so any valid HTML string will render as expected (eg. anchor links work).

Parameters
Parameter Type
_? string | boolean
Returns

string | boolean | Viz

Inherited from

VizBase.attribution

attributionStyle()

attributionStyle(_?: Record<string, unknown>): Record<string, unknown> | Viz

Defined in: charts/viz/VizBaseConfig.ts:66

Configuration object for the attribution style.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Viz

Inherited from

VizBase.attributionStyle

backConfig()

backConfig(_?: Record<string, unknown>): Record<string, unknown> | Viz

Defined in: charts/viz/VizBaseConfig.ts:77

Configuration object for the back button.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Viz

Inherited from

VizBase.backConfig

color()

color(_?: string | false | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)): string | false | Viz | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Defined in: charts/viz/VizBaseConfig.ts:86

Defines the main color to be used for each data point in a visualization. Can be either an accessor function or a string key to reference in each data point. If a color value is returned, it will be used as is. If a string is returned, a unique color will be assigned based on the string.

Parameters
Parameter Type
_? string | false | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)
Returns

string | false | Viz | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Inherited from

VizBase.color

colorScale()

colorScale(_?: string | false | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)): string | false | Viz | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Defined in: charts/viz/VizBaseConfig.ts:104

Defines the value to be used for a color scale. Can be either an accessor function or a string key to reference in each data point.

Parameters
Parameter Type
_? string | false | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)
Returns

string | false | Viz | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Inherited from

VizBase.colorScale

colorScaleConfig()

colorScaleConfig(_?: Record<string, unknown>): Record<string, unknown> | Viz

Defined in: charts/viz/VizBaseConfig.ts:123

A pass-through to the config method of ColorScale.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Viz

Inherited from

VizBase.colorScaleConfig

colorScaleMaxSize()

colorScaleMaxSize(_?: number): number | Viz

Defined in: charts/viz/VizBaseConfig.ts:158

The maximum pixel size for drawing the color scale: width for horizontal scales and height for vertical scales.

Parameters
Parameter Type
_? number
Returns

number | Viz

Inherited from

VizBase.colorScaleMaxSize

colorScalePadding()

colorScalePadding(_?: boolean | ((viz: VizBase) => boolean)): boolean | Viz | ((viz: VizBase) => boolean)

Defined in: charts/viz/VizBaseConfig.ts:134

Tells the colorScale whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the colorScale appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.

Parameters
Parameter Type
_? boolean | ((viz: VizBase) => boolean)
Returns

boolean | Viz | ((viz: VizBase) => boolean)

Inherited from

VizBase.colorScalePadding

colorScalePosition()

colorScalePosition(_?: string | boolean | (() => string | boolean)): string | boolean | Viz | (() => string | boolean)

Defined in: charts/viz/VizBaseConfig.ts:146

Defines which side of the visualization to anchor the color scale. Acceptable values are "top", "bottom", "left", "right", and false. A false value will cause the color scale to not be displayed, but will still color shapes based on the scale.

Parameters
Parameter Type
_? string | boolean | (() => string | boolean)
Returns

string | boolean | Viz | (() => string | boolean)

Inherited from

VizBase.colorScalePosition

config()
Call Signature

config(): D3plusConfig

Defined in: utils/BaseClass.ts:108

Methods that correspond to the key/value pairs and returns this class.

Returns

D3plusConfig

Inherited from

VizBase.config

Call Signature

config(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:109

Methods that correspond to the key/value pairs and returns this class.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

VizBase.config

data()

data(_?: string | DataPoint[] | { headers: Record<string, string>; url: string; }, f?: (data: DataPoint[]) => Record<string, unknown> | DataPoint[]): Viz | DataPoint[]

Defined in: charts/viz/VizBaseConfig.ts:176

The primary data array used to draw the visualization. The value passed should be an Array of objects or a String representing a filepath or URL to be loaded. The following filetypes are supported: csv, tsv, txt, and json.

If your data URL needs specific headers to be set, an Object with "url" and "headers" keys may also be passed.

Additionally, a custom formatting function can be passed as a second argument to this method. This custom function will be passed the data that has been loaded, as long as there are no errors. This function should return the final array of obejcts to be used as the primary data array. For example, some JSON APIs return the headers split from the data values to save bandwidth. These would need be joined using a custom formatter.

If you would like to specify certain configuration options based on the yet-to-be-loaded data, you can also return a full config object from the data formatter (including the new data array as a key in the object).

Defaults to an empty array ([]).

Parameters
Parameter Type Description
_? string | DataPoint[] | { headers: Record<string, string>; url: string; } -
f? (data: DataPoint[]) => Record<string, unknown> | DataPoint[] The data array or a URL string to load data from.
Returns

Viz | DataPoint[]

Inherited from

VizBase.data

destroy()

destroy(): this

Defined in: charts/viz/Viz.ts:660

Tears down the visualization: disconnects the ResizeObserver and removes DOM event listeners. Call this when unmounting to avoid memory leaks.

Returns

this

detectResize()

detectResize(_?: boolean): boolean | Viz

Defined in: charts/viz/VizBaseConfig.ts:204

If the width and/or height of a Viz is not user-defined, it is determined by the size of it's parent element. When this method is set to true, the Viz will listen for the window.onresize event and adjust it's dimensions accordingly.

Parameters
Parameter Type
_? boolean
Returns

boolean | Viz

Inherited from

VizBase.detectResize

detectResizeDelay()

detectResizeDelay(_?: number): number | Viz

Defined in: charts/viz/VizBaseConfig.ts:213

When resizing the browser window, this is the millisecond delay to trigger the resize event.

Parameters
Parameter Type
_? number
Returns

number | Viz

Inherited from

VizBase.detectResizeDelay

detectVisible()

detectVisible(_?: boolean): boolean | Viz

Defined in: charts/viz/VizBaseConfig.ts:222

Toggles whether or not the Viz should try to detect if it visible in the current viewport. When this method is set to true, the Viz will only be rendered when it has entered the viewport either through scrolling or if it's display or visibility is changed.

Parameters
Parameter Type
_? boolean
Returns

boolean | Viz

Inherited from

VizBase.detectVisible

detectVisibleInterval()

detectVisibleInterval(_?: number): number | Viz

Defined in: charts/viz/VizBaseConfig.ts:231

The interval, in milliseconds, for checking if the visualization is visible on the page.

Parameters
Parameter Type
_? number
Returns

number | Viz

Inherited from

VizBase.detectVisibleInterval

downloadButton()

downloadButton(_?: boolean): boolean | Viz

Defined in: charts/viz/VizBaseConfig.ts:240

Shows a button that allows for downloading the current visualization.

Parameters
Parameter Type
_? boolean
Returns

boolean | Viz

Inherited from

VizBase.downloadButton

downloadConfig()

downloadConfig(_?: Record<string, unknown>): Record<string, unknown> | Viz

Defined in: charts/viz/VizBaseConfig.ts:249

Sets specific options of the saveElement function used when downloading the visualization.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Viz

Inherited from

VizBase.downloadConfig

downloadPosition()

downloadPosition(_?: string): string | Viz

Defined in: charts/viz/VizBaseConfig.ts:258

Defines which control group to add the download button into.

Parameters
Parameter Type
_? string
Returns

string | Viz

Inherited from

VizBase.downloadPosition

fontFamily()

fontFamily(_?: string | string[]): string | Viz | string[]

Defined in: charts/viz/VizBaseConfig.ts:267

The font family used throughout the visualization.

Parameters
Parameter Type
_? string | string[]
Returns

string | Viz | string[]

Inherited from

VizBase.fontFamily

groupBy()

groupBy(_?: string | ((d: DataPoint, i: number) => string | number | boolean | DataPoint) | (string | ((d: DataPoint, i: number) => string | number | boolean | DataPoint))[]): Viz | (d: DataPoint, i: number) => string | number | boolean | DataPoint[]

Defined in: charts/viz/VizBaseConfig.ts:300

Defines the mapping between data and shape. The value can be a String matching a key in each data point (default is "id"), or an accessor Function that returns a unique value for each data point. Additionally, an Array of these values may be provided if the visualization supports nested hierarchies.

Parameters
Parameter Type
_? string | ((d: DataPoint, i: number) => string | number | boolean | DataPoint) | (string | ((d: DataPoint, i: number) => string | number | boolean | DataPoint))[]
Returns

Viz | (d: DataPoint, i: number) => string | number | boolean | DataPoint[]

Inherited from

VizBase.groupBy

hiddenColor()

hiddenColor(_?: string | ((d: DataPoint, i: number) => string)): string | Viz | ((d: DataPoint, i: number) => string)

Defined in: charts/viz/VizBaseConfig.ts:337

Defines the color used for legend shapes when the corresponding grouping is hidden from display (by clicking on the legend).

Parameters
Parameter Type
_? string | ((d: DataPoint, i: number) => string)
Returns

string | Viz | ((d: DataPoint, i: number) => string)

Inherited from

VizBase.hiddenColor

hiddenOpacity()

hiddenOpacity(_?: number | ((d: DataPoint, i: number) => number)): number | Viz | ((d: DataPoint, i: number) => number)

Defined in: charts/viz/VizBaseConfig.ts:348

Defines the opacity used for legend labels when the corresponding grouping is hidden from display (by clicking on the legend).

Parameters
Parameter Type
_? number | ((d: DataPoint, i: number) => number)
Returns

number | Viz | ((d: DataPoint, i: number) => number)

Inherited from

VizBase.hiddenOpacity

highlight()

highlight(_?: false | ((d: DataPoint, i: number) => boolean)): false | Viz | ((d: DataPoint, i: number) => boolean) | undefined

Defined in: charts/viz/VizBaseConfig.ts:418

Persistently emphasizes the data points matching the given predicate: the matching marks keep their color while every other mark is de-emphasized to a neutral gray (the "emphasis" form — highlight one series, gray the rest). Unlike hover/active (transient, opacity-based), highlight is a standing state that survives pointer movement. Pass false to clear it.

Parameters
Parameter Type
_? false | ((d: DataPoint, i: number) => boolean)
Returns

false | Viz | ((d: DataPoint, i: number) => boolean) | undefined

Inherited from

VizBase.highlight

hover()

hover(_?: false | ((d: DataPoint, i: number) => boolean)): this

Defined in: charts/viz/VizBaseConfig.ts:360

The hover callback function for highlighting shapes on mouseover.

Parameters
Parameter Type
_? false | ((d: DataPoint, i: number) => boolean)
Returns

this

Inherited from

VizBase.hover

label()

label(_?: string | ((d: DataPoint, i: number) => string)): string | Viz | ((d: DataPoint, i: number) => string)

Defined in: charts/viz/VizBaseConfig.ts:432

Accessor function or string key for the label of each data point.

Parameters
Parameter Type
_? string | ((d: DataPoint, i: number) => string)
Returns

string | Viz | ((d: DataPoint, i: number) => string)

Inherited from

VizBase.label

legend()

legend(_?: boolean | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean)): boolean | Viz | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean)

Defined in: charts/viz/VizBaseConfig.ts:443

Whether to display the legend.

Parameters
Parameter Type
_? boolean | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean)
Returns

boolean | Viz | ((config: Record<string, unknown>, arr: DataPoint[]) => boolean)

Inherited from

VizBase.legend

legendConfig()

legendConfig(_?: Record<string, unknown>): Record<string, unknown> | Viz

Defined in: charts/viz/VizBaseConfig.ts:459

Configuration object passed to the legend's config method.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Viz

Inherited from

VizBase.legendConfig

legendFilterInvert()

legendFilterInvert(_?: boolean | ((viz: VizBase) => boolean)): boolean | Viz | ((viz: VizBase) => boolean)

Defined in: charts/viz/VizBaseConfig.ts:468

Defines the click functionality of categorical legend squares. When set to false, clicking will hide that category and shift+clicking will solo that category. When set to true, clicking with solo that category and shift+clicking will hide that category.

Parameters
Parameter Type
_? boolean | ((viz: VizBase) => boolean)
Returns

boolean | Viz | ((viz: VizBase) => boolean)

Inherited from

VizBase.legendFilterInvert

legendPadding()

legendPadding(_?: boolean | ((viz: VizBase) => boolean)): boolean | Viz | ((viz: VizBase) => boolean)

Defined in: charts/viz/VizBaseConfig.ts:480

Tells the legend whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the legend appears centered underneath the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.

Parameters
Parameter Type
_? boolean | ((viz: VizBase) => boolean)
Returns

boolean | Viz | ((viz: VizBase) => boolean)

Inherited from

VizBase.legendPadding

legendPosition()

legendPosition(_?: string | (() => string)): string | Viz | (() => string)

Defined in: charts/viz/VizBaseConfig.ts:492

Defines which side of the visualization to anchor the legend. Expected values are "top", "bottom", "left", and "right".

Parameters
Parameter Type
_? string | (() => string)
Returns

string | Viz | (() => string)

Inherited from

VizBase.legendPosition

legendTooltip()

legendTooltip(_?: Record<string, unknown>): Record<string, unknown> | Viz

Defined in: charts/viz/VizBaseConfig.ts:502

Configuration object for the legend tooltip.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Viz

Inherited from

VizBase.legendTooltip

loadingHTML()

loadingHTML(_?: string | ((viz: VizBase) => string)): string | Viz | ((viz: VizBase) => string)

Defined in: charts/viz/VizBase.ts:24

The inner HTML of the status message displayed when loading AJAX requests and displaying errors. Must be a valid HTML string or a function that, when passed this Viz instance, returns a valid HTML string.

Parameters
Parameter Type
_? string | ((viz: VizBase) => string)
Returns

string | Viz | ((viz: VizBase) => string)

Inherited from

VizBase.loadingHTML

loadingMessage()

loadingMessage(_?: boolean): boolean | Viz

Defined in: charts/viz/VizBase.ts:35

Toggles the visibility of the status message that is displayed when loading AJAX requests and displaying errors.

Parameters
Parameter Type
_? boolean
Returns

boolean | Viz

Inherited from

VizBase.loadingMessage

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

VizBase.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

VizBase.locale

messageMask()

messageMask(_?: string | boolean): string | boolean | Viz

Defined in: charts/viz/VizBase.ts:44

The color of the mask displayed underneath the status message when loading AJAX requests and displaying errors. Set to false to turn off the mask completely.

Parameters
Parameter Type
_? string | boolean
Returns

string | boolean | Viz

Inherited from

VizBase.messageMask

messageStyle()

messageStyle(_?: Record<string, unknown>): Record<string, unknown> | Viz

Defined in: charts/viz/VizBase.ts:53

Defines the CSS style properties for the status message that is displayed when loading AJAX requests and displaying errors.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Viz

Inherited from

VizBase.messageStyle

noDataHTML()

noDataHTML(_?: string | ((viz: VizBase) => string)): string | Viz | ((viz: VizBase) => string)

Defined in: charts/viz/VizBase.ts:62

The inner HTML of the status message displayed when no data is supplied to the visualization. Must be a valid HTML string or a function that, when passed this Viz instance, returns a valid HTML string.

Parameters
Parameter Type
_? string | ((viz: VizBase) => string)
Returns

string | Viz | ((viz: VizBase) => string)

Inherited from

VizBase.noDataHTML

noDataMessage()

noDataMessage(_?: boolean): boolean | Viz

Defined in: charts/viz/VizBase.ts:73

Toggles the visibility of the status message that is displayed when no data is supplied to the visualization.

Parameters
Parameter Type
_? boolean
Returns

boolean | Viz

Inherited from

VizBase.noDataMessage

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

VizBase.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

VizBase.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

VizBase.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

VizBase.on

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

VizBase.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

VizBase.parent

render()

render(callback?: () => void): this

Defined in: charts/viz/Viz.ts:260

Draws the visualization given the specified configuration.

Parameters
Parameter Type Description
callback? () => void Optional callback invoked after rendering completes.
Returns

this

renderer()
Call Signature

renderer(): "svg" | "canvas"

Defined in: charts/viz/Viz.ts:292

Selects which @d3plus/render backend paints the visible output. "svg" = SvgRenderer (default), "canvas" = CanvasRenderer. Boolean arguments both normalize to "svg".

Returns

"svg" | "canvas"

Call Signature

renderer(_: boolean | "svg" | "canvas"): this

Defined in: charts/viz/Viz.ts:293

Selects which @d3plus/render backend paints the visible output. "svg" = SvgRenderer (default), "canvas" = CanvasRenderer. Boolean arguments both normalize to "svg".

Parameters
Parameter Type
_ boolean | "svg" | "canvas"
Returns

this

renderMode()
Call Signature

renderMode(): "full" | "compute"

Defined in: charts/viz/Viz.ts:306

"full" runs the DOM enter/update/exit for every shape; "compute" skips DOM work and only populates the scene data (_textData, _shapes[i]._select, etc.) for toScene() to read. Set automatically by renderScene callers; users can also opt-in.

Returns

"full" | "compute"

Call Signature

renderMode(_: "full" | "compute"): this

Defined in: charts/viz/Viz.ts:307

"full" runs the DOM enter/update/exit for every shape; "compute" skips DOM work and only populates the scene data (_textData, _shapes[i]._select, etc.) for toScene() to read. Set automatically by renderScene callers; users can also opt-in.

Parameters
Parameter Type
_ "full" | "compute"
Returns

this

renderScene()

renderScene(target: Element, opts?: object): Promise<{ renderer: Renderer; scene: Scene; }>

Defined in: charts/viz/Viz.ts:321

Public entry point that renders this chart through the @d3plus/render pluggable backends. The compute pass happens via render() (in an svg auto-created inside the target div); SvgRenderer/CanvasRenderer paints the scene to the target. Returns {renderer, scene} so callers can interact with the renderer (e.g. for picking) or read the scene data.

Parameters
Parameter Type
target Element
opts? { kind?: "svg" | "canvas"; }
opts.kind? "svg" | "canvas"
Returns

Promise<{ renderer: Renderer; scene: Scene; }>

scrollContainer()

scrollContainer(_?: string | HTMLElement | Window): string | Viz | HTMLElement | Window

Defined in: charts/viz/VizBase.ts:82

If using scroll or visibility detection, this method allow a custom override of the element to which the scroll detection function gets attached.

Parameters
Parameter Type
_? string | HTMLElement | Window
Returns

string | Viz | HTMLElement | Window

Inherited from

VizBase.scrollContainer

select()

select(_?: string | HTMLElement): Viz | Selection<BaseType, unknown, null, undefined>

Defined in: charts/viz/VizBase.ts:93

The SVG container element as a d3 selector or DOM element. Defaults to undefined.

Parameters
Parameter Type
_? string | HTMLElement
Returns

Viz | Selection<BaseType, unknown, null, undefined>

Inherited from

VizBase.select

shape()

shape(_?: string | ((d: DataPoint, i: number) => string)): string | Viz | ((d: DataPoint, i: number) => string)

Defined in: charts/viz/VizBase.ts:102

Changes the primary shape used to represent each data point in a visualization. Not all visualizations support changing shapes, this method can be provided the String name of a D3plus shape class (for example, "Rect" or "Circle"), or an accessor Function that returns the String class name to be used for each individual data point.

Parameters
Parameter Type
_? string | ((d: DataPoint, i: number) => string)
Returns

string | Viz | ((d: DataPoint, i: number) => string)

Inherited from

VizBase.shape

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: charts/viz/VizBase.ts:113

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Inherited from

VizBase.shapeConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: charts/viz/VizBase.ts:114

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

VizBase.shapeConfig

subtitle()

subtitle(_?: string | ((data: DataPoint[]) => string)): string | Viz | ((data: DataPoint[]) => string)

Defined in: charts/viz/VizBase.ts:124

Accessor function or string for the visualization's subtitle.

Parameters
Parameter Type
_? string | ((data: DataPoint[]) => string)
Returns

string | Viz | ((data: DataPoint[]) => string)

Inherited from

VizBase.subtitle

subtitleConfig()

subtitleConfig(_?: Record<string, unknown>): Record<string, unknown> | Viz

Defined in: charts/viz/VizBase.ts:135

Configuration object for the subtitle.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Viz

Inherited from

VizBase.subtitleConfig

subtitlePadding()

subtitlePadding(_?: boolean | ((viz: VizBase) => boolean)): boolean | Viz | ((viz: VizBase) => boolean)

Defined in: charts/viz/VizBase.ts:144

Tells the subtitle whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the subtitle appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.

Parameters
Parameter Type
_? boolean | ((viz: VizBase) => boolean)
Returns

boolean | Viz | ((viz: VizBase) => boolean)

Inherited from

VizBase.subtitlePadding

threshold()

threshold(_?: number | ((data: DataPoint[]) => number)): number | Viz | ((data: DataPoint[]) => number)

Defined in: charts/viz/VizBase.ts:156

The threshold value for bucketing small data points together.

Parameters
Parameter Type
_? number | ((data: DataPoint[]) => number)
Returns

number | Viz | ((data: DataPoint[]) => number)

Inherited from

VizBase.threshold

thresholdKey()

thresholdKey(key?: string | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)): string | Viz | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Defined in: charts/viz/VizBase.ts:173

Accessor for the value used in the threshold algorithm.

Parameters
Parameter Type Description
key? string | ((d: DataPoint, i: number) => string | number | boolean | DataPoint) The data key used to group values for thresholding.
Returns

string | Viz | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Inherited from

VizBase.thresholdKey

thresholdName()

thresholdName(_?: string | ((d: DataPoint, i: number) => string)): string | Viz | ((d: DataPoint, i: number) => string)

Defined in: charts/viz/VizBase.ts:189

The label displayed for bucketed threshold items.

Parameters
Parameter Type
_? string | ((d: DataPoint, i: number) => string)
Returns

string | Viz | ((d: DataPoint, i: number) => string)

Inherited from

VizBase.thresholdName

time()

time(_?: string | false | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)): string | false | Viz | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Defined in: charts/viz/VizBase.ts:201

Accessor function or string key for the time dimension of each data point.

Parameters
Parameter Type
_? string | false | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)
Returns

string | false | Viz | ((d: DataPoint, i: number) => string | number | boolean | DataPoint)

Inherited from

VizBase.time

timelineConfig()

timelineConfig(_?: Record<string, unknown>): Record<string, unknown> | Viz

Defined in: charts/viz/VizBase.ts:246

Configuration object for the timeline.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Viz

Inherited from

VizBase.timelineConfig

timelineDefault()

timelineDefault(_?: string | Date | (string | Date)[]): Viz | Date[]

Defined in: charts/viz/VizBase.ts:255

The starting time or range for the timeline. Can be a single Date/String, or an Array of 2 values representing the min and max.

Parameters
Parameter Type
_? string | Date | (string | Date)[]
Returns

Viz | Date[]

Inherited from

VizBase.timelineDefault

timelinePadding()

timelinePadding(_?: boolean | ((viz: VizBase) => boolean)): boolean | Viz | ((viz: VizBase) => boolean)

Defined in: charts/viz/VizBase.ts:268

Tells the timeline whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the timeline appears centered underneath the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.

Parameters
Parameter Type
_? boolean | ((viz: VizBase) => boolean)
Returns

boolean | Viz | ((viz: VizBase) => boolean)

Inherited from

VizBase.timelinePadding

title()

title(_?: string | ((data: DataPoint[]) => string)): string | Viz | ((data: DataPoint[]) => string)

Defined in: charts/viz/VizBase.ts:280

Accessor function or string for the visualization's title.

Parameters
Parameter Type
_? string | ((data: DataPoint[]) => string)
Returns

string | Viz | ((data: DataPoint[]) => string)

Inherited from

VizBase.title

titleConfig()

titleConfig(_?: Record<string, unknown>): Record<string, unknown> | Viz

Defined in: charts/viz/VizBase.ts:291

Configuration object for the title.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Viz

Inherited from

VizBase.titleConfig

titlePadding()

titlePadding(_?: boolean | ((viz: VizBase) => boolean)): boolean | Viz | ((viz: VizBase) => boolean)

Defined in: charts/viz/VizBase.ts:300

Tells the title whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the title appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.

Parameters
Parameter Type
_? boolean | ((viz: VizBase) => boolean)
Returns

boolean | Viz | ((viz: VizBase) => boolean)

Inherited from

VizBase.titlePadding

toCanvas()

toCanvas(): unknown

Defined in: charts/viz/Viz.ts:281

Returns the underlying canvas element of the most recent render when the canvas backend is active (renderer("canvas")), or undefined otherwise. Server-side callers cast this to their native canvas to encode a raster (see @d3plus/ssr).

Returns

unknown

tooltip()

tooltip(_?: boolean | ((d: DataPoint, i: number) => boolean)): boolean | Viz | ((d: DataPoint, i: number) => boolean)

Defined in: charts/viz/VizBase.ts:311

Whether to display tooltips on hover.

Parameters
Parameter Type
_? boolean | ((d: DataPoint, i: number) => boolean)
Returns

boolean | Viz | ((d: DataPoint, i: number) => boolean)

Inherited from

VizBase.tooltip

tooltipConfig()

tooltipConfig(_?: Record<string, unknown>): Record<string, unknown> | Viz

Defined in: charts/viz/VizBase.ts:322

Configuration object for the tooltip.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Viz

Inherited from

VizBase.tooltipConfig

toScene()

toScene(): Scene

Defined in: charts/viz/Viz.ts:79

Composes a backend-agnostic scene graph from the shapes/features produced by the most recent render. Combines:

  • _chartScene (cells from chartDef.emit, or Plot._paint for the paint-driven Plot family) wrapped in viz-chart-cells
  • _shapes (still used by some charts) — each shape's toScene
  • chart-level components (Legend/ColorScale/Timeline) via their toScene
  • _featurePanels (from FeatureModule layouts) wrapped in viz-features
Returns

Scene

toSVGString()

toSVGString(): string

Defined in: charts/viz/Viz.ts:271

Serializes the most recently rendered output to an SVG string. Returns "" if the chart has not been rendered yet. Both backends support this: the SVG backend returns its live <svg>, the canvas backend re-renders the retained scene through a throwaway SVG backend. Primarily used for server-side rendering (see @d3plus/ssr).

Returns

string

total()

total(_?: string | boolean | ((d: DataPoint, i: number) => number)): string | boolean | Viz | ((d: DataPoint, i: number) => number)

Defined in: charts/viz/VizBase.ts:331

Accessor function or string key for the total value displayed in the visualization.

Parameters
Parameter Type
_? string | boolean | ((d: DataPoint, i: number) => number)
Returns

string | boolean | Viz | ((d: DataPoint, i: number) => number)

Inherited from

VizBase.total

totalConfig()

totalConfig(_?: Record<string, unknown>): Record<string, unknown> | Viz

Defined in: charts/viz/VizBase.ts:345

Configuration object for the total bar.

Parameters
Parameter Type
_? Record<string, unknown>
Returns

Record<string, unknown> | Viz

Inherited from

VizBase.totalConfig

totalFormat()

totalFormat(_?: (d: number) => string): Viz | ((d: number) => string)

Defined in: charts/viz/VizBase.ts:354

Formatter function for the value in the total bar.

Parameters
Parameter Type
_? (d: number) => string
Returns

Viz | ((d: number) => string)

Inherited from

VizBase.totalFormat

totalPadding()

totalPadding(_?: boolean | ((viz: VizBase) => boolean)): boolean | Viz | ((viz: VizBase) => boolean)

Defined in: charts/viz/VizBase.ts:363

Tells the total whether or not to use the internal padding defined by the visualization in it's positioning. For example, d3plus-plot will add padding on the left so that the total appears centered above the x-axis. By default, this padding is only applied on screens larger than 600 pixels wide.

Parameters
Parameter Type
_? boolean | ((viz: VizBase) => boolean)
Returns

boolean | Viz | ((viz: VizBase) => boolean)

Inherited from

VizBase.totalPadding

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

VizBase.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

VizBase.translate

zoomBrushHandleSize()

zoomBrushHandleSize(_?: number): number | Viz

Defined in: charts/viz/VizBase.ts:374

The pixel stroke-width of the zoom brush area.

Parameters
Parameter Type
_? number
Returns

number | Viz

Inherited from

VizBase.zoomBrushHandleSize

zoomBrushHandleStyle()

zoomBrushHandleStyle(_?: false | Record<string, unknown>): false | Record<string, unknown> | Viz

Defined in: charts/viz/VizBase.ts:383

An object containing CSS key/value pairs that is used to style the outer handle area of the zoom brush. Passing false will remove all default styling.

Parameters
Parameter Type
_? false | Record<string, unknown>
Returns

false | Record<string, unknown> | Viz

Inherited from

VizBase.zoomBrushHandleStyle

zoomBrushSelectionStyle()

zoomBrushSelectionStyle(_?: false | Record<string, unknown>): false | Record<string, unknown> | Viz

Defined in: charts/viz/VizBase.ts:394

An object containing CSS key/value pairs that is used to style the inner selection area of the zoom brush. Passing false will remove all default styling.

Parameters
Parameter Type
_? false | Record<string, unknown>
Returns

false | Record<string, unknown> | Viz

Inherited from

VizBase.zoomBrushSelectionStyle

zoomControlStyle()

zoomControlStyle(_?: false | Record<string, unknown>): false | Record<string, unknown> | Viz

Defined in: charts/viz/VizBase.ts:405

An object containing CSS key/value pairs that is used to style each zoom control button (.zoom-in, .zoom-out, .zoom-reset, and .zoom-brush). Passing false will remove all default styling.

Parameters
Parameter Type
_? false | Record<string, unknown>
Returns

false | Record<string, unknown> | Viz

Inherited from

VizBase.zoomControlStyle

zoomControlStyleActive()

zoomControlStyleActive(_?: false | Record<string, unknown>): false | Record<string, unknown> | Viz

Defined in: charts/viz/VizBase.ts:416

An object containing CSS key/value pairs that is used to style each zoom control button when active (.zoom-in, .zoom-out, .zoom-reset, and .zoom-brush). Passing false will remove all default styling.

Parameters
Parameter Type
_? false | Record<string, unknown>
Returns

false | Record<string, unknown> | Viz

Inherited from

VizBase.zoomControlStyleActive

zoomControlStyleHover()

zoomControlStyleHover(_?: false | Record<string, unknown>): false | Record<string, unknown> | Viz

Defined in: charts/viz/VizBase.ts:427

An object containing CSS key/value pairs that is used to style each zoom control button on hover (.zoom-in, .zoom-out, .zoom-reset, and .zoom-brush). Passing false will remove all default styling.

Parameters
Parameter Type
_? false | Record<string, unknown>
Returns

false | Record<string, unknown> | Viz

Inherited from

VizBase.zoomControlStyleHover

zoomPadding()

zoomPadding(_?: number): number | Viz

Defined in: charts/viz/VizBase.ts:438

A pixel value to be used to pad all sides of a zoomed area.

Parameters
Parameter Type
_? number
Returns

number | Viz

Inherited from

VizBase.zoomPadding

Properties
Property Type Description Inherited from Defined in
_configDefault? D3plusConfig - VizBase._configDefault utils/BaseClass.ts:82
_uuid string - VizBase._uuid utils/BaseClass.ts:81
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). VizBase.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. VizBase.schema utils/BaseClass.ts:77

Whisker

Defined in: shapes/Whisker.ts:36

Creates SVG whisker based on an array of data.

Extends
Indexable

[key: string]: any

Methods

active()

active(_: ((d: DataPoint, i: number) => boolean) | null): void

Defined in: shapes/Whisker.ts:195

The active highlight state for all sub-shapes in this Whisker.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

void

config()
Call Signature

config(): WhiskerConfig

Defined in: shapes/Whisker.ts:261

Narrowed .config() for Whisker. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Returns

WhiskerConfig

Overrides

BaseClass.config

Call Signature

config(_: Partial<WhiskerConfig>): this

Defined in: shapes/Whisker.ts:262

Narrowed .config() for Whisker. Inherited surface from BaseClass.config(); the override exists only to surface per-shape keys (e.g. width/height for Rect) in autocomplete + type checks.

Parameters
Parameter Type
_ Partial<WhiskerConfig>
Returns

this

Overrides

BaseClass.config

data()
Call Signature

data(): DataPoint[]

Defined in: shapes/Whisker.ts:206

The data array used to create shapes.

Returns

DataPoint[]

Call Signature

data(_: DataPoint[]): this

Defined in: shapes/Whisker.ts:207

The data array used to create shapes.

Parameters
Parameter Type
_ DataPoint[]
Returns

this

endpointConfig()
Call Signature

endpointConfig(): Record<string, unknown>

Defined in: shapes/Whisker.ts:215

Configuration object for each endpoint.

Returns

Record<string, unknown>

Call Signature

endpointConfig(_: Record<string, unknown>): this

Defined in: shapes/Whisker.ts:216

Configuration object for each endpoint.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

hover()

hover(_: ((d: DataPoint, i: number) => boolean) | null): void

Defined in: shapes/Whisker.ts:226

The hover highlight state for all sub-shapes in this Whisker.

Parameters
Parameter Type
_ ((d: DataPoint, i: number) => boolean) | null
Returns

void

lineConfig()
Call Signature

lineConfig(): Record<string, unknown>

Defined in: shapes/Whisker.ts:237

Configuration object for the line shape.

Returns

Record<string, unknown>

Call Signature

lineConfig(_: Record<string, unknown>): this

Defined in: shapes/Whisker.ts:238

Configuration object for the line shape.

Parameters
Parameter Type
_ Record<string, unknown>
Returns

this

locale()
Call Signature

locale(): string

Defined in: utils/BaseClass.ts:173

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Returns

string

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

Call Signature

locale(_: string | object): this

Defined in: utils/BaseClass.ts:174

The locale used for all text and number formatting. Supports the locales defined in d3plus-format. The locale can be a complex Object, a locale code (like "en-US"), or a 2-digit language code (like "en"). If a 2-digit code is provided, the "findLocale" function is used to identify the most approximate locale.

Parameters
Parameter Type
_ string | object
Returns

this

Example
{
        separator: "",
        suffixes: ["y", "z", "a", "f", "p", "n", "\u00b5", "m", "", "k", "M", "B", "t", "q", "Q", "Z", "Y"],
        grouping: [3],
        delimiters: {
          thousands: ",",
          decimal: "."
        },
        currency: ["$", ""]
      }
Inherited from

BaseClass.locale

on()
Call Signature

on(): Record<string, (...args: unknown[]) => unknown>

Defined in: utils/BaseClass.ts:193

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Returns

Record<string, (...args: unknown[]) => unknown>

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string): ((...args: unknown[]) => unknown) | undefined

Defined in: utils/BaseClass.ts:194

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
Returns

((...args: unknown[]) => unknown) | undefined

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: string, f: (...args: unknown[]) => unknown): this

Defined in: utils/BaseClass.ts:195

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ string
f (...args: unknown[]) => unknown
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

Call Signature

on(_: Record<string, (...args: unknown[]) => unknown>): this

Defined in: utils/BaseClass.ts:196

Event listener for the specified event typenames. Mirrors the core d3-selection behavior.

Parameters
Parameter Type
_ Record<string, (...args: unknown[]) => unknown>
Returns

this

Example
new Plot
.on("click.Shape", function(d) {
console.log("data for shape clicked:", d);
})
.on("click.Legend", function(d) {
console.log("data for legend clicked:", d);
})
Inherited from

BaseClass.on

parent()
Call Signature

parent(): unknown

Defined in: utils/BaseClass.ts:217

Parent config used by the wrapper.

Returns

unknown

Inherited from

BaseClass.parent

Call Signature

parent(_: unknown): this

Defined in: utils/BaseClass.ts:218

Parent config used by the wrapper.

Parameters
Parameter Type
_ unknown
Returns

this

Inherited from

BaseClass.parent

render()

render(callback?: () => void): this

Defined in: shapes/Whisker.ts:62

Draws the whisker.

Parameters
Parameter Type Description
callback? () => void Optional callback invoked after rendering completes.
Returns

this

select()
Call Signature

select(): Selection

Defined in: shapes/Whisker.ts:248

The SVG container element for this visualization. 3 selector or DOM element.

Returns

Selection

Call Signature

select(_: string | HTMLElement | SVGElement | null): this

Defined in: shapes/Whisker.ts:249

The SVG container element for this visualization. 3 selector or DOM element.

Parameters
Parameter Type
_ string | HTMLElement | SVGElement | null
Returns

this

shapeConfig()
Call Signature

shapeConfig(): D3plusConfig

Defined in: utils/BaseClass.ts:246

Configuration object with key/value pairs applied as method calls on each shape.

Returns

D3plusConfig

Inherited from

BaseClass.shapeConfig

Call Signature

shapeConfig(_: D3plusConfig): this

Defined in: utils/BaseClass.ts:247

Configuration object with key/value pairs applied as method calls on each shape.

Parameters
Parameter Type
_ D3plusConfig
Returns

this

Inherited from

BaseClass.shapeConfig

toScene()

toScene(): GroupNode

Defined in: shapes/Whisker.ts:180

Compute-mode scene aggregation, mirroring Box.toScene(). Returns a GroupNode containing the inner Line's scene children plus each endpoint shape's scene children.

Returns

GroupNode

translate()
Call Signature

translate(): (d: string, locale?: string) => string

Defined in: utils/BaseClass.ts:233

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Returns

(d: string, locale?: string) => string

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

Call Signature

translate(_: (d: string, locale?: string) => string): this

Defined in: utils/BaseClass.ts:234

Defines how informational text strings should be displayed. By default, this function will try to find the string in question (which is the first argument provided to this function) inside of an internally managed translation Object. If you'd like to override to use custom text, simply pass this method your own custom formatting function.

Parameters
Parameter Type
_ (d: string, locale?: string) => string
Returns

this

Example
.translate(function(d) {
return d === "Back" ? "Get outta here" : d;
})
Inherited from

BaseClass.translate

Properties
Property Type Description Inherited from Defined in
_configDefault? D3plusConfig - BaseClass._configDefault utils/BaseClass.ts:82
_data DataPoint[] - - shapes/Whisker.ts:41
_line Line - - shapes/Whisker.ts:43
_select Selection - - shapes/Whisker.ts:42
_uuid string - BaseClass._uuid utils/BaseClass.ts:81
_whiskerEndpoint (Rect | Circle)[] - - shapes/Whisker.ts:44
ctx Record<string, unknown> Chart-internal scratch (d3 layout instances, computed derived state). BaseClass.ctx utils/BaseClass.ts:79
schema Record<string, any> Post-coercion fluent storage (.sum(...), .x(...), …). any is deliberate and load-bearing: installFluent coerces accessor/const fields into functions, so call sites invoke schema.fill(d, i) and index schema.groupBy[i]. It is NOT D3plusConfig (that describes the pre-coercion user input). Typing it as a coerced ResolvedSchema interface is the only way to drop the any; until then it stays. BaseClass.schema utils/BaseClass.ts:77

Functions

accessor()

accessor(key: string, def?: string | number | boolean | DataPoint): (d: DataPoint) => string | number | boolean | DataPoint

Defined in: utils/accessor.ts:14

Wraps an object key in a simple accessor function.

Parameters
Parameter Type Description
key string The key to be returned from each Object passed to the function.
def? string | number | boolean | DataPoint A default value to be returned if the key is not present.
Returns

(d: DataPoint) => string | number | boolean | DataPoint

Examples
accessor("id");
function(d) {
return d["id"];
}

configPrep()

configPrep(this: VizContext, config?: ConfigObject, type?: string, nest?: string | false): ConfigObject

Defined in: utils/configPrep.ts:46

Preps a config object for d3plus data, and optionally bubbles up a specific nested type. When using this function, you must bind a d3plus class' this context.

Parameters
Parameter Type Default Description
this VizContext required -
config ConfigObject ... The configuration object to parse.
type string "shape" The event classifier to user for "on" events. For example, the default event type of "shape" will apply all events in the "on" config object with that key, like "click.shape" and "mouseleave.shape", in addition to any gloval events like "click" and "mouseleave".
nest string | false false An optional nested key to bubble up to the parent config level.
Returns

ConfigObject


constant()

constant<T>(value: T): () => T

Defined in: utils/constant.ts:11

Wraps non-function variables in a simple return function.

Type Parameters
Type Parameter
T
Parameters
Parameter Type Description
value T The value to wrap in a return function.
Returns

() => T

Examples
constant(42);
function() {
return 42;
}

Variables

AreaPlot

Extends Plot — accepts all of its configuration. Adds or overrides these defaults:

Method Default
baseline 0
discrete "x"
shape "Area"

Defined in: charts/AreaPlot/index.ts:28

Creates an area plot based on an array of data.


BarChart

Extends Plot — accepts all of its configuration. Adds or overrides these defaults:

Method Default
baseline 0
discrete "x"
shape "Bar"
legend

Defined in: charts/BarChart/index.ts:53

Creates a bar chart based on an array of data.


BoxWhisker

Extends Plot — accepts all of its configuration. Adds or overrides these defaults:

Method Default
discrete "x"
shape "Box"
tooltipConfig

Defined in: charts/BoxWhisker/index.ts:48

Creates a simple box and whisker based on an array of data.


BumpChart

Extends Plot — accepts all of its configuration. Adds or overrides these defaults:

Method Default
discrete "x"
shape "Line"

Defined in: charts/BumpChart/index.ts:75

Creates a bump chart based on an array of data.


Donut

Extends Pie — accepts all of its configuration. Adds or overrides these defaults:

Method Default
padPixel 2
innerRadius

Defined in: charts/Donut/index.ts:42

Extends the Pie visualization to create a donut chart.


Geomap

Extends Viz — accepts all of its configuration. Adds or overrides these defaults:

Method Default
fitObject false
noDataMessage false
ocean "#d4dadc"
point accessor(…)
pointSize 1
pointSizeMax 10
pointSizeMin 5
pointSizeScale "linear"
projection
projectionPadding parseSides(…)
shape "Circle"
topojson false
topojsonFill "#f5f5f3"
topojsonFilter
topojsonId accessor(…)
shapeConfig

Defined in: charts/Geomap/index.ts:499

Creates a geographical map with zooming, panning, image tiles, and the ability to layer choropleth paths and coordinate points.


LinePlot

Extends Plot — accepts all of its configuration. Adds or overrides these defaults:

Method Default
discrete "x"
shape "Line"

Defined in: charts/LinePlot/index.ts:27

Creates a line plot based on an array of data.


Matrix

Extends Viz — accepts all of its configuration. Adds or overrides these defaults:

Method Default
cellPadding 2
column accessor(…)
row accessor(…)
columnList
rowList
columnSort
rowSort
rowConfig {…}
columnConfig {…}
label

Defined in: charts/Matrix/index.ts:105

Creates a simple rows/columns Matrix view of any dataset.


Network

Extends Viz — accepts all of its configuration. Adds or overrides these defaults:

Method Default
links []
linkSize 1
linkSizeMin 1
linkSizeScale "sqrt"
noDataMessage false
nodeGroupBy []
tooltipConfig
nodes []
sizeMax
sizeMin 5
sizeScale "sqrt"
shape "Circle"
shapeConfig

Defined in: charts/Network/index.ts:367

Creates a network visualization based on a defined set of nodes and edges.


Pack

Extends Viz — accepts all of its configuration. Adds or overrides these defaults:

Method Default
layoutPadding 1
sort
sum accessor(…)
packOpacity 0.25
shape "Circle"
shapeConfig
legend
on

Defined in: charts/Pack/index.ts:162

Uses the d3 pack layout to create a Circle Packing chart based on an array of data.


Pie

Extends Viz — accepts all of its configuration. Adds or overrides these defaults:

Method Default
innerRadius 0
padAngle
padPixel 0
value accessor(…)
sort
legendSort
shapeConfig
tooltipConfig
legend

Defined in: charts/Pie/index.ts:128

Uses the d3 pie layout to create SVG arcs based on an array of data.


Priestley

Extends Viz — accepts all of its configuration. Adds or overrides these defaults:

Method Default
paddingInner 0.05
paddingOuter 0.05
axisConfig {…}
end accessor(…)
start accessor(…)
shapeConfig

Defined in: charts/Priestley/index.ts:89

Creates a Priestley timeline based on an array of data.


Radar

Extends Viz — accepts all of its configuration. Adds or overrides these defaults:

Method Default
discrete "metric"
levels 6
metric accessor(…)
outerPadding 100
shape "Path"
value accessor(…)
axisConfig

Defined in: charts/Radar/index.ts:87

Creates a radar visualization based on an array of data.


RadialMatrix

Extends Viz — accepts all of its configuration. Adds or overrides these defaults:

Method Default
cellPadding 2
column accessor(…)
row accessor(…)
columnList
rowList
columnSort
rowSort
innerRadius
columnConfig
label

Defined in: charts/RadialMatrix/index.ts:138

Creates a radial layout of a rows/columns Matrix of any dataset.


RESET

const RESET: string = "D3PLUS-COMMON-RESET"

Defined in: utils/RESET.ts:2

String constant used to reset an individual config property.


Rings

Extends Viz — accepts all of its configuration. Adds or overrides these defaults:

Method Default
center
tooltipConfig
links []
linkSize 1
linkSizeMin 1
linkSizeScale "sqrt"
noDataMessage false
nodes []
sizeMax
sizeMin 5
sizeScale "sqrt"
shape "Circle"
shapeConfig

Defined in: charts/Rings/index.ts:220

Creates a ring visualization based on a defined set of nodes and edges.


Sankey

Extends Viz — accepts all of its configuration. Adds or overrides these defaults:

Method Default
iterations 6
links accessor(…)
linkSort
linksSource "source"
linksTarget "target"
noDataMessage false
nodes accessor(…)
nodeAlign
nodeId accessor(…)
nodePadding 8
nodeSort
nodeWidth 30
value 1
shape "Rect"
shapeConfig
tooltipConfig

Defined in: charts/Sankey/index.ts:217

Creates a Sankey visualization based on a defined set of nodes and links.


StackedArea

Extends AreaPlot — accepts all of its configuration. Adds or overrides these defaults:

Method Default
stacked true

Defined in: charts/StackedArea/index.ts:25

Creates a stacked area plot based on an array of data.


Tree

Extends Viz — accepts all of its configuration. Adds or overrides these defaults:

Method Default
orient "vertical"
separation
shape "Circle"
shapeConfig
tooltipConfig
legendTooltip

Defined in: charts/Tree/index.ts:98

Uses d3's tree layout to create a tidy tree chart based on an array of data.


Treemap

Extends Viz — accepts all of its configuration. Adds or overrides these defaults:

Method Default
layoutPadding 1
sort
sum accessor(…)
tile
shapeConfig
tooltipConfig
legendTooltip
legendSort
legend

Defined in: charts/Treemap/index.ts:183

Uses the d3 treemap layout to create SVG rectangles based on an array of data.

Interfaces

AreaConfig

Defined in: shapes/shapeConfig.ts:190

Area-specific config (curve, defined, dual-edge x/y).

Extends
Indexable

[key: string]: unknown

Properties
Property Type Description Inherited from Defined in
active? ((d: DataPoint, i: number) => boolean) | null Predicate or null marking which data points are currently active. BaseShapeConfig.active shapes/shapeConfig.ts:52
activeOpacity? number Opacity applied to non-active data points (default ~0.25). BaseShapeConfig.activeOpacity shapes/shapeConfig.ts:54
activeStyle? Record<string, unknown> Style overrides for active data points. BaseShapeConfig.activeStyle shapes/shapeConfig.ts:56
ariaLabel? ConstOrAccessor<string> ARIA label per datum (accessibility). BaseShapeConfig.ariaLabel shapes/shapeConfig.ts:59
backgroundImage? ConstOrAccessor<string> Optional background image per datum (url or accessor returning a url). BaseShapeConfig.backgroundImage shapes/shapeConfig.ts:61
backgroundImageFit? ConstOrAccessor<"cover" | "contain"> How a backgroundImage fits its shape: "cover" (default) fills the shape's bounding box, cropping the overflow and clipping to the outline; "contain" fits the whole image, centered and fully visible, inside the shape's largest inscribed rectangle. BaseShapeConfig.backgroundImageFit shapes/shapeConfig.ts:68
curve? ConstOrAccessor<string> - - shapes/shapeConfig.ts:191
data? DataPoint[] Data array driving the shape. BaseShapeConfig.data shapes/shapeConfig.ts:49
defined? (d: DataPoint) => boolean Determines whether a data point is defined (a gap in the area when false). - shapes/shapeConfig.ts:193
discrete? "x" | "y" Discrete-axis key ("x" "y") for charts that flip layout per axis. BaseShapeConfig.discrete
duration? number Animation duration in ms. BaseShapeConfig.duration shapes/shapeConfig.ts:73
fill? ConstOrAccessor<string> Fill color or accessor returning one. BaseShapeConfig.fill shapes/shapeConfig.ts:76
fillOpacity? ConstOrAccessor<number> Fill opacity (0..1). BaseShapeConfig.fillOpacity shapes/shapeConfig.ts:78
hitArea? Record<string, unknown> | ((d: DataPoint, i: number, aes: unknown) => Record<string, unknown>) Hit-area shape: function returning bounds or static bounds. BaseShapeConfig.hitArea shapes/shapeConfig.ts:88
hover? ((d: DataPoint, i: number) => boolean) | null Predicate or null marking which data points are currently hovered. BaseShapeConfig.hover shapes/shapeConfig.ts:81
hoverOpacity? number Opacity applied to non-hovered data points. BaseShapeConfig.hoverOpacity shapes/shapeConfig.ts:83
hoverStyle? Record<string, unknown> Style overrides for hovered data points. BaseShapeConfig.hoverStyle shapes/shapeConfig.ts:85
id? AccessorFn Unique-id accessor per datum (used for keyed enter/update/exit). BaseShapeConfig.id shapes/shapeConfig.ts:93
label? ConstOrAccessor<string | false | string[]> Label text(s) per datum. False/undefined skips. BaseShapeConfig.label shapes/shapeConfig.ts:95
labelBounds? Record<string, unknown> | ((d: DataPoint, i: number, aes: unknown) => Record<string, unknown> | Record<string, unknown>[]) Label-bounds accessor (where to mount the label). BaseShapeConfig.labelBounds shapes/shapeConfig.ts:97
labelConfig? Record<string, unknown> Label TextBox config (font, padding, etc.). BaseShapeConfig.labelConfig shapes/shapeConfig.ts:101
on? Record<string, (...args: unknown[]) => unknown> Event handlers (Object.<event, handler>). BaseShapeConfig.on shapes/shapeConfig.ts:159
opacity? ConstOrAccessor<number> Overall opacity (0..1). BaseShapeConfig.opacity shapes/shapeConfig.ts:104
pointerEvents? ConstOrAccessor<string> SVG pointer-events attribute per datum. BaseShapeConfig.pointerEvents shapes/shapeConfig.ts:106
renderMode? "full" | "compute" "full" runs the DOM enter/update/exit; "compute" skips DOM. BaseShapeConfig.renderMode shapes/shapeConfig.ts:120
role? ConstOrAccessor<string> ARIA role per datum (accessibility). BaseShapeConfig.role shapes/shapeConfig.ts:108
rotate? ConstOrAccessor<number> Rotation in degrees per datum. BaseShapeConfig.rotate shapes/shapeConfig.ts:111
rx? ConstOrAccessor<number> SVG rx (rect rounded-corner x) — applies to Rect/Bar. BaseShapeConfig.rx shapes/shapeConfig.ts:113
ry? ConstOrAccessor<number> SVG ry (rect rounded-corner y) — applies to Rect/Bar. BaseShapeConfig.ry shapes/shapeConfig.ts:115
scale? ConstOrAccessor<number> Scale factor (1 = identity). BaseShapeConfig.scale shapes/shapeConfig.ts:117
select? string | HTMLElement | SVGElement | null Where to mount the shape's DOM (CSS selector, element, or null). BaseShapeConfig.select shapes/shapeConfig.ts:122
shapeRendering? ConstOrAccessor<string> SVG shape-rendering attribute per datum. BaseShapeConfig.shapeRendering shapes/shapeConfig.ts:125
sort? ((a: DataPoint, b: DataPoint) => number) | null d3-style sort comparator. BaseShapeConfig.sort shapes/shapeConfig.ts:128
stroke? ConstOrAccessor<string> Stroke color. BaseShapeConfig.stroke shapes/shapeConfig.ts:131
strokeDasharray? ConstOrAccessor<string> SVG stroke-dasharray. BaseShapeConfig.strokeDasharray shapes/shapeConfig.ts:133
strokeLinecap? ConstOrAccessor<string> SVG stroke-linecap. BaseShapeConfig.strokeLinecap shapes/shapeConfig.ts:135
strokeOpacity? ConstOrAccessor<number> SVG stroke-opacity. BaseShapeConfig.strokeOpacity shapes/shapeConfig.ts:137
strokeWidth? ConstOrAccessor<number> Stroke width in pixels. BaseShapeConfig.strokeWidth shapes/shapeConfig.ts:139
textAnchor? ConstOrAccessor<string> SVG text-anchor for labels. BaseShapeConfig.textAnchor shapes/shapeConfig.ts:142
texture? ConstOrAccessor<string | Record<string, unknown>> Texture (per textures.js) — name string or full config. BaseShapeConfig.texture shapes/shapeConfig.ts:144
textureDefault? Record<string, unknown> Default texture config merged into the per-datum texture. BaseShapeConfig.textureDefault shapes/shapeConfig.ts:146
vectorEffect? ConstOrAccessor<string> SVG vector-effect (e.g. "non-scaling-stroke"). BaseShapeConfig.vectorEffect shapes/shapeConfig.ts:149
verticalAlign? ConstOrAccessor<string> Label vertical-align ("top"/"middle"/"bottom"). BaseShapeConfig.verticalAlign shapes/shapeConfig.ts:151
x? ConstOrAccessor<number> X position. BaseShapeConfig.x shapes/shapeConfig.ts:154
x0? ConstOrAccessor<number> - - shapes/shapeConfig.ts:194
x1? ConstOrAccessor<number> | null - - shapes/shapeConfig.ts:195
y? ConstOrAccessor<number> Y position. BaseShapeConfig.y shapes/shapeConfig.ts:156
y0? ConstOrAccessor<number> - - shapes/shapeConfig.ts:196
y1? ConstOrAccessor<number> | null - - shapes/shapeConfig.ts:197

AxisConfig

Defined in: utils/D3plusConfig.ts:44

Properties
Property Type Description Defined in
barConfig? Record<string, string | number> - utils/D3plusConfig.ts:45
grid? unknown[] Grid values of the axis. utils/D3plusConfig.ts:47
gridConfig? Record<string, string | number> - utils/D3plusConfig.ts:48
gridSize? number Grid size of the axis. utils/D3plusConfig.ts:50
label? string - utils/D3plusConfig.ts:51
labelOffset? number | false - utils/D3plusConfig.ts:54
labels? unknown[] Visible tick labels of the axis. utils/D3plusConfig.ts:53
maxSize? number Maximum size allowed for the space that contains the axis tick labels and title. utils/D3plusConfig.ts:56
minSize? number Minimum size alloted for the space that contains the axis tick labels and title. utils/D3plusConfig.ts:58
range? (number | undefined)[] Scale range (in pixels) of the axis. The given array must have 2 values, but one may be undefined to allow the default behavior for that value. utils/D3plusConfig.ts:63
scale? AxisScale Scale of the axis. utils/D3plusConfig.ts:65
tickFormat? (d: string | number) => string | number Tick formatter. utils/D3plusConfig.ts:67
ticks? unknown[] Tick values of the axis. utils/D3plusConfig.ts:69
tickSize? number - utils/D3plusConfig.ts:70
timeLocale? Record<string, unknown> Defines a custom locale object to be used in time scales. Must include dateTime, date, time, periods, days, shortDays, months, and shortMonths (see d3-time-format). utils/D3plusConfig.ts:77
title? string Title of the axis. utils/D3plusConfig.ts:79

BarConfig

Defined in: shapes/shapeConfig.ts:206

Bar-specific config (Rect + start/end coords).

Extends
Indexable

[key: string]: unknown

Properties
Property Type Description Inherited from Defined in
active? ((d: DataPoint, i: number) => boolean) | null Predicate or null marking which data points are currently active. RectConfig.active shapes/shapeConfig.ts:52
activeOpacity? number Opacity applied to non-active data points (default ~0.25). RectConfig.activeOpacity shapes/shapeConfig.ts:54
activeStyle? Record<string, unknown> Style overrides for active data points. RectConfig.activeStyle shapes/shapeConfig.ts:56
ariaLabel? ConstOrAccessor<string> ARIA label per datum (accessibility). RectConfig.ariaLabel shapes/shapeConfig.ts:59
backgroundImage? ConstOrAccessor<string> Optional background image per datum (url or accessor returning a url). RectConfig.backgroundImage shapes/shapeConfig.ts:61
backgroundImageFit? ConstOrAccessor<"cover" | "contain"> How a backgroundImage fits its shape: "cover" (default) fills the shape's bounding box, cropping the overflow and clipping to the outline; "contain" fits the whole image, centered and fully visible, inside the shape's largest inscribed rectangle. RectConfig.backgroundImageFit shapes/shapeConfig.ts:68
data? DataPoint[] Data array driving the shape. RectConfig.data shapes/shapeConfig.ts:49
discrete? "x" | "y" Discrete-axis key ("x" "y") for charts that flip layout per axis. RectConfig.discrete
duration? number Animation duration in ms. RectConfig.duration shapes/shapeConfig.ts:73
fill? ConstOrAccessor<string> Fill color or accessor returning one. RectConfig.fill shapes/shapeConfig.ts:76
fillOpacity? ConstOrAccessor<number> Fill opacity (0..1). RectConfig.fillOpacity shapes/shapeConfig.ts:78
height? ConstOrAccessor<number> - RectConfig.height shapes/shapeConfig.ts:167
hitArea? Record<string, unknown> | ((d: DataPoint, i: number, aes: unknown) => Record<string, unknown>) Hit-area shape: function returning bounds or static bounds. RectConfig.hitArea shapes/shapeConfig.ts:88
hover? ((d: DataPoint, i: number) => boolean) | null Predicate or null marking which data points are currently hovered. RectConfig.hover shapes/shapeConfig.ts:81
hoverOpacity? number Opacity applied to non-hovered data points. RectConfig.hoverOpacity shapes/shapeConfig.ts:83
hoverStyle? Record<string, unknown> Style overrides for hovered data points. RectConfig.hoverStyle shapes/shapeConfig.ts:85
id? AccessorFn Unique-id accessor per datum (used for keyed enter/update/exit). RectConfig.id shapes/shapeConfig.ts:93
label? ConstOrAccessor<string | false | string[]> Label text(s) per datum. False/undefined skips. RectConfig.label shapes/shapeConfig.ts:95
labelBounds? Record<string, unknown> | ((d: DataPoint, i: number, aes: unknown) => Record<string, unknown> | Record<string, unknown>[]) Label-bounds accessor (where to mount the label). RectConfig.labelBounds shapes/shapeConfig.ts:97
labelConfig? Record<string, unknown> Label TextBox config (font, padding, etc.). RectConfig.labelConfig shapes/shapeConfig.ts:101
on? Record<string, (...args: unknown[]) => unknown> Event handlers (Object.<event, handler>). RectConfig.on shapes/shapeConfig.ts:159
opacity? ConstOrAccessor<number> Overall opacity (0..1). RectConfig.opacity shapes/shapeConfig.ts:104
pointerEvents? ConstOrAccessor<string> SVG pointer-events attribute per datum. RectConfig.pointerEvents shapes/shapeConfig.ts:106
renderMode? "full" | "compute" "full" runs the DOM enter/update/exit; "compute" skips DOM. RectConfig.renderMode shapes/shapeConfig.ts:120
role? ConstOrAccessor<string> ARIA role per datum (accessibility). RectConfig.role shapes/shapeConfig.ts:108
rotate? ConstOrAccessor<number> Rotation in degrees per datum. RectConfig.rotate shapes/shapeConfig.ts:111
rx? ConstOrAccessor<number> SVG rx (rect rounded-corner x) — applies to Rect/Bar. RectConfig.rx shapes/shapeConfig.ts:113
ry? ConstOrAccessor<number> SVG ry (rect rounded-corner y) — applies to Rect/Bar. RectConfig.ry shapes/shapeConfig.ts:115
scale? ConstOrAccessor<number> Scale factor (1 = identity). RectConfig.scale shapes/shapeConfig.ts:117
select? string | HTMLElement | SVGElement | null Where to mount the shape's DOM (CSS selector, element, or null). RectConfig.select shapes/shapeConfig.ts:122
shapeRendering? ConstOrAccessor<string> SVG shape-rendering attribute per datum. RectConfig.shapeRendering shapes/shapeConfig.ts:125
sort? ((a: DataPoint, b: DataPoint) => number) | null d3-style sort comparator. RectConfig.sort shapes/shapeConfig.ts:128
stroke? ConstOrAccessor<string> Stroke color. RectConfig.stroke shapes/shapeConfig.ts:131
strokeDasharray? ConstOrAccessor<string> SVG stroke-dasharray. RectConfig.strokeDasharray shapes/shapeConfig.ts:133
strokeLinecap? ConstOrAccessor<string> SVG stroke-linecap. RectConfig.strokeLinecap shapes/shapeConfig.ts:135
strokeOpacity? ConstOrAccessor<number> SVG stroke-opacity. RectConfig.strokeOpacity shapes/shapeConfig.ts:137
strokeWidth? ConstOrAccessor<number> Stroke width in pixels. RectConfig.strokeWidth shapes/shapeConfig.ts:139
textAnchor? ConstOrAccessor<string> SVG text-anchor for labels. RectConfig.textAnchor shapes/shapeConfig.ts:142
texture? ConstOrAccessor<string | Record<string, unknown>> Texture (per textures.js) — name string or full config. RectConfig.texture shapes/shapeConfig.ts:144
textureDefault? Record<string, unknown> Default texture config merged into the per-datum texture. RectConfig.textureDefault shapes/shapeConfig.ts:146
trail? boolean Sweep a tapering motion trail behind the rect as it moves between frames. RectConfig.trail shapes/shapeConfig.ts:169
trailPersist? number | boolean Steps of trail history to keep (number), or true for a long fading tail. RectConfig.trailPersist shapes/shapeConfig.ts:171
vectorEffect? ConstOrAccessor<string> SVG vector-effect (e.g. "non-scaling-stroke"). RectConfig.vectorEffect shapes/shapeConfig.ts:149
verticalAlign? ConstOrAccessor<string> Label vertical-align ("top"/"middle"/"bottom"). RectConfig.verticalAlign shapes/shapeConfig.ts:151
width? ConstOrAccessor<number> - RectConfig.width shapes/shapeConfig.ts:166
x? ConstOrAccessor<number> X position. RectConfig.x shapes/shapeConfig.ts:154
x0? ConstOrAccessor<number> - - shapes/shapeConfig.ts:207
x1? ConstOrAccessor<number> | null - - shapes/shapeConfig.ts:208
y? ConstOrAccessor<number> Y position. RectConfig.y shapes/shapeConfig.ts:156
y0? ConstOrAccessor<number> - - shapes/shapeConfig.ts:209
y1? ConstOrAccessor<number> | null - - shapes/shapeConfig.ts:210

BaseShapeConfig

Defined in: shapes/shapeConfig.ts:47

Common props inherited from Shape — every shape subclass accepts these via .config(...) regardless of geometry.

Extended by
Indexable

[key: string]: unknown

Properties
Property Type Description Defined in
active? ((d: DataPoint, i: number) => boolean) | null Predicate or null marking which data points are currently active. shapes/shapeConfig.ts:52
activeOpacity? number Opacity applied to non-active data points (default ~0.25). shapes/shapeConfig.ts:54
activeStyle? Record<string, unknown> Style overrides for active data points. shapes/shapeConfig.ts:56
ariaLabel? ConstOrAccessor<string> ARIA label per datum (accessibility). shapes/shapeConfig.ts:59
backgroundImage? ConstOrAccessor<string> Optional background image per datum (url or accessor returning a url). shapes/shapeConfig.ts:61
backgroundImageFit? ConstOrAccessor<"cover" | "contain"> How a backgroundImage fits its shape: "cover" (default) fills the shape's bounding box, cropping the overflow and clipping to the outline; "contain" fits the whole image, centered and fully visible, inside the shape's largest inscribed rectangle. shapes/shapeConfig.ts:68
data? DataPoint[] Data array driving the shape. shapes/shapeConfig.ts:49
discrete? "x" | "y" Discrete-axis key ("x" "y") for charts that flip layout per axis.
duration? number Animation duration in ms. shapes/shapeConfig.ts:73
fill? ConstOrAccessor<string> Fill color or accessor returning one. shapes/shapeConfig.ts:76
fillOpacity? ConstOrAccessor<number> Fill opacity (0..1). shapes/shapeConfig.ts:78
hitArea? Record<string, unknown> | ((d: DataPoint, i: number, aes: unknown) => Record<string, unknown>) Hit-area shape: function returning bounds or static bounds. shapes/shapeConfig.ts:88
hover? ((d: DataPoint, i: number) => boolean) | null Predicate or null marking which data points are currently hovered. shapes/shapeConfig.ts:81
hoverOpacity? number Opacity applied to non-hovered data points. shapes/shapeConfig.ts:83
hoverStyle? Record<string, unknown> Style overrides for hovered data points. shapes/shapeConfig.ts:85
id? AccessorFn Unique-id accessor per datum (used for keyed enter/update/exit). shapes/shapeConfig.ts:93
label? ConstOrAccessor<string | false | string[]> Label text(s) per datum. False/undefined skips. shapes/shapeConfig.ts:95
labelBounds? Record<string, unknown> | ((d: DataPoint, i: number, aes: unknown) => Record<string, unknown> | Record<string, unknown>[]) Label-bounds accessor (where to mount the label). shapes/shapeConfig.ts:97
labelConfig? Record<string, unknown> Label TextBox config (font, padding, etc.). shapes/shapeConfig.ts:101
on? Record<string, (...args: unknown[]) => unknown> Event handlers (Object.<event, handler>). shapes/shapeConfig.ts:159
opacity? ConstOrAccessor<number> Overall opacity (0..1). shapes/shapeConfig.ts:104
pointerEvents? ConstOrAccessor<string> SVG pointer-events attribute per datum. shapes/shapeConfig.ts:106
renderMode? "full" | "compute" "full" runs the DOM enter/update/exit; "compute" skips DOM. shapes/shapeConfig.ts:120
role? ConstOrAccessor<string> ARIA role per datum (accessibility). shapes/shapeConfig.ts:108
rotate? ConstOrAccessor<number> Rotation in degrees per datum. shapes/shapeConfig.ts:111
rx? ConstOrAccessor<number> SVG rx (rect rounded-corner x) — applies to Rect/Bar. shapes/shapeConfig.ts:113
ry? ConstOrAccessor<number> SVG ry (rect rounded-corner y) — applies to Rect/Bar. shapes/shapeConfig.ts:115
scale? ConstOrAccessor<number> Scale factor (1 = identity). shapes/shapeConfig.ts:117
select? string | HTMLElement | SVGElement | null Where to mount the shape's DOM (CSS selector, element, or null). shapes/shapeConfig.ts:122
shapeRendering? ConstOrAccessor<string> SVG shape-rendering attribute per datum. shapes/shapeConfig.ts:125
sort? ((a: DataPoint, b: DataPoint) => number) | null d3-style sort comparator. shapes/shapeConfig.ts:128
stroke? ConstOrAccessor<string> Stroke color. shapes/shapeConfig.ts:131
strokeDasharray? ConstOrAccessor<string> SVG stroke-dasharray. shapes/shapeConfig.ts:133
strokeLinecap? ConstOrAccessor<string> SVG stroke-linecap. shapes/shapeConfig.ts:135
strokeOpacity? ConstOrAccessor<number> SVG stroke-opacity. shapes/shapeConfig.ts:137
strokeWidth? ConstOrAccessor<number> Stroke width in pixels. shapes/shapeConfig.ts:139
textAnchor? ConstOrAccessor<string> SVG text-anchor for labels. shapes/shapeConfig.ts:142
texture? ConstOrAccessor<string | Record<string, unknown>> Texture (per textures.js) — name string or full config. shapes/shapeConfig.ts:144
textureDefault? Record<string, unknown> Default texture config merged into the per-datum texture. shapes/shapeConfig.ts:146
vectorEffect? ConstOrAccessor<string> SVG vector-effect (e.g. "non-scaling-stroke"). shapes/shapeConfig.ts:149
verticalAlign? ConstOrAccessor<string> Label vertical-align ("top"/"middle"/"bottom"). shapes/shapeConfig.ts:151
x? ConstOrAccessor<number> X position. shapes/shapeConfig.ts:154
y? ConstOrAccessor<number> Y position. shapes/shapeConfig.ts:156

BoxConfig

Defined in: shapes/shapeConfig.ts:230

Box-specific config (whisker + median + outliers; subset of Shape).

Indexable

[key: string]: unknown

Properties
Property Type Description Defined in
data? DataPoint[] - shapes/shapeConfig.ts:231
medianConfig? Record<string, unknown> - shapes/shapeConfig.ts:232
orient? ConstOrAccessor<string> Orientation: "vertical" or "horizontal". shapes/shapeConfig.ts:234
outlier? ConstOrAccessor<string> Outlier accessor (per-datum predicate). shapes/shapeConfig.ts:236
outlierConfig? Record<string, unknown> - shapes/shapeConfig.ts:237
rectConfig? Record<string, unknown> - shapes/shapeConfig.ts:238
rectWidth? ConstOrAccessor<number> - shapes/shapeConfig.ts:239
select? string | HTMLElement | SVGElement | null - shapes/shapeConfig.ts:240
whiskerConfig? Record<string, unknown> - shapes/shapeConfig.ts:241
whiskerMode? string | number | (string | number)[] Whisker mode: single mode string/number or [low, high] pair. shapes/shapeConfig.ts:243
x? ConstOrAccessor<number> - shapes/shapeConfig.ts:244
y? ConstOrAccessor<number> - shapes/shapeConfig.ts:245

CircleConfig

Defined in: shapes/shapeConfig.ts:175

Circle-specific config (radius).

Extends
Indexable

[key: string]: unknown

Properties
Property Type Description Inherited from Defined in
active? ((d: DataPoint, i: number) => boolean) | null Predicate or null marking which data points are currently active. BaseShapeConfig.active shapes/shapeConfig.ts:52
activeOpacity? number Opacity applied to non-active data points (default ~0.25). BaseShapeConfig.activeOpacity shapes/shapeConfig.ts:54
activeStyle? Record<string, unknown> Style overrides for active data points. BaseShapeConfig.activeStyle shapes/shapeConfig.ts:56
ariaLabel? ConstOrAccessor<string> ARIA label per datum (accessibility). BaseShapeConfig.ariaLabel shapes/shapeConfig.ts:59
backgroundImage? ConstOrAccessor<string> Optional background image per datum (url or accessor returning a url). BaseShapeConfig.backgroundImage shapes/shapeConfig.ts:61
backgroundImageFit? ConstOrAccessor<"cover" | "contain"> How a backgroundImage fits its shape: "cover" (default) fills the shape's bounding box, cropping the overflow and clipping to the outline; "contain" fits the whole image, centered and fully visible, inside the shape's largest inscribed rectangle. BaseShapeConfig.backgroundImageFit shapes/shapeConfig.ts:68
data? DataPoint[] Data array driving the shape. BaseShapeConfig.data shapes/shapeConfig.ts:49
discrete? "x" | "y" Discrete-axis key ("x" "y") for charts that flip layout per axis. BaseShapeConfig.discrete
duration? number Animation duration in ms. BaseShapeConfig.duration shapes/shapeConfig.ts:73
fill? ConstOrAccessor<string> Fill color or accessor returning one. BaseShapeConfig.fill shapes/shapeConfig.ts:76
fillOpacity? ConstOrAccessor<number> Fill opacity (0..1). BaseShapeConfig.fillOpacity shapes/shapeConfig.ts:78
hitArea? Record<string, unknown> | ((d: DataPoint, i: number, aes: unknown) => Record<string, unknown>) Hit-area shape: function returning bounds or static bounds. BaseShapeConfig.hitArea shapes/shapeConfig.ts:88
hover? ((d: DataPoint, i: number) => boolean) | null Predicate or null marking which data points are currently hovered. BaseShapeConfig.hover shapes/shapeConfig.ts:81
hoverOpacity? number Opacity applied to non-hovered data points. BaseShapeConfig.hoverOpacity shapes/shapeConfig.ts:83
hoverStyle? Record<string, unknown> Style overrides for hovered data points. BaseShapeConfig.hoverStyle shapes/shapeConfig.ts:85
id? AccessorFn Unique-id accessor per datum (used for keyed enter/update/exit). BaseShapeConfig.id shapes/shapeConfig.ts:93
label? ConstOrAccessor<string | false | string[]> Label text(s) per datum. False/undefined skips. BaseShapeConfig.label shapes/shapeConfig.ts:95
labelBounds? Record<string, unknown> | ((d: DataPoint, i: number, aes: unknown) => Record<string, unknown> | Record<string, unknown>[]) Label-bounds accessor (where to mount the label). BaseShapeConfig.labelBounds shapes/shapeConfig.ts:97
labelConfig? Record<string, unknown> Label TextBox config (font, padding, etc.). BaseShapeConfig.labelConfig shapes/shapeConfig.ts:101
on? Record<string, (...args: unknown[]) => unknown> Event handlers (Object.<event, handler>). BaseShapeConfig.on shapes/shapeConfig.ts:159
opacity? ConstOrAccessor<number> Overall opacity (0..1). BaseShapeConfig.opacity shapes/shapeConfig.ts:104
pointerEvents? ConstOrAccessor<string> SVG pointer-events attribute per datum. BaseShapeConfig.pointerEvents shapes/shapeConfig.ts:106
r? ConstOrAccessor<number> - - shapes/shapeConfig.ts:176
renderMode? "full" | "compute" "full" runs the DOM enter/update/exit; "compute" skips DOM. BaseShapeConfig.renderMode shapes/shapeConfig.ts:120
role? ConstOrAccessor<string> ARIA role per datum (accessibility). BaseShapeConfig.role shapes/shapeConfig.ts:108
rotate? ConstOrAccessor<number> Rotation in degrees per datum. BaseShapeConfig.rotate shapes/shapeConfig.ts:111
rx? ConstOrAccessor<number> SVG rx (rect rounded-corner x) — applies to Rect/Bar. BaseShapeConfig.rx shapes/shapeConfig.ts:113
ry? ConstOrAccessor<number> SVG ry (rect rounded-corner y) — applies to Rect/Bar. BaseShapeConfig.ry shapes/shapeConfig.ts:115
scale? ConstOrAccessor<number> Scale factor (1 = identity). BaseShapeConfig.scale shapes/shapeConfig.ts:117
select? string | HTMLElement | SVGElement | null Where to mount the shape's DOM (CSS selector, element, or null). BaseShapeConfig.select shapes/shapeConfig.ts:122
shapeRendering? ConstOrAccessor<string> SVG shape-rendering attribute per datum. BaseShapeConfig.shapeRendering shapes/shapeConfig.ts:125
sort? ((a: DataPoint, b: DataPoint) => number) | null d3-style sort comparator. BaseShapeConfig.sort shapes/shapeConfig.ts:128
stroke? ConstOrAccessor<string> Stroke color. BaseShapeConfig.stroke shapes/shapeConfig.ts:131
strokeDasharray? ConstOrAccessor<string> SVG stroke-dasharray. BaseShapeConfig.strokeDasharray shapes/shapeConfig.ts:133
strokeLinecap? ConstOrAccessor<string> SVG stroke-linecap. BaseShapeConfig.strokeLinecap shapes/shapeConfig.ts:135
strokeOpacity? ConstOrAccessor<number> SVG stroke-opacity. BaseShapeConfig.strokeOpacity shapes/shapeConfig.ts:137
strokeWidth? ConstOrAccessor<number> Stroke width in pixels. BaseShapeConfig.strokeWidth shapes/shapeConfig.ts:139
textAnchor? ConstOrAccessor<string> SVG text-anchor for labels. BaseShapeConfig.textAnchor shapes/shapeConfig.ts:142
texture? ConstOrAccessor<string | Record<string, unknown>> Texture (per textures.js) — name string or full config. BaseShapeConfig.texture shapes/shapeConfig.ts:144
textureDefault? Record<string, unknown> Default texture config merged into the per-datum texture. BaseShapeConfig.textureDefault shapes/shapeConfig.ts:146
trail? boolean Sweep a tapering motion trail behind the point as it moves between frames. - shapes/shapeConfig.ts:178
trailPersist? number | boolean Steps of trail history to keep (number), or true for a long fading tail. - shapes/shapeConfig.ts:180
vectorEffect? ConstOrAccessor<string> SVG vector-effect (e.g. "non-scaling-stroke"). BaseShapeConfig.vectorEffect shapes/shapeConfig.ts:149
verticalAlign? ConstOrAccessor<string> Label vertical-align ("top"/"middle"/"bottom"). BaseShapeConfig.verticalAlign shapes/shapeConfig.ts:151
x? ConstOrAccessor<number> X position. BaseShapeConfig.x shapes/shapeConfig.ts:154
y? ConstOrAccessor<number> Y position. BaseShapeConfig.y shapes/shapeConfig.ts:156

ColorScaleConfig

Defined in: utils/D3plusConfig.ts:223

Properties
Property Type Description Defined in
bucketFormat? (start: number, i: number, buckets: number[], values: number[]) => string Formats the label for each bucket in a bucket-type scale ("jenks", "quantile", …). Passed the bucket's start value, its index, the full bucket array, and every data value used to build the buckets. utils/D3plusConfig.ts:234
bucketJoiner? (min: string, max: string) => string Given a bucket's minimum and maximum values, returns the full label. utils/D3plusConfig.ts:241
domain? number[] For a linear scale, the [min, max] values used by the color scale; values outside this range map to the nearest color. utils/D3plusConfig.ts:228

D3plusConfig

Defined in: utils/D3plusConfig.ts:244

Indexable

[key: string]: unknown

Allows additional custom properties.

Properties
Property Type Description Defined in
active? false | ((d: DataPoint, i: number) => boolean) | null The active callback function for highlighting shapes. utils/D3plusConfig.ts:251
aggs? object Custom aggregation functions keyed by data property. utils/D3plusConfig.ts:253
ariaHidden? boolean Hides the SVG from assistive technology when true (aria-hidden). utils/D3plusConfig.ts:255
barPadding? number Padding between bars in pixels. utils/D3plusConfig.ts:257
baseline? number The baseline for the x/y plot. utils/D3plusConfig.ts:259
cache? boolean Whether to cache the processed data between renders. utils/D3plusConfig.ts:261
colorOrdinal? boolean Treat a discrete color field as ordered: color it with a single-hue light→dark ramp instead of nominal categorical hues. utils/D3plusConfig.ts:263
colorScale? string | ((d: number) => string) Color scale key or custom color function. utils/D3plusConfig.ts:265
colorScaleConfig? object Configuration for the color scale component. utils/D3plusConfig.ts:267
colorScaleConfig.axisConfig? AxisConfig - utils/D3plusConfig.ts:268
colorScaleConfig.centered? boolean - utils/D3plusConfig.ts:269
colorScaleConfig.colorMax? string - utils/D3plusConfig.ts:273
colorScaleConfig.colorMid? string - utils/D3plusConfig.ts:272
colorScaleConfig.colorMin? string - utils/D3plusConfig.ts:271
colorScaleConfig.colors? string[] - utils/D3plusConfig.ts:270
colorScaleConfig.scale? AxisScale - utils/D3plusConfig.ts:274
colorScalePadding? boolean | ((viz: VizBase) => boolean) Whether the color scale uses the visualization's internal padding when positioning, or an accessor receiving the viz. utils/D3plusConfig.ts:277
colorScalePosition? false | Position | (() => false | Position) Position of the color scale, false to hide it, or an accessor returning either. utils/D3plusConfig.ts:279
column? string Column key for matrix-style layouts. utils/D3plusConfig.ts:281
confidence? false | [string | ((d: DataPoint, i: number) => number), string | ((d: DataPoint, i: number) => number)] The confidence interval as [lower, upper] bounds — each given as an accessor function or a static data key (e.g. ["lci", "hci"]), or false to disable. utils/D3plusConfig.ts:287
data? string | DataPoint[] Data array or URL string to load data from. utils/D3plusConfig.ts:246
dataCutoff? number Maximum number of data points to render before downsampling. utils/D3plusConfig.ts:294
depth? number Active depth level for nested groupings. utils/D3plusConfig.ts:296
discrete? "x" | "y" Sets orientation of main category axis. utils/D3plusConfig.ts:298
duration? number Default duration of transitions, in milliseconds. utils/D3plusConfig.ts:300
filter? false | ((d: DataPoint, i: number) => boolean) Predicate filtering which data points are included, or false to disable. utils/D3plusConfig.ts:302
fitFilter? string | number | ((d: Record<string, unknown>) => boolean) Allows removing specific geographies from topojson file to improve zoom. utils/D3plusConfig.ts:304
groupBy? string | string[] | ((d: DataPoint) => string | number) | (d: DataPoint) => string | number[] Grouping key(s) or accessor function(s). utils/D3plusConfig.ts:309
groupPadding? number Padding between groups of bars in pixels. utils/D3plusConfig.ts:315
height? number Overall height of the visualization in pixels. utils/D3plusConfig.ts:317
hiddenColor? string | ((d: DataPoint, i: number) => string) Color for legend shapes whose grouping is hidden (via legend click), or a (datum, index) accessor. utils/D3plusConfig.ts:319
hiddenOpacity? number | ((d: DataPoint, i: number) => number) Opacity for legend labels whose grouping is hidden (via legend click), or a (datum, index) accessor. utils/D3plusConfig.ts:321
highlight? false | ((d: DataPoint, i: number) => boolean) | null Persistently emphasizes matching marks (keep color) and grays the rest. utils/D3plusConfig.ts:325
hover? false | ((d: DataPoint, i: number) => boolean) | null The hover callback function for highlighting shapes on mouseover. utils/D3plusConfig.ts:323
label? string | false | string[] | AccessorFn Label accessor for shapes. utils/D3plusConfig.ts:327
legend? boolean | ((config: D3plusConfig, arr: DataPoint[]) => boolean) Controls legend visibility. Pass false to hide it, true to always show it, or a (config, data) => boolean accessor to decide dynamically — the chart defaults use an accessor to auto-hide the legend when it would be redundant. utils/D3plusConfig.ts:334
legendConfig? object Configuration for the legend component. utils/D3plusConfig.ts:336
legendConfig.label? DataPointAccessor<string> - utils/D3plusConfig.ts:337
legendConfig.shapeConfig? Record<string, string | number> - utils/D3plusConfig.ts:338
legendFilterInvert? boolean | ((viz: VizBase) => boolean) Inverts legend click behavior (click hides / shift-click solos, or the reverse), or an accessor receiving the viz. utils/D3plusConfig.ts:341
legendPadding? boolean | ((viz: VizBase) => boolean) Whether the legend uses the visualization's internal padding when positioning, or an accessor receiving the viz. utils/D3plusConfig.ts:343
legendPosition? Position | (() => Position) Position of the legend, or an accessor returning it. utils/D3plusConfig.ts:345
legendSort? (a: DataPoint, b: DataPoint) => number Custom sort comparator for legend items. utils/D3plusConfig.ts:347
legendTooltip? TooltipConfig Tooltip configuration for legend items. utils/D3plusConfig.ts:349
lineLabels? boolean Whether to show labels on line charts. utils/D3plusConfig.ts:351
loadingHTML? string | ((viz: VizBase) => string) Custom HTML content for the loading indicator, or a function receiving the viz instance. utils/D3plusConfig.ts:355
loadingMessage? boolean Whether to show the loading message. utils/D3plusConfig.ts:353
locale? string Locale code used for text and number formatting. utils/D3plusConfig.ts:248
metric? string Metric key for the visualization. utils/D3plusConfig.ts:357
noDataHTML? string | ((viz: VizBase) => string) Custom HTML content shown when no data is supplied, or a function receiving the viz instance. utils/D3plusConfig.ts:359
ocean? string Ocean color for geomaps (any CSS value including 'transparent'). utils/D3plusConfig.ts:361
on? Record<string, (event: Event) => void> Event listeners keyed by event name. utils/D3plusConfig.ts:363
point? (d: DataPoint) => number[] Coordinate accessor for point-based geomaps. utils/D3plusConfig.ts:365
pointSize? string | ((d: DataPoint) => number) Point size accessor for geomaps. utils/D3plusConfig.ts:367
pointSizeMax? number Maximum point size for geomaps. utils/D3plusConfig.ts:371
pointSizeMin? number Minimum point size for geomaps. utils/D3plusConfig.ts:369
projection? string | ((x: number, y: number) => [number, number]) Map projection name or function. utils/D3plusConfig.ts:373
projectionPadding? string | number Outer padding between the visualization edge and map shapes. utils/D3plusConfig.ts:375
projectionRotate? [number, number] Rotation offset for the map projection center. utils/D3plusConfig.ts:377
row? string Row key for matrix-style layouts. utils/D3plusConfig.ts:379
scrollContainer? string | Window Scrollable container selector for tooltip positioning. utils/D3plusConfig.ts:381
shapeConfig? object Configuration for shape rendering. utils/D3plusConfig.ts:383
shapeConfig.duration? number - utils/D3plusConfig.ts:384
shapeSort? (a: string, b: string) => number A sort comparator that receives each shape class (e.g. "Circle", "Line") as its arguments. Shapes are drawn in groups by type, so this defines the layering order for all shapes of a given type. utils/D3plusConfig.ts:393
size? string Size accessor key. utils/D3plusConfig.ts:395
stacked? boolean Whether to stack series. utils/D3plusConfig.ts:397
stackOffset? string | ((series: number[][][], order: number[]) => void) Vertical offset applied to stacked series. One of "diverging" (default — positive and negative values split around zero), "none", "expand" (normalize each stack to 100%), "silhouette" (streamgraph), or "wiggle" (minimize slope changes); or a custom offset function. utils/D3plusConfig.ts:404
stackOrder? string | string[] | { order?: "ascending" | "descending"; value: string | ((d: DataPoint) => unknown); } | ((d: DataPoint) => unknown) Order of stacked series, from the bottom of the stack upward. Accepts a named order ("descending" [default] / "ascending" by summed value, "key" / "keyReverse" alphabetically, "none" / "data" for input order, or d3's "insideOut" / "appearance" / "reverse"), an Array of series keys for an explicit order, a value accessor, or a {value, order} config to rank series by an aggregate of any data field. utils/D3plusConfig.ts:413
subtitle? string | ((data: DataPoint[]) => string) Subtitle text, or an accessor returning it. utils/D3plusConfig.ts:419
subtitlePadding? boolean | ((viz: VizBase) => boolean) Whether the subtitle uses the visualization's internal padding when positioning, or an accessor receiving the viz. utils/D3plusConfig.ts:421
sum? DataPointAccessor<number> Value accessor for treemaps and aggregation. utils/D3plusConfig.ts:423
svgDesc? string Accessible description applied to the root SVG (<desc>). utils/D3plusConfig.ts:425
svgTitle? string Accessible title applied to the root SVG (<title>). utils/D3plusConfig.ts:427
threshold? number Threshold value for grouping small slices. utils/D3plusConfig.ts:429
thresholdName? string | ((d: DataPoint, i: number) => string) Label for the threshold group, or a (datum, index) accessor. utils/D3plusConfig.ts:431
tiles? boolean Whether to show map tiles. utils/D3plusConfig.ts:435
tileUrl? string URL to XYZ map tiles. utils/D3plusConfig.ts:433
time? string Time key for temporal data. utils/D3plusConfig.ts:437
timeFilter? false | ((d: DataPoint, i: number) => boolean) Predicate filtering which time slices are shown, or false to disable. utils/D3plusConfig.ts:439
timeline? boolean Whether to show the timeline component. utils/D3plusConfig.ts:441
timelinePadding? boolean | ((viz: VizBase) => boolean) Whether the timeline uses the visualization's internal padding when positioning, or an accessor receiving the viz. utils/D3plusConfig.ts:443
title? string | ((data: DataPoint[]) => string) Chart title or title accessor function. utils/D3plusConfig.ts:445
titleConfig? Record<string, string | number> CSS style configuration for the title. utils/D3plusConfig.ts:447
titlePadding? boolean | ((viz: VizBase) => boolean) Whether the title uses the visualization's internal padding when positioning, or an accessor receiving the viz. utils/D3plusConfig.ts:449
tooltip? boolean | ((d: DataPoint, i: number) => boolean) Whether to show tooltips, or a (datum, index) accessor deciding per mark. utils/D3plusConfig.ts:451
tooltipConfig? TooltipConfig Configuration for the tooltip component. utils/D3plusConfig.ts:453
topojson? string | object Path or object for the topojson data. utils/D3plusConfig.ts:455
topojsonFill? string CSS color to fill the map shapes. utils/D3plusConfig.ts:457
topojsonId? (obj: Record<string, unknown>) => string Accessor function for topojson feature IDs. utils/D3plusConfig.ts:459
totalPadding? boolean | ((viz: VizBase) => boolean) Whether the total uses the visualization's internal padding when positioning, or an accessor receiving the viz. utils/D3plusConfig.ts:461
value? DataPointAccessor<number> Value accessor for the visualization. utils/D3plusConfig.ts:463
width? number Overall width of the visualization in pixels. utils/D3plusConfig.ts:465
x? string | number | ((d: DataPoint, i: number) => unknown) Key, index, or accessor function for x-axis values. utils/D3plusConfig.ts:467
x2Domain? (number | Date)[] The x2 domain as an array. If either value is undefined, it is calculated from the data. utils/D3plusConfig.ts:473
x2Sort? (a: DataPoint, b: DataPoint) => number Defines a custom sorting comparator function for discrete x2 axes. utils/D3plusConfig.ts:477
xConfig? AxisConfig Configuration for the x-axis. utils/D3plusConfig.ts:469
xDomain? (number | Date)[] The x domain as an array. If either value is undefined, it is calculated from the data. utils/D3plusConfig.ts:471
xSort? (a: DataPoint, b: DataPoint) => number Custom sort function for x-axis values. utils/D3plusConfig.ts:475
y? string | number | ((d: DataPoint, i: number) => unknown) Key, index, or accessor function for y-axis values. utils/D3plusConfig.ts:479
y2Domain? (number | Date)[] The y2 domain as an array. If either value is undefined, it is calculated from the data. utils/D3plusConfig.ts:485
y2Sort? (a: DataPoint, b: DataPoint) => number Defines a custom sorting comparator function for discrete y2 axes. utils/D3plusConfig.ts:489
yConfig? AxisConfig Configuration for the y-axis. utils/D3plusConfig.ts:481
yDomain? (number | Date)[] The y domain as an array. If either value is undefined, it is calculated from the data. utils/D3plusConfig.ts:483
ySort? (a: DataPoint, b: DataPoint) => number Custom sort function for y-axis values. utils/D3plusConfig.ts:487
zoom? boolean Set to false to disable zooming on Geomap and Network. utils/D3plusConfig.ts:491
zoomFactor? number Multiplier applied to programmatic zoom steps. utils/D3plusConfig.ts:493
zoomMax? number Maximum zoom scale factor. utils/D3plusConfig.ts:495
zoomPan? boolean Whether panning (drag) is enabled while zoomed. utils/D3plusConfig.ts:497
zoomScroll? boolean Whether scroll-wheel zooming is enabled. utils/D3plusConfig.ts:499

ImageConfig

Defined in: shapes/shapeConfig.ts:214

Image-specific config (url + dimensions).

Properties
Property Type Description Defined in
data? DataPoint[] - shapes/shapeConfig.ts:215
duration? number - shapes/shapeConfig.ts:216
height? ConstOrAccessor<number> - shapes/shapeConfig.ts:217
id? AccessorFn - shapes/shapeConfig.ts:218
opacity? ConstOrAccessor<number> - shapes/shapeConfig.ts:219
pointerEvents? ConstOrAccessor<string> - shapes/shapeConfig.ts:220
select? string | HTMLElement | SVGElement | null - shapes/shapeConfig.ts:221
url? AccessorFn URL accessor returning the image src. shapes/shapeConfig.ts:223
width? ConstOrAccessor<number> - shapes/shapeConfig.ts:224
x? ConstOrAccessor<number> - shapes/shapeConfig.ts:225
y? ConstOrAccessor<number> - shapes/shapeConfig.ts:226

LegendConfig

Defined in: utils/D3plusConfig.ts:214

Properties
Property Type Description Defined in
active? false | ((d: DataPoint, i?: number) => boolean) The active method for all shapes. utils/D3plusConfig.ts:216
hover? false | ((d: DataPoint, i?: number) => boolean) The hover method for all shapes. utils/D3plusConfig.ts:218
shape? Accessor<string> The shape type used for each legend entry. utils/D3plusConfig.ts:220

LineConfig

Defined in: shapes/shapeConfig.ts:184

Line-specific config (curve + defined).

Extends
Indexable

[key: string]: unknown

Properties
Property Type Description Inherited from Defined in
active? ((d: DataPoint, i: number) => boolean) | null Predicate or null marking which data points are currently active. BaseShapeConfig.active shapes/shapeConfig.ts:52
activeOpacity? number Opacity applied to non-active data points (default ~0.25). BaseShapeConfig.activeOpacity shapes/shapeConfig.ts:54
activeStyle? Record<string, unknown> Style overrides for active data points. BaseShapeConfig.activeStyle shapes/shapeConfig.ts:56
ariaLabel? ConstOrAccessor<string> ARIA label per datum (accessibility). BaseShapeConfig.ariaLabel shapes/shapeConfig.ts:59
backgroundImage? ConstOrAccessor<string> Optional background image per datum (url or accessor returning a url). BaseShapeConfig.backgroundImage shapes/shapeConfig.ts:61
backgroundImageFit? ConstOrAccessor<"cover" | "contain"> How a backgroundImage fits its shape: "cover" (default) fills the shape's bounding box, cropping the overflow and clipping to the outline; "contain" fits the whole image, centered and fully visible, inside the shape's largest inscribed rectangle. BaseShapeConfig.backgroundImageFit shapes/shapeConfig.ts:68
curve? ConstOrAccessor<string> - - shapes/shapeConfig.ts:185
data? DataPoint[] Data array driving the shape. BaseShapeConfig.data shapes/shapeConfig.ts:49
defined? AccessorFn - - shapes/shapeConfig.ts:186
discrete? "x" | "y" Discrete-axis key ("x" "y") for charts that flip layout per axis. BaseShapeConfig.discrete
duration? number Animation duration in ms. BaseShapeConfig.duration shapes/shapeConfig.ts:73
fill? ConstOrAccessor<string> Fill color or accessor returning one. BaseShapeConfig.fill shapes/shapeConfig.ts:76
fillOpacity? ConstOrAccessor<number> Fill opacity (0..1). BaseShapeConfig.fillOpacity shapes/shapeConfig.ts:78
hitArea? Record<string, unknown> | ((d: DataPoint, i: number, aes: unknown) => Record<string, unknown>) Hit-area shape: function returning bounds or static bounds. BaseShapeConfig.hitArea shapes/shapeConfig.ts:88
hover? ((d: DataPoint, i: number) => boolean) | null Predicate or null marking which data points are currently hovered. BaseShapeConfig.hover shapes/shapeConfig.ts:81
hoverOpacity? number Opacity applied to non-hovered data points. BaseShapeConfig.hoverOpacity shapes/shapeConfig.ts:83
hoverStyle? Record<string, unknown> Style overrides for hovered data points. BaseShapeConfig.hoverStyle shapes/shapeConfig.ts:85
id? AccessorFn Unique-id accessor per datum (used for keyed enter/update/exit). BaseShapeConfig.id shapes/shapeConfig.ts:93
label? ConstOrAccessor<string | false | string[]> Label text(s) per datum. False/undefined skips. BaseShapeConfig.label shapes/shapeConfig.ts:95
labelBounds? Record<string, unknown> | ((d: DataPoint, i: number, aes: unknown) => Record<string, unknown> | Record<string, unknown>[]) Label-bounds accessor (where to mount the label). BaseShapeConfig.labelBounds shapes/shapeConfig.ts:97
labelConfig? Record<string, unknown> Label TextBox config (font, padding, etc.). BaseShapeConfig.labelConfig shapes/shapeConfig.ts:101
on? Record<string, (...args: unknown[]) => unknown> Event handlers (Object.<event, handler>). BaseShapeConfig.on shapes/shapeConfig.ts:159
opacity? ConstOrAccessor<number> Overall opacity (0..1). BaseShapeConfig.opacity shapes/shapeConfig.ts:104
pointerEvents? ConstOrAccessor<string> SVG pointer-events attribute per datum. BaseShapeConfig.pointerEvents shapes/shapeConfig.ts:106
renderMode? "full" | "compute" "full" runs the DOM enter/update/exit; "compute" skips DOM. BaseShapeConfig.renderMode shapes/shapeConfig.ts:120
role? ConstOrAccessor<string> ARIA role per datum (accessibility). BaseShapeConfig.role shapes/shapeConfig.ts:108
rotate? ConstOrAccessor<number> Rotation in degrees per datum. BaseShapeConfig.rotate shapes/shapeConfig.ts:111
rx? ConstOrAccessor<number> SVG rx (rect rounded-corner x) — applies to Rect/Bar. BaseShapeConfig.rx shapes/shapeConfig.ts:113
ry? ConstOrAccessor<number> SVG ry (rect rounded-corner y) — applies to Rect/Bar. BaseShapeConfig.ry shapes/shapeConfig.ts:115
scale? ConstOrAccessor<number> Scale factor (1 = identity). BaseShapeConfig.scale shapes/shapeConfig.ts:117
select? string | HTMLElement | SVGElement | null Where to mount the shape's DOM (CSS selector, element, or null). BaseShapeConfig.select shapes/shapeConfig.ts:122
shapeRendering? ConstOrAccessor<string> SVG shape-rendering attribute per datum. BaseShapeConfig.shapeRendering shapes/shapeConfig.ts:125
sort? ((a: DataPoint, b: DataPoint) => number) | null d3-style sort comparator. BaseShapeConfig.sort shapes/shapeConfig.ts:128
stroke? ConstOrAccessor<string> Stroke color. BaseShapeConfig.stroke shapes/shapeConfig.ts:131
strokeDasharray? ConstOrAccessor<string> SVG stroke-dasharray. BaseShapeConfig.strokeDasharray shapes/shapeConfig.ts:133
strokeLinecap? ConstOrAccessor<string> SVG stroke-linecap. BaseShapeConfig.strokeLinecap shapes/shapeConfig.ts:135
strokeOpacity? ConstOrAccessor<number> SVG stroke-opacity. BaseShapeConfig.strokeOpacity shapes/shapeConfig.ts:137
strokeWidth? ConstOrAccessor<number> Stroke width in pixels. BaseShapeConfig.strokeWidth shapes/shapeConfig.ts:139
textAnchor? ConstOrAccessor<string> SVG text-anchor for labels. BaseShapeConfig.textAnchor shapes/shapeConfig.ts:142
texture? ConstOrAccessor<string | Record<string, unknown>> Texture (per textures.js) — name string or full config. BaseShapeConfig.texture shapes/shapeConfig.ts:144
textureDefault? Record<string, unknown> Default texture config merged into the per-datum texture. BaseShapeConfig.textureDefault shapes/shapeConfig.ts:146
vectorEffect? ConstOrAccessor<string> SVG vector-effect (e.g. "non-scaling-stroke"). BaseShapeConfig.vectorEffect shapes/shapeConfig.ts:149
verticalAlign? ConstOrAccessor<string> Label vertical-align ("top"/"middle"/"bottom"). BaseShapeConfig.verticalAlign shapes/shapeConfig.ts:151
x? ConstOrAccessor<number> X position. BaseShapeConfig.x shapes/shapeConfig.ts:154
y? ConstOrAccessor<number> Y position. BaseShapeConfig.y shapes/shapeConfig.ts:156

Margin

Defined in: charts/viz/vizTypes.ts:45

Margin object with all four sides.

Properties
Property Type Defined in
bottom number charts/viz/vizTypes.ts:47
left number charts/viz/vizTypes.ts:48
right number charts/viz/vizTypes.ts:49
top number charts/viz/vizTypes.ts:46

Padding

Defined in: charts/viz/vizTypes.ts:53

Padding object with all four sides.

Properties
Property Type Defined in
bottom number charts/viz/vizTypes.ts:55
left number charts/viz/vizTypes.ts:56
right number charts/viz/vizTypes.ts:57
top number charts/viz/vizTypes.ts:54

PathConfig

Defined in: shapes/shapeConfig.ts:201

Path-specific config (raw SVG path d string or generator).

Extends
Indexable

[key: string]: unknown

Properties
Property Type Description Inherited from Defined in
active? ((d: DataPoint, i: number) => boolean) | null Predicate or null marking which data points are currently active. BaseShapeConfig.active shapes/shapeConfig.ts:52
activeOpacity? number Opacity applied to non-active data points (default ~0.25). BaseShapeConfig.activeOpacity shapes/shapeConfig.ts:54
activeStyle? Record<string, unknown> Style overrides for active data points. BaseShapeConfig.activeStyle shapes/shapeConfig.ts:56
ariaLabel? ConstOrAccessor<string> ARIA label per datum (accessibility). BaseShapeConfig.ariaLabel shapes/shapeConfig.ts:59
backgroundImage? ConstOrAccessor<string> Optional background image per datum (url or accessor returning a url). BaseShapeConfig.backgroundImage shapes/shapeConfig.ts:61
backgroundImageFit? ConstOrAccessor<"cover" | "contain"> How a backgroundImage fits its shape: "cover" (default) fills the shape's bounding box, cropping the overflow and clipping to the outline; "contain" fits the whole image, centered and fully visible, inside the shape's largest inscribed rectangle. BaseShapeConfig.backgroundImageFit shapes/shapeConfig.ts:68
d? ConstOrAccessor<string> - - shapes/shapeConfig.ts:202
data? DataPoint[] Data array driving the shape. BaseShapeConfig.data shapes/shapeConfig.ts:49
discrete? "x" | "y" Discrete-axis key ("x" "y") for charts that flip layout per axis. BaseShapeConfig.discrete
duration? number Animation duration in ms. BaseShapeConfig.duration shapes/shapeConfig.ts:73
fill? ConstOrAccessor<string> Fill color or accessor returning one. BaseShapeConfig.fill shapes/shapeConfig.ts:76
fillOpacity? ConstOrAccessor<number> Fill opacity (0..1). BaseShapeConfig.fillOpacity shapes/shapeConfig.ts:78
hitArea? Record<string, unknown> | ((d: DataPoint, i: number, aes: unknown) => Record<string, unknown>) Hit-area shape: function returning bounds or static bounds. BaseShapeConfig.hitArea shapes/shapeConfig.ts:88
hover? ((d: DataPoint, i: number) => boolean) | null Predicate or null marking which data points are currently hovered. BaseShapeConfig.hover shapes/shapeConfig.ts:81
hoverOpacity? number Opacity applied to non-hovered data points. BaseShapeConfig.hoverOpacity shapes/shapeConfig.ts:83
hoverStyle? Record<string, unknown> Style overrides for hovered data points. BaseShapeConfig.hoverStyle shapes/shapeConfig.ts:85
id? AccessorFn Unique-id accessor per datum (used for keyed enter/update/exit). BaseShapeConfig.id shapes/shapeConfig.ts:93
label? ConstOrAccessor<string | false | string[]> Label text(s) per datum. False/undefined skips. BaseShapeConfig.label shapes/shapeConfig.ts:95
labelBounds? Record<string, unknown> | ((d: DataPoint, i: number, aes: unknown) => Record<string, unknown> | Record<string, unknown>[]) Label-bounds accessor (where to mount the label). BaseShapeConfig.labelBounds shapes/shapeConfig.ts:97
labelConfig? Record<string, unknown> Label TextBox config (font, padding, etc.). BaseShapeConfig.labelConfig shapes/shapeConfig.ts:101
on? Record<string, (...args: unknown[]) => unknown> Event handlers (Object.<event, handler>). BaseShapeConfig.on shapes/shapeConfig.ts:159
opacity? ConstOrAccessor<number> Overall opacity (0..1). BaseShapeConfig.opacity shapes/shapeConfig.ts:104
pointerEvents? ConstOrAccessor<string> SVG pointer-events attribute per datum. BaseShapeConfig.pointerEvents shapes/shapeConfig.ts:106
renderMode? "full" | "compute" "full" runs the DOM enter/update/exit; "compute" skips DOM. BaseShapeConfig.renderMode shapes/shapeConfig.ts:120
role? ConstOrAccessor<string> ARIA role per datum (accessibility). BaseShapeConfig.role shapes/shapeConfig.ts:108
rotate? ConstOrAccessor<number> Rotation in degrees per datum. BaseShapeConfig.rotate shapes/shapeConfig.ts:111
rx? ConstOrAccessor<number> SVG rx (rect rounded-corner x) — applies to Rect/Bar. BaseShapeConfig.rx shapes/shapeConfig.ts:113
ry? ConstOrAccessor<number> SVG ry (rect rounded-corner y) — applies to Rect/Bar. BaseShapeConfig.ry shapes/shapeConfig.ts:115
scale? ConstOrAccessor<number> Scale factor (1 = identity). BaseShapeConfig.scale shapes/shapeConfig.ts:117
select? string | HTMLElement | SVGElement | null Where to mount the shape's DOM (CSS selector, element, or null). BaseShapeConfig.select shapes/shapeConfig.ts:122
shapeRendering? ConstOrAccessor<string> SVG shape-rendering attribute per datum. BaseShapeConfig.shapeRendering shapes/shapeConfig.ts:125
sort? ((a: DataPoint, b: DataPoint) => number) | null d3-style sort comparator. BaseShapeConfig.sort shapes/shapeConfig.ts:128
stroke? ConstOrAccessor<string> Stroke color. BaseShapeConfig.stroke shapes/shapeConfig.ts:131
strokeDasharray? ConstOrAccessor<string> SVG stroke-dasharray. BaseShapeConfig.strokeDasharray shapes/shapeConfig.ts:133
strokeLinecap? ConstOrAccessor<string> SVG stroke-linecap. BaseShapeConfig.strokeLinecap shapes/shapeConfig.ts:135
strokeOpacity? ConstOrAccessor<number> SVG stroke-opacity. BaseShapeConfig.strokeOpacity shapes/shapeConfig.ts:137
strokeWidth? ConstOrAccessor<number> Stroke width in pixels. BaseShapeConfig.strokeWidth shapes/shapeConfig.ts:139
textAnchor? ConstOrAccessor<string> SVG text-anchor for labels. BaseShapeConfig.textAnchor shapes/shapeConfig.ts:142
texture? ConstOrAccessor<string | Record<string, unknown>> Texture (per textures.js) — name string or full config. BaseShapeConfig.texture shapes/shapeConfig.ts:144
textureDefault? Record<string, unknown> Default texture config merged into the per-datum texture. BaseShapeConfig.textureDefault shapes/shapeConfig.ts:146
vectorEffect? ConstOrAccessor<string> SVG vector-effect (e.g. "non-scaling-stroke"). BaseShapeConfig.vectorEffect shapes/shapeConfig.ts:149
verticalAlign? ConstOrAccessor<string> Label vertical-align ("top"/"middle"/"bottom"). BaseShapeConfig.verticalAlign shapes/shapeConfig.ts:151
x? ConstOrAccessor<number> X position. BaseShapeConfig.x shapes/shapeConfig.ts:154
y? ConstOrAccessor<number> Y position. BaseShapeConfig.y shapes/shapeConfig.ts:156

RectConfig

Defined in: shapes/shapeConfig.ts:165

Rect-specific config (width + height on top of base).

Extends
Extended by
Indexable

[key: string]: unknown

Properties
Property Type Description Inherited from Defined in
active? ((d: DataPoint, i: number) => boolean) | null Predicate or null marking which data points are currently active. BaseShapeConfig.active shapes/shapeConfig.ts:52
activeOpacity? number Opacity applied to non-active data points (default ~0.25). BaseShapeConfig.activeOpacity shapes/shapeConfig.ts:54
activeStyle? Record<string, unknown> Style overrides for active data points. BaseShapeConfig.activeStyle shapes/shapeConfig.ts:56
ariaLabel? ConstOrAccessor<string> ARIA label per datum (accessibility). BaseShapeConfig.ariaLabel shapes/shapeConfig.ts:59
backgroundImage? ConstOrAccessor<string> Optional background image per datum (url or accessor returning a url). BaseShapeConfig.backgroundImage shapes/shapeConfig.ts:61
backgroundImageFit? ConstOrAccessor<"cover" | "contain"> How a backgroundImage fits its shape: "cover" (default) fills the shape's bounding box, cropping the overflow and clipping to the outline; "contain" fits the whole image, centered and fully visible, inside the shape's largest inscribed rectangle. BaseShapeConfig.backgroundImageFit shapes/shapeConfig.ts:68
data? DataPoint[] Data array driving the shape. BaseShapeConfig.data shapes/shapeConfig.ts:49
discrete? "x" | "y" Discrete-axis key ("x" "y") for charts that flip layout per axis. BaseShapeConfig.discrete
duration? number Animation duration in ms. BaseShapeConfig.duration shapes/shapeConfig.ts:73
fill? ConstOrAccessor<string> Fill color or accessor returning one. BaseShapeConfig.fill shapes/shapeConfig.ts:76
fillOpacity? ConstOrAccessor<number> Fill opacity (0..1). BaseShapeConfig.fillOpacity shapes/shapeConfig.ts:78
height? ConstOrAccessor<number> - - shapes/shapeConfig.ts:167
hitArea? Record<string, unknown> | ((d: DataPoint, i: number, aes: unknown) => Record<string, unknown>) Hit-area shape: function returning bounds or static bounds. BaseShapeConfig.hitArea shapes/shapeConfig.ts:88
hover? ((d: DataPoint, i: number) => boolean) | null Predicate or null marking which data points are currently hovered. BaseShapeConfig.hover shapes/shapeConfig.ts:81
hoverOpacity? number Opacity applied to non-hovered data points. BaseShapeConfig.hoverOpacity shapes/shapeConfig.ts:83
hoverStyle? Record<string, unknown> Style overrides for hovered data points. BaseShapeConfig.hoverStyle shapes/shapeConfig.ts:85
id? AccessorFn Unique-id accessor per datum (used for keyed enter/update/exit). BaseShapeConfig.id shapes/shapeConfig.ts:93
label? ConstOrAccessor<string | false | string[]> Label text(s) per datum. False/undefined skips. BaseShapeConfig.label shapes/shapeConfig.ts:95
labelBounds? Record<string, unknown> | ((d: DataPoint, i: number, aes: unknown) => Record<string, unknown> | Record<string, unknown>[]) Label-bounds accessor (where to mount the label). BaseShapeConfig.labelBounds shapes/shapeConfig.ts:97
labelConfig? Record<string, unknown> Label TextBox config (font, padding, etc.). BaseShapeConfig.labelConfig shapes/shapeConfig.ts:101
on? Record<string, (...args: unknown[]) => unknown> Event handlers (Object.<event, handler>). BaseShapeConfig.on shapes/shapeConfig.ts:159
opacity? ConstOrAccessor<number> Overall opacity (0..1). BaseShapeConfig.opacity shapes/shapeConfig.ts:104
pointerEvents? ConstOrAccessor<string> SVG pointer-events attribute per datum. BaseShapeConfig.pointerEvents shapes/shapeConfig.ts:106
renderMode? "full" | "compute" "full" runs the DOM enter/update/exit; "compute" skips DOM. BaseShapeConfig.renderMode shapes/shapeConfig.ts:120
role? ConstOrAccessor<string> ARIA role per datum (accessibility). BaseShapeConfig.role shapes/shapeConfig.ts:108
rotate? ConstOrAccessor<number> Rotation in degrees per datum. BaseShapeConfig.rotate shapes/shapeConfig.ts:111
rx? ConstOrAccessor<number> SVG rx (rect rounded-corner x) — applies to Rect/Bar. BaseShapeConfig.rx shapes/shapeConfig.ts:113
ry? ConstOrAccessor<number> SVG ry (rect rounded-corner y) — applies to Rect/Bar. BaseShapeConfig.ry shapes/shapeConfig.ts:115
scale? ConstOrAccessor<number> Scale factor (1 = identity). BaseShapeConfig.scale shapes/shapeConfig.ts:117
select? string | HTMLElement | SVGElement | null Where to mount the shape's DOM (CSS selector, element, or null). BaseShapeConfig.select shapes/shapeConfig.ts:122
shapeRendering? ConstOrAccessor<string> SVG shape-rendering attribute per datum. BaseShapeConfig.shapeRendering shapes/shapeConfig.ts:125
sort? ((a: DataPoint, b: DataPoint) => number) | null d3-style sort comparator. BaseShapeConfig.sort shapes/shapeConfig.ts:128
stroke? ConstOrAccessor<string> Stroke color. BaseShapeConfig.stroke shapes/shapeConfig.ts:131
strokeDasharray? ConstOrAccessor<string> SVG stroke-dasharray. BaseShapeConfig.strokeDasharray shapes/shapeConfig.ts:133
strokeLinecap? ConstOrAccessor<string> SVG stroke-linecap. BaseShapeConfig.strokeLinecap shapes/shapeConfig.ts:135
strokeOpacity? ConstOrAccessor<number> SVG stroke-opacity. BaseShapeConfig.strokeOpacity shapes/shapeConfig.ts:137
strokeWidth? ConstOrAccessor<number> Stroke width in pixels. BaseShapeConfig.strokeWidth shapes/shapeConfig.ts:139
textAnchor? ConstOrAccessor<string> SVG text-anchor for labels. BaseShapeConfig.textAnchor shapes/shapeConfig.ts:142
texture? ConstOrAccessor<string | Record<string, unknown>> Texture (per textures.js) — name string or full config. BaseShapeConfig.texture shapes/shapeConfig.ts:144
textureDefault? Record<string, unknown> Default texture config merged into the per-datum texture. BaseShapeConfig.textureDefault shapes/shapeConfig.ts:146
trail? boolean Sweep a tapering motion trail behind the rect as it moves between frames. - shapes/shapeConfig.ts:169
trailPersist? number | boolean Steps of trail history to keep (number), or true for a long fading tail. - shapes/shapeConfig.ts:171
vectorEffect? ConstOrAccessor<string> SVG vector-effect (e.g. "non-scaling-stroke"). BaseShapeConfig.vectorEffect shapes/shapeConfig.ts:149
verticalAlign? ConstOrAccessor<string> Label vertical-align ("top"/"middle"/"bottom"). BaseShapeConfig.verticalAlign shapes/shapeConfig.ts:151
width? ConstOrAccessor<number> - - shapes/shapeConfig.ts:166
x? ConstOrAccessor<number> X position. BaseShapeConfig.x shapes/shapeConfig.ts:154
y? ConstOrAccessor<number> Y position. BaseShapeConfig.y shapes/shapeConfig.ts:156

TextBoxConfig

Defined in: utils/D3plusConfig.ts:121

Properties
Property Type Description Defined in
ellipsis? (text: string, line: number) => string Handles truncated lines, returning the new line value. Passed the line's text and number; by default appends an ellipsis to every line except a first word that cannot fit (which returns ""). utils/D3plusConfig.ts:159
fontColor? Accessor<string> The font color as an accessor function or static string. Inferred from the DOM selection by default. utils/D3plusConfig.ts:125
fontFamily? Accessor<string | string[]> The font-family to use: a font name, a comma-separated list of fallbacks, an array of fallbacks, or an accessor returning a string or array. The first available font on the client is used. utils/D3plusConfig.ts:133
fontMax? number The maximum font size in pixels, used when dynamically resizing fonts. utils/D3plusConfig.ts:139
fontMin? number The minimum font size in pixels, used when dynamically resizing fonts. utils/D3plusConfig.ts:137
fontOpacity? Accessor<number> The font opacity as an accessor function or static number between 0 and 1. utils/D3plusConfig.ts:143
fontResize? Accessor<boolean> Toggles font resizing — a static boolean, or an accessor returning a boolean. utils/D3plusConfig.ts:141
fontSize? Accessor<number> The font size in pixels. Inferred from the DOM selection by default. utils/D3plusConfig.ts:127
fontStroke? Accessor<string> The font stroke color for the rendered text. utils/D3plusConfig.ts:145
fontStrokeWidth? Accessor<number> The font stroke width for the rendered text. utils/D3plusConfig.ts:147
fontWeight? Accessor<string | number> The font weight. Inferred from the DOM selection by default. utils/D3plusConfig.ts:135
height? Accessor<number> The height for each text box. utils/D3plusConfig.ts:169
lineHeight? Accessor<number> The line height, which is 1.2 times the font size by default. utils/D3plusConfig.ts:149
maxLines? Accessor<number | null> Restricts the maximum number of lines to wrap onto; null (unlimited) by default. utils/D3plusConfig.ts:151
overflow? Accessor<boolean> Whether text is allowed to overflow its bounding box. utils/D3plusConfig.ts:153
padding? Accessor<string | number> The padding as a CSS shorthand string or number. Defaults to 0. utils/D3plusConfig.ts:161
rotateAnchor? Accessor<[number, number]> The anchor point around which to rotate the text box. utils/D3plusConfig.ts:163
split? (text: string) => string[] The word split function: given a string, returns it split into an array of words. utils/D3plusConfig.ts:165
text? Accessor<string> The text content for each box. utils/D3plusConfig.ts:123
width? Accessor<number> The width for each text box. utils/D3plusConfig.ts:167
x? Accessor<number> The x position (left edge) for each text box. utils/D3plusConfig.ts:171
y? Accessor<number> The y position (top edge) for each text box. utils/D3plusConfig.ts:173

TimelineConfig

Defined in: utils/D3plusConfig.ts:176

Properties
Property Type Description Defined in
brushFilter? () => boolean Brush event filter. utils/D3plusConfig.ts:178
brushMin? number The minimum number of ticks that can be highlighted when using "ticks" buttonBehavior. Helpful for x/y plots where selecting fewer than 2 time periods is undesirable. utils/D3plusConfig.ts:184
buttonAlign? "middle" | "end" | "start" Toggles the horizontal alignment of the button timeline. utils/D3plusConfig.ts:186
buttonBehavior? "auto" | "buttons" | "ticks" Toggles the style of the timeline. utils/D3plusConfig.ts:188
buttonHeight? number Button height. utils/D3plusConfig.ts:190
buttonPadding? number Button padding. utils/D3plusConfig.ts:192
handleConfig? Record<string, unknown> Handle style. utils/D3plusConfig.ts:194
handleSize? number Handle size. utils/D3plusConfig.ts:196
playButton? boolean Determines the visibility of the play button to the left of the timeline, which cycles through the available periods at a rate set by playButtonInterval. utils/D3plusConfig.ts:201
playButtonInterval? number The interval, in milliseconds, between periods when cycling via the play button. Used only when the chart's duration is 0 (no transition); otherwise playback steps once per duration so each step animates in full. utils/D3plusConfig.ts:207
selection? number | false | Date | (number | Date)[] The current selection. Defaults to the most recent period in the timeline. utils/D3plusConfig.ts:209
snapping? boolean Toggles the snapping value. utils/D3plusConfig.ts:211

TooltipConfig

Defined in: utils/D3plusConfig.ts:82

Properties
Property Type Description Defined in
arrow? string | ((d: DataPoint) => string) The inner HTML content of the arrow element, empty by default. utils/D3plusConfig.ts:84
background? string | ((d: DataPoint) => string) The background color accessor for each tooltip. utils/D3plusConfig.ts:86
body? string | ((d: DataPoint) => string) - utils/D3plusConfig.ts:102
border? string | ((d: DataPoint) => string) The border accessor for each tooltip. utils/D3plusConfig.ts:88
borderRadius? string | ((d: DataPoint) => string) The border-radius accessor for each tooltip. utils/D3plusConfig.ts:90
footer? string | ((d: DataPoint) => string) The footer content accessor for each tooltip. utils/D3plusConfig.ts:92
maxWidth? string | number | ((d: DataPoint) => string | number) The max-width accessor for each tooltip. utils/D3plusConfig.ts:94
minWidth? string | number | ((d: DataPoint) => string | number) The min-width accessor for each tooltip. utils/D3plusConfig.ts:96
offset? number | ((d: DataPoint) => number) The pixel offset between the tooltip and its anchor point. utils/D3plusConfig.ts:98
padding? string | number | ((d: DataPoint) => string | number) The inner padding of each tooltip. utils/D3plusConfig.ts:100
tbody? ((d: DataPoint) => [string, string][]) | (string | ((d: DataPoint, i?: number, x?: object) => string))[][] - utils/D3plusConfig.ts:111
thead? ((d: DataPoint) => [string, string][]) | (string | ((d: DataPoint, i?: number, x?: object) => string))[][] - utils/D3plusConfig.ts:103
title? string | ((d: DataPoint) => string) - utils/D3plusConfig.ts:101

WhiskerConfig

Defined in: shapes/shapeConfig.ts:251

Whisker-specific config.

Indexable

[key: string]: unknown

Properties
Property Type Description Defined in
data? DataPoint[] - shapes/shapeConfig.ts:252
endpoint? ConstOrAccessor<string> End-cap shape name (e.g. "Rect"). shapes/shapeConfig.ts:254
endpointConfig? Record<string, unknown> - shapes/shapeConfig.ts:255
length? ConstOrAccessor<number> Whisker length in pixels. shapes/shapeConfig.ts:257
lineConfig? Record<string, unknown> - shapes/shapeConfig.ts:258
orient? ConstOrAccessor<string> - shapes/shapeConfig.ts:259
select? string | HTMLElement | SVGElement | null - shapes/shapeConfig.ts:260
x? ConstOrAccessor<number> - shapes/shapeConfig.ts:261
y? ConstOrAccessor<number> - shapes/shapeConfig.ts:262

Type Aliases

AnyShapeConfig

AnyShapeConfig = BaseShapeConfig | RectConfig | CircleConfig | LineConfig | AreaConfig | PathConfig | BarConfig | ImageConfig | BoxConfig | WhiskerConfig

Defined in: shapes/shapeConfig.ts:272

Union of every shape config — useful for code that composes transient configs at runtime without knowing the shape ahead of time (Plot's shapeConfig, axis decorators, etc.).


ConstOrAccessor

ConstOrAccessor<T> = T | AccessorFn

Defined in: shapes/shapeConfig.ts:35

A value that can either be a function (called per-datum) or a literal that wraps as constant(_). Mirrors the runtime "const" coerce.

Type Parameters
Type Parameter Default type
T unknown

D3Selection

D3Selection = object

Defined in: charts/viz/vizTypes.ts:68

D3-style selection — deliberately loose. d3-selection's element/datum generics are invariant, so a single typed alias can't accept every select(...) result the chart code assigns to _select/_container/etc.; the any methods + index signature are the escape hatch (same rationale as the per-class fluent-accessor index signatures).

Indexable

[key: string]: any

Methods

attr()

attr(name: string, ...args: any[]): any

Defined in: charts/viz/vizTypes.ts:70

Parameters
Parameter Type
name string
...args any[]
Returns

any

call()

call(...args: any[]): any

Defined in: charts/viz/vizTypes.ts:75

Parameters
Parameter Type
...args any[]
Returns

any

node()

node(): any

Defined in: charts/viz/vizTypes.ts:69

Returns

any

on()

on(event: string, handler: any): any

Defined in: charts/viz/vizTypes.ts:74

Parameters
Parameter Type
event string
handler any
Returns

any

select()

select(selector: any): any

Defined in: charts/viz/vizTypes.ts:73

Parameters
Parameter Type
selector any
Returns

any

selectAll()

selectAll(selector: string): any

Defined in: charts/viz/vizTypes.ts:72

Parameters
Parameter Type
selector string
Returns

any

style()

style(name: string, ...args: any[]): any

Defined in: charts/viz/vizTypes.ts:71

Parameters
Parameter Type
name string
...args any[]
Returns

any

transition()

transition(...args: any[]): any

Defined in: charts/viz/vizTypes.ts:76

Parameters
Parameter Type
...args any[]
Returns

any


StringOrAccessor

StringOrAccessor<T> = T | string | AccessorFn

Defined in: shapes/shapeConfig.ts:41

A value that can be a function, a string key (wrapped in accessor), or a literal (wrapped in constant). Mirrors the "accessor" coerce.

Type Parameters
Type Parameter Default type
T unknown

Keywords