@urban-toolkit/autk-plot / PlotBaseData
Abstract Class: PlotBaseData
Defined in: plot-base-data.ts:47
Base class for shared plot data lifecycle.
Normalizes input rows, validates configured bindings, runs transforms, and resolves the active rendered schema used by subclasses during drawing.
Extended by
Constructors
Constructor
new PlotBaseData(
config):PlotBaseData
Defined in: plot-base-data.ts:100
Initializes shared plot data state from a plot configuration.
Parameters
config
Plot configuration containing source data, bindings, and transform/display options.
Returns
PlotBaseData
Throws
If attributes.axis is empty or configured bindings are missing/invalid.
Throws
If @transform placeholder is used without a transform config.
Properties
_axisLabels
protected_axisLabels:string[]
Defined in: plot-base-data.ts:61
User-facing axis labels.
_categoricalColorMapInterpolator
protected_categoricalColorMapInterpolator:ColorMapInterpolator=ColorMapInterpolator.CAT_OBSERVABLE10
Defined in: plot-base-data.ts:91
Color interpolator used when the color attribute contains categorical (string) values.
_colorMapInterpolator
protected_colorMapInterpolator:ColorMapInterpolator=ColorMapInterpolator.SEQ_REDS
Defined in: plot-base-data.ts:89
Color interpolator used for continuous (numeric) color encoding.
_data
protected_data:object&object[]
Defined in: plot-base-data.ts:54
Normalized render rows bound to marks.
_div
protected_div:HTMLElement
Defined in: plot-base-data.ts:49
Host element where the plot is rendered.
_domainSpec
protected_domainSpec:ColorMapDomainSpec|undefined=undefined
Defined in: plot-base-data.ts:87
Domain specification for color encoding (from config).
_height
protected_height:number=500
Defined in: plot-base-data.ts:76
Outer plot height in pixels.
_margins
protected_margins:PlotMargins
Defined in: plot-base-data.ts:78
Plot margins in pixels.
_resolvedDomain
protected_resolvedDomain:ResolvedDomain|undefined=undefined
Defined in: plot-base-data.ts:81
Resolved color domain, computed from data after each transform.
_sourceFeatures
protected_sourceFeatures:Feature<Geometry,GeoJsonProperties>[]
Defined in: plot-base-data.ts:52
Original source features from the input collection, indexed by source feature id.
_tickFormats
protected_tickFormats:string[]
Defined in: plot-base-data.ts:71
D3 tick-format specifiers used by axis renderers.
_title
protected_title:string
Defined in: plot-base-data.ts:69
Plot title text.
_transformAttributes
protected_transformAttributes:string[] |undefined=undefined
Defined in: plot-base-data.ts:59
Dot-path attributes used to read values from transformed rows, when applicable.
_transformColorAttribute
protected_transformColorAttribute:string|null|undefined=undefined
Defined in: plot-base-data.ts:66
Dot-path attribute used for color encoding on transformed rows, when applicable.
_transformConfig?
protectedoptional_transformConfig?:PlotTransformConfig
Defined in: plot-base-data.ts:84
Optional transform config shared by plot implementations that support transformed views.
_width
protected_width:number=800
Defined in: plot-base-data.ts:74
Outer plot width in pixels.
Accessors
renderAxisAttributes
Get Signature
get
protectedrenderAxisAttributes():string[]
Defined in: plot-base-data.ts:293
Returns the active axis bindings for rendered rows.
Returns
string[]
renderColorAttribute
Get Signature
get
protectedrenderColorAttribute():string|undefined
Defined in: plot-base-data.ts:300
Returns the active color binding for rendered rows.
Returns
string | undefined
Methods
afterDataRefresh()
protectedafterDataRefresh():void
Defined in: plot-base-data.ts:262
Lifecycle hook invoked after _data has been refreshed but before render-time validation and color-domain computation.
Returns
void
computeColorDomain()
protectedcomputeColorDomain():void
Defined in: plot-base-data.ts:324
Computes and caches the active color domain from rendered rows.
Returns
void
draw()
draw():
void
Defined in: plot-base-data.ts:152
Rebuilds source rows, applies transforms, validates bindings, and delegates rendering.
Returns
void
Throws
If active render bindings do not resolve on the rendered data.
render()
abstractrender():void
Defined in: plot-base-data.ts:267
Renders plot DOM, SVG, or HTML nodes for the current internal state.
Returns
void
resolveTransformResult()
protectedresolveTransformResult(result):ResolvedPlotTransform
Defined in: plot-base-data.ts:276
Maps a preset-specific executed transform into the rendered row schema expected by plot implementations.
Parameters
result
Executed transform payload returned by the shared dispatcher.
Returns
Normalized rendered rows plus any transformed binding metadata.
setRenderColorAttribute()
protectedsetRenderColorAttribute(attribute):void
Defined in: plot-base-data.ts:312
Updates the active render-time color binding.
Parameters
attribute
string | undefined
Dot-path attribute to use for color, or undefined to clear it.
Returns
void