Chartsv26.10.18
API reference

Core API (@unifin/chart-core)

Generated reference of 1760 public symbols of @unifin/chart-core plus 81 symbols of its subpaths, grouped by kind and ordered as in the sources.

Generated from the package entry packages/chart-core/src/index.ts. Names are reachable through @unifin/chart-core; use your editor for full signatures - this page carries the map.

Classes (65)

SymbolWhat it does
AlertEngine-
AlertJournal-
TimelineModel-
MarketDataAdaptermarket-data-ms adapter via the portal BFF (§4): REST pages for history, SSE for the live stream, STOMP frames for quotes and trades. Payloads are validated before they reach the series.
MemoryAdapterDeterministic in-memory feed (§4). Used by unit tests, visual fixtures and the CI mock stand; supports the same paging rules as the real adapter so tests exercise the contract, not a shortcut.
BarAggregatorBuilds bars from a tick stream and keeps an idempotency window so a duplicated source event cannot double the volume (NFR-RELY-03).
BarCacheLRU cache of loaded series (default 12) with freshness rules: an entry is dropped when the source, its contract version or the trading day differ. The cache keeps references only - no copies of bar arrays.
ConnectionControllerTracks one stream link: idle -> connecting -> live, a silent source moves the view to snapshot, a break moves it to offline and gives the retry delay back. State events are emitted only on real transitions (idempotent by design).
DataControllerWires a datafeed into series, cache and storage (§3): pages are loaded backwards, a failed load keeps the history that is already on screen, and a lost connection triggers a snapshot refill from the source.
DatafeedError-
GapMonitor-
OrderbookModel-
TickPipelineWrites a tick stream into a series ( §5): one series write per bar per batch, duplicates and late ticks are counted, not applied, and the invariant applied + duplicates + late + rejected === pushed always holds.
MemoryStoreIn-memory storage for tests and hosts without persistence.
MemoryKeyValuePlain map behind AsyncKeyValueStore: lets IndexedDbStore run in tests.
IndexedDbStorePersistentStore over any AsyncKeyValueStore. Malformed records are treated as a miss and storage failures never escape: a broken storage must not take the chart down (NFR-RELY-04).
DrawingHistory-
DrawingToolRegistryRegistry of custom tools; built-in ids are reserved.
SpatialGridUniform grid over drawing bounding boxes ( §3: index for hit tests).
GeometryCacheMemo of the per-drawing geometry (and its mapped draw ops) keyed by the caller scale version. Lookups use nested dictionaries (scale -> id) so a steady frame never builds key strings. Objects are immutable, so a changed object is a new reference and rebuilds itself; the host bumps scaleKey when bars or the scale change the projected coordinates.
DrawingStore-
DrawingStyleLibrary-
TemplateLibrary-
InteractionController-
KineticScroller-
BarSelection-
SeriesOrdered bar series for one instrument and timeframe. Index access is O(1); time lookup is O(log n) ( §1).
BookHeatmap-
IncrementalReplayHeatmapIncremental replay heatmap: keeps the BookHeatmap and scans every snapshot once while the cursor moves forward; a backward seek or an explicit reset rebuilds from scratch, so the incremental picture always equals the full collectReplayHeatmap result (property test). Single forward steps touch only the new columns.
ProfileCache-
FootprintAccumulator-
WindowProfileCache-
ChartRendererBackend controller: picks the backend once, degrades to canvas2d on context loss and guarantees the frame statistics event ( §7.3, §8). The economy flag from the performance guard is applied to every frame automatically.
Canvas2DRendererLayer order is fixed by §4 and implemented with the scene registry. S1 paints background, grid, series and crosshair; overlays, drawings, markers, axes, interaction and ui layers arrive in later.
DirtyTracker-
PerformanceGuard-
TextCache-
WebGL2BackendWebGL2 backend. Draws the series layer only: the grid, axes, crosshair and tooltips stay on the canvas2d overlay (hybrid mode, ). Every batch is exactly one draw call with a flat uniform color.
ReplayEngineIndex of the last visible bar. index is always clamped into [0, length) for non-empty histories; an empty series keeps index -1.
MarketReplay-
NumericAxisLinear numeric axis: even spacing over a finite domain.
CategoryAxisCategorical axis: one centred slot per label (strikes, sectors, months).
PriceScaleMaps prices to pixels for one mode. Non-positive prices fall back to linear scaling for log mode, so broken data cannot produce Infinity ( §2).
TimeScaleIndex based time scale: every bar occupies an equal slot, so empty sessions never create holes in the chart ( §1).
SceneOrdered layer registry. The scene never computes geometry itself: it only owns the order, the enabled flags and the profile (invariants I-1..I-3 of ). A layer registered twice replaces the earlier one.
InteractionEventQueuePending count of the queue (hosts may assert the throttling in tests).
WorkspaceLibraryIn-memory collection of named workspaces with export/import. Names are unique and case-sensitive; saving an existing name overwrites the record and refreshes its timestamp.
CatalogModel-
IndicatorDefinitionErrorThrown when a definition breaks the contract; keeps the message actionable.
IndicatorRegistry-
IndicatorEngineRuns indicator definitions over a bar history ( §2). Incremental definitions step one bar through update; updates of a forming bar replay from the state captured before it, so history is never rebuilt. A broken definition is isolated: its instance reports the error, others live.
FrameSchedulerCooperative frame scheduler: tasks are generators, every runFrame spends at most budgetMs and keeps the remainder for the next frame. Priorities follow the visible buffer first rule ( §2).
CancelledTaskError-
WorkerPoolRound robin worker pool with a waiting queue and cancellation. Results with an unknown or cancelled id are ignored; a worker error rejects only its task and frees the worker for the next one (NFR-RELY-05).
BracketLayer-
BracketSeam-
TradingJournal-
TradingExceptionTyped transport/business error of the trading contour ( §6).
OrderLineManager-
PaperBrokerDeterministic paper broker. Orders are identified by the host-provided id; onTick processes working limit orders in id order, so replays are reproducible.
PositionTracker-
StopManager-
OrderTicket-
PaneOne chart pane. The time scale is always pane owned; the price scale is shared when sharePriceScale is set (invariant I-3 of ).
LayoutModelVertical pane stack (S1 scope). Layout is computed on demand from weights so the model carries no pixel state; separators are subtracted before the weights are applied (invariant I-1).

Functions (693)

SymbolWhat it does
channelsForSeverityChannels of the escalation policy for a severity.
alertChannelTitle-
planAlertActionsBuilds the action plan of an event. channels narrows the policy (for example, a user preference list); channels outside the platform catalogue are reported as problems and never make it into the plan.
changePercentALT-04: percent change of the close over period bars.
volumeSpikeALT-05: volume spike against the average of the window WITHOUT the last bar.
indicatorCrossALT-06: fast crosses slow on the last closed bar.
indicatorLevelALT-07: indicator crosses its level (edge, not state).
deliverAlertPlanWalks the plan in the delivery order the core built (IN_APP, PUSH, EMAIL, SMS), plays the sound once for warning and above, and skips channels the host cannot serve. Problems of the plan itself are not repeated here - they belong to planAlertActions.
drawingConditionKind-
evaluateDrawingCondition-
formulaTrigger-
validateAlertGroupProblems list; an empty list means the group may be evaluated.
evaluateAlertGroupAND: every condition true. OR: at least one true. An empty condition list never triggers (validation reports it separately).
describeAlertGroupHuman title of the group: explicit title or the joined condition titles.
createAlertLine-
moveAlertLineDrag result: the price snaps to the step and never crosses below one step.
alertLineAtNearest enabled line within the tolerance, or null.
platformMetric-
toPlatformRules-
validateAlertRuleProblems do not throw (I-4): an empty list means the rule may be created.
describeConditionHuman description for the journal and messages (user-facing; locale-aware).
alertConditionTitleTitle of a condition in the requested locale ( follow-up): KZ has its own column; uz falls back to EN until its pack lands.
alertConditionMeta-
createAlertCondition-
buildAlertPanelBuilds panel rows: triggered rules first (newest first), then by severity, then by id, so the list is stable between frames.
filterAlertRowsFilters rows for the panel search box; an empty filter returns the input.
matchCandlePatternAt-
matchCandlePatternMatches the pattern at the last bar of the window.
renderAlertMessageSubstitutes the known placeholders; unknown ones stay untouched.
computeRetryDelayDelay before the given attempt (1-based) or null when there is no retry: invalid attempt/policy, attempts exhausted or a non-retryable case handled by the caller. The jitter is deterministic for the same (attempt, seed).
isRetryablenetwork and throttling are retried; business rejections are not.
crossedUpStrict edge up: previous at or below the level, current strictly above.
crossedDownStrict edge down: previous at or above the level, current strictly below.
priceCrossed-
priceThreshold-
rangeExitTickFirst tick leaving the range; a tick on the border is still inside.
rangeExitCloseClose-based confirmation: the closed bar must end beyond a border.
timelinePriority-
alertTimelineEntryTimeline entry of an engine event (alert marker + journal link).
autoFibonacciLevels of the last impulse, lowest price first. Both ends of the impulse are covered (0 and 1), the interior ratios sit between them, so a host can read the retracement without any further maths.
basketMetricsMetrics of a basket: the count and the total weight are always there, the average and the sum only when the host can produce them. A member with a non-positive or non-finite weight drops out of the average but stays in the count, because it is still selected.
basketSeriesWeighted composite of the selected series (TAB-I3): the result is aligned by time, and a time missing from one member simply does not contribute there. The weights are normalised, so a basket of two and a basket of ten are drawn on the same scale.
cursorBucketBucket under a cursor (TAB-I8): the day by default, the week on request. The bucket of a cursor outside every row is still a bucket, and an empty bucket is a legitimate answer - «this day has no trades» is information, not an error.
timeFilterFromCursorRows inside the bucket of the cursor. A row without a parseable time is kept out of the filter rather than silently kept in: the reader asked for one day.
comparisonTable-
sortComparisonRowsSorts table rows by a column; ties keep the label order for determinism.
searchDivergencesDivergences between price and a second series. Aligned by index: the host is responsible for handing both series on the same bar grid, which is the same contract the delta divergences use. Pairs are sorted by strength, strongest first, and cut to maxPairs.
paintDivergencesTwo segments per pair - one on the price side, one on the indicator side - and a short label of the kind. Nothing is drawn for an empty list, so a host can call the painter unconditionally.
parseIsoDateParses YYYY-MM-DD; null on any other shape or an impossible month or day.
isoDateFormats a date, clamping the day to the length of the month.
addMonthsShifts an ISO date by whole months; the day clamps to the end of the target month.
isoDayNumberSerial day number of an ISO date (UTC); null on a bad date.
yearFractionYear fraction between two ISO dates under ACT/365 or 30/360; NaN on a bad date. 30/360 counts whole months as thirty days, which is the convention an accrual period of a swap is usually quoted under.
scheduleBackwardDates stepped backwards from an end date (a coupon or a swap schedule is built from its final date). Returns ascending dates, an empty list on a bad input.
scheduleForwardDates stepped forwards from a start date, the first of them the start itself. This is the shape of a payment schedule: count periods means count + 1 dates.
instrumentStats-
buildLeaderboard-
reconcileCompares two books. A pair the host cannot express as two finite numbers is reported as broken with a NaN difference: silence about a missing number would be the one answer a reconciliation must never give.
reconciliationSummaryTotals of a comparison: how many pairs agree, how much the rest differ by.
reasonWaterfallReasons of the breaks, summed in the order of their size: the waterfall answers "what caused the difference", which a list of rows cannot.
asOfVersionVersion of a book at a date: the last row of every key that is not newer than the date. A key that only has newer rows is absent, which is what "as of" means.
asOfGapGap between two versions: what changed, what appeared and what disappeared. The comparison uses the host's own equality, so a row object that carries a stale flag moving is a change.
reconciliationToTextReport of a comparison as text: the host hands it to the clipboard, a mail or a file, so the reconciliation leaves the screen in a form a reviewer can sign off.
relativeStrength-
rsPanelRowsOne row per instrument, strongest first. A series that cannot be aligned with the benchmark keeps its place with null values rather than disappearing: a missing instrument is information too.
rsPanelSummaryLeader and laggard of a ranked list.
rsRowToneTone of a row for the panel: above the benchmark, below it, or unknown.
sessionLevelsLevels of the session before the newest bar, for every requested period. A period with fewer than two buckets (or without a full previous bucket) is skipped - a level of a partial session would compare different things.
sessionLevelsMultiLevels of several periods at once: each period is measured on its own step, the newest bar decides which period is "current".
levelBreakoutBreakout state of a level against the last price; touching is not a break.
levelBrokenWhether the level has been broken, which depends on what the level means: a previous high is broken upwards (resistance gave way), a previous low downwards (support gave way), and the previous close is broken either way - it has no side of its own. A price that merely sits below the previous high has not broken it, otherwise every level would be highlighted all the time.
swingPointsPivots of the series, alternating between highs and lows: two pivots of the same kind in a row collapse to the more extreme one, so an impulse always has a high and a low end.
lastImpulseLast pair of swings whose span reaches the ATR share. Pairs are walked from the newest one backwards, so a tiny final wobble does not hide the impulse the market is actually trading.
flattenTreeFlattens the tree into the lines a reader sees: a row is followed by its children when it is expanded, and by their children in turn. Keys are visited once, so a cycle in a malformed tree cannot hang the host.
groupTotalsTotals of a group (TAB-A2): the nominal of a book is a sum, the average yield is weighted by nominal, and the DV01 is a sum. The model does not guess - a column without an aggregate simply shows nothing in a group line.
sumAggregateSum that ignores non-finite members and keeps an all-empty group empty.
weightedAverageAggregateWeighted average: weight is usually the nominal, the price or the quantity.
countAggregateCount of non-empty values of a column.
tableToText-
serializeTableViewSerialises a view with a stable key order: the same view always produces the same text, which is what makes a link comparable and a diff readable.
parseTableViewReads a saved view; null on a broken payload, on a foreign kind or on a version the build does not know. Unknown fields are dropped rather than carried around.
applyTableViewColumnsApplies the column order of a view to the columns a board has today. The order of the view wins for the columns it names, a column the board no longer has is dropped and a new column is appended in its own order - so an old view never hides data.
readFigureValuesSamples of a figure for one row, or null when there is nothing to draw. Non-finite numbers are dropped (a gap in the data is not a zero), an empty series and a non-finite scalar both mean "nothing to draw", and a structured payload is passed through when it has at least one sample.
formatTableCellCell formatter of the model: percent values arrive as decimal fractions, bp values as basis points, money as an amount in column.currency, tenor as months. Without a locale the model stays deterministic: grouping is a plain thousands separator, the currency code is printed as given.
sortTableRowsStable sort by one or more columns: null values always land last regardless of the direction, equal keys keep the input order. Keys are applied in order, so [{id, 'desc'}, {tenor, 'asc'}] sorts by yield and breaks ties by tenor.
tableHistogramDistribution of a column: the host draws it in the header and brushes it for a range filter. null returns for an empty, single-valued or non-finite column, so the header simply shows no histogram.
filterTableRowsCase-insensitive substring filter across the formatted cells of the row.
tableExtentMin/max of a numeric column over the rows; null when nothing is finite.
heatToneThirds of the extent: top third is up, bottom third is down.
nextTableSortHeader click cycle: a new key starts ascending, the same key flips.
parseInstrument-
parseBarsPage-
parseBar-
parseTick-
parseMark-
adjustBarsReturns adjusted copies of the bars for the chosen mode. Bars at or after an action keep their values; earlier bars receive every action that lies after them (splits multiplicatively, dividends additively, clamped at zero).
resampleRebuilds bars into a bigger timeframe without re-reading history. open = first, close = last, high/low = extremes, volume/trades = sums.
seriesCacheKey-
loadComparisonFromFeedLoads bars for up to ten instruments in parallel and builds the comparison table. The benchmark option is passed through unchanged; bars come back so the host can draw the series without a second round trip.
backoffDelayExponential backoff with jitter: 1 s, 2 s, 4 s... capped at 30 s, each delay varies by +-20% so reconnects do not synchronise ( §6).
datafeedErrorKindForStatus-
toDatafeedErrorMaps HTTP statuses and arbitrary failures into one typed error.
sanitizeMessageStrips credentials and truncates: safe for UI and telemetry.
buildEventLane-
clusterEventMarkersGroups markers whose centres sit closer than minGapPx: a report season lands dozens of events on a few bars and the lane must show a number instead of a smear. Lone markers keep count 1; the order of the lane is preserved.
csvCellQuotes a CSV cell when it contains the separator, a quote or a newline.
barsToCsvSerializes bars to CSV with the fixed column order time,open,high,low,close,volume[,trades]. The output ends with a newline.
barsCsvFilenameFile name of the export, safe for every platform: AAPL-10m-bars.csv.
resolveLoadStateEmpty data is not an error: a closed trading day must show the empty state while a failed source shows the error state (invariant I-4 of ).
heikinAshiHeikin-Ashi transformation (AUD-006, §5): display bars computed from the source bars. The same honesty policy as the non-standard types applies: time, volume and the closed flag survive, so cursors, alerts, tooltips and profiles keep working off the original bar identity.
mapLegacyBarDefault mapper of the typical {time, open, high, low, close, volume} bar.
legacyDatafeedAdapter-
renkoBarsRenko bricks (type 10): fixed-size bricks driven by the close.
kagiBarsKagi segments (type 11): a segment extends with the close until the price retreats by the reversal amount; the closed segment is emitted as one bar.
pointAndFigureBarsPoint & Figure columns (type 12): X columns extend on highs, O columns on lows; a counter move of reversal boxes starts a new column. Each column is emitted as one bar (X: close above open, O: close below open).
rangeBarsRange bars (type 13): a bar completes as soon as its high-low span reaches the range; intrabar order follows the bar direction heuristic (the extreme matching the bar direction is touched first).
lineBreakBarsLine break (type 14): a new line appears when the close breaks the extreme of the last N lines (default 3); the line keeps the previous close as its open, so the chart reads as a staircase of closes.
parseOrderbookParses a transport payload (direct snapshot or { data:... } envelope). Bids/asks must both be present; malformed payloads raise a DatafeedError so hosts can surface the failure instead of rendering an empty ladder.
packBarsPacks bars into typed arrays; output is transferable (no closures).
visibleWindowInclusive-exclusive index window of the visible bars with a margin, clamped to the data. Empty data gives an empty window.
barAtReads one bar back from a pack (used by tooltips and hit tests).
averageRangeMean of high - low over the last period finite bars; 0 without data.
roundPriceStepSnaps a value to 1/2/2.5/5/10 of its own order of magnitude.
pAndFAutoParametersBox and reversal for a series: the host ATR wins, the average range stands in for it, and both a zero volatility and an empty history still give a usable box instead of throwing.
pointAndFigureAutoPoint-and-figure bars with the auto parameters applied.
baseTimeframeForSmallest timeframe that is cheap to load and honest to aggregate from ( §3). A base is never bigger than the requested timeframe and never below one second.
detectGapsDetailedReports holes between bars without inventing anything: only buckets that belong to a session are counted, so weekends and breaks produce no gaps. Input bars are expected in ascending time order (feed contract).
detectGapsAggregated report of the holes; delegates to detectGapsDetailed so both surfaces always agree.
tradeDayStartStart of the trading day that contains the moment: the day resets at the first session open, so night hours still belong to the previous trade day (daily aggregates and the day cache key both use this value).
parseStompFrames-
encodeStompFrame-
openStompSubscriptionOpens one STOMP subscription with reconnects. CONNECT carries the accept version plus the host headers (JWT on reconnect included); SUBSCRIBE goes out with the configurable destination. A socket close schedules the next attempt with exponential backoff and jitter; dispose stops everything.
eligibleAlertsReads the alert condition from the object meta. A missing, foreign or unsupported condition yields an empty list instead of an exception.
evaluateObjectAlertsEvaluates the object alert from from (default 0) up to the end of the bars. Edge triggered: one event per crossing, repeated bars stay silent.
moveDrawingA copy of the drawing with every point shifted by the delta (pure helper for hosts that keep drawings outside the history, e.g. live drag previews and the commit of a move). The id, style and flags are preserved.
defineDrawingToolValidates a descriptor and returns a normalized copy; junk throws RangeError.
withCustomToolsAdapters that run custom tools through the standard pipelines. Built-in ids fall through to the core implementations untouched.
fillPatternRegistry lookup; an unknown id falls back to the flat fill, never throws.
fillShapeBoundsBounding box of a shape; null when the shape cannot be shown.
fillPatternGeometryGeometry of a pattern over integer bounds, memoised by pattern id and the rounded box: one tile set per pattern, colour and frame (the colour travels through paintFillPattern, the geometry does not depend on it).
resetFillPatternCacheTest hook: clears the tile-set memo.
paintFillPatternPaints one pattern fill of one shape: clips to the shape and issues the tile geometry of the pattern. Degradations: a context without clipping or without arc (dots) paints the flat alpha fill; none paints nothing; invalid geometry paints nothing. Returns the issued primitive count and whether the fallback was used, so a caller can keep an honest counter.
measureSummaryDelta price/percent/bars/time of a measuring tool (values may be NaN).
screenPointsScreen anchors of a drawing for custom tool builders; null when unplaceable.
buildGeometryTurns a drawing into renderer and hit test primitives. Hidden objects and objects without a place on screen yield an empty list.
primitiveBox-
primitiveDistanceDistance from a point to a primitive; Infinity when clearly outside.
hitTestAllAll hits within the tolerance, best first (markers, then top layers).
hitTest-
selectByBoxUnique drawing ids whose bounding box intersects the selection frame.
buildJournalRows of the journal in the drawing order of the store (z, then insertion). The list is derived: nothing is copied into the caller state.
focusViewportFrame that contains every visible primitive of the given drawings with a margin of at least 16 px; null when nothing can be shown.
groupCommandTurns a journal group action into the regular atomic command.
styleDrawingsOfToolCommand of "apply to all of this type": the style patch goes to every drawing of one tool id, other types are never touched. Null when the type has no drawings, so a host can skip the journal step.
collectCandidatesCandlestick fields of one bar plus the object anchors passed by the host.
applyMagnet-
atTimePrice-
atBarPrice-
atPrice-
atTime-
defaultDrawingStyle-
normalizeStyleNormalizes any payload into a full style; unknown fields are ignored.
validateDrawingTolerant validator: damaged payloads turn into issues, never into throws.
createDrawingProgrammer-facing factory: invalid anchors are a contract bug, not data.
addMeasurePointAdds a point; the caller is told when the set is full instead of losing one.
removeMeasurePoint-
clearMeasurePoints-
measureSpansDifferences of every neighbouring pair, in the order the points were added.
spreadOfDifference between two chosen points: the "level spread" of a terminal ruler.
drawingGroupsBuilds the palette tree from the catalogue in its source order: the panel cannot drift from DRAWING_TOOLS, and a tool without metadata is skipped here but reported by paletteMissingTools (the completeness test fails).
drawingPaletteToolPalette row of one catalogue tool, or null for an unknown id.
paletteMissingToolsCatalogue tools without palette metadata; empty list is the norm.
paletteUnknownToolsMetadata entries that no longer match the catalogue; empty list is the norm.
paletteHotkeyConflictsDuplicate hotkeys inside the palette; empty list is the norm.
paletteToolByHotkeyPalette row of a hotkey combo, case-insensitive (T, Shift+R, Alt+1).
paletteSearchPalette rows matching a search query (title, tool id or catalogue code, case-insensitive); an empty query returns the whole tree in render order, and an unmatched query returns an empty list - the panel never invents a row.
palettePickToolPicks a tool (null exits the mode); a pick moves the tool to the head of recent.
paletteToggleFavoriteAdds or removes a favorite; unknown ids are ignored.
paletteSetLockedSets the lock flag (the host store owns the effect of the lock).
paletteSetHiddenSets the "hide markup" flag; the transition never removes anything, the drawings stay in the store and the host only skips their painting.
paletteStateJsonSnapshot text of the toolbar state (field order stays stable for diffs).
parsePaletteStateTolerant reader of paletteStateJson: junk, unknown ids and extra fields are ignored.
buildLayerOpsBuilds the draw ops of the layer. Drawings are consumed in the given order (the store lists them by z), so the result is deterministic for equal input.
collectDirtyBoxesDirty boxes between two geometry states of an edit: every changed, added or removed primitive contributes its old and new box (deduplicated).
barIndexAtTimeLast index whose bar opens at or before time; null when history is empty.
resolveAnchor-
resolveDrawing-
serializeDrawings-
parseDrawings-
serializeTemplate-
parseTemplate-
encodeSharePayload-
decodeSharePayload-
styleTemplateBuilds a template with the style normalised through the model rules.
loadStarterStyleTemplatesLoads the starter sets idempotently (a second call changes nothing).
styleLibraryJsonVersioned JSON envelope with a stable field order (human diffs stay small).
importStyleLibraryTolerant reader of styleLibraryJson: junk, broken rows and unknown fields are ignored, an unknown fill pattern falls back through the style rules, the version field never throws. Returns the number of stored templates.
templatePaletteCommands-
templateIdFromCommandTemplate id of a palette command; null for every other command.
drawingTool-
drawingForBuilds a drawing against the tool contract (anchors, style, meta).
togglePinnedTooltipToggles the pin. Same object -> null (unpin); another object -> replace; an empty (blank) id keeps the current state untouched.
isTooltipPinnedTrue when the tooltip of exactly this object is pinned.
clearPinnedTooltipEscape path: clears the pin and always returns null. Named so hosts do not re-implement the rule; a missing pin stays a no-op.
syncPinnedTooltipDrops the pin when its object no longer exists (removed, filtered out). Hosts call it once per frame with the current drawing ids.
buildDrawingTreeGroups drawings by catalogue category; empty categories are dropped.
filterDrawingTreeFilters the tree by a search query (id, tool id, title or object text); groups that lose all rows are removed, so the panel never shows empty sections.
drawingTreeStatsPanel counters shown in the tree header: total, hidden and locked.
eventMarkers-
filterEvents-
eventHitTestNearest marker under the pointer, or null. The caller maps a marker index to pixels (the time scale is host-owned).
contextMenuItems-
resolveFollowRight edge of the series and how far the view is from it. visibleFrom is only returned when the view must move, so a host can call this on every data update without fighting the user.
windowAtLastBarThe window that puts the newest bar on the right edge.
panReleasedFollowA pan is never silent about following: moving the view by hand releases the mode, and only an explicit resume (a click on the lag chip) brings it back.
resumeFollowClick on the "lagging" chip: back to the last bar and follow again.
elasticOffsetCompressed shift of the elastic edge: the further out, the less it moves.
resolveElasticPanClamp a pan to the history and answer with the elastic shift: the view keeps moving, but slower than the finger, and releaseElastic walks the remainder back to zero.
releaseElasticOne step of the spring return; the host repeats it per frame while it moves.
resolveGestureIntentShift zooms the price axis, Alt or the right button draws the marquee.
normalizeWheelDeltaNormalizes a wheel delta to pixels: DOM_DELTA_PIXEL (0) passes through, DOM_DELTA_LINE (1) counts 16 px per line, DOM_DELTA_PAGE (2) - 100 px.
longPressFires-
atRightEdgeTrue when the newest bars are in view, so the chart follows new data (invariant I-4). The right edge of the time scale keeps empty slots, the same offset the clamp uses internally.
applyWheel-
applyDragDrag right reveals earlier bars; drag left moves back to the newest ones.
applyResetViewDouble click / explicit view reset ( §6): back to the newest bars and auto scroll. The price autofit stays with the host: it calls priceScale.fitContent(bars, from, to) for the visible range afterwards.
applyKey-
applyGesture-
applyPriceScaleDragDragging the price scale: the span stretches or squeezes around the anchor edge (the bottom one by default), so the opposite edge follows the gesture.
applyVerticalZoomVertical zoom of the wheel (Shift+wheel): the span scales around the middle of the window; a negative delta (wheel up) shrinks the span - zoom in.
marqueeTooSmall-
applyMarqueeApplies the marquee as the new visible window; the selection is clamped to the plot area, a sub-threshold selection or a degenerate window returns null (the host keeps the view - a click, not a zoom).
resolveNavDirectionDirection of a key press, or null when the key is not a navigation key.
navOrderNavigable items in the order the user sees: by layer/tree order, then id.
nextObjectNext focus target. Walking wraps around, so Tab never dead-ends; first and last jump to the edges. An empty (or fully hidden) list keeps the caller where it is, and a stale currentId starts from the first item.
navAnnouncementAnnouncement text for the active object: what it is and where it sits.
proShortcutTitleTitle of a shortcut in the requested locale; uz falls back to EN.
proKeymapConflictsDuplicate combos inside the PRO layer; empty list is the norm.
proShortcut-
resolveProCommandResolves a key event into a PRO command. Letters match either case (b and B both mean buy - the host suppresses the keymap while a text field has focus), modified combos accept either case of the letter (Ctrl+K and Ctrl+k are the same key press on most layouts).
limitOrderFromScaleQuick limit order from a price-scale click: LIMIT is the only type the click can mean (the catalogue stays untouched), the price is snapped to the instrument digits and the draft passes the same validation as the ticket.
commandForKey-
minimapLayoutOne column per pixel at most: stride grows for long histories.
minimapColumnsPer-column price extent and first/last close for the density stroke.
minimapWindowPixel rectangle of the viewport window; indexes are clamped into the range.
minimapScrubDrag/click scrub: the window centre follows x; the result is a from index.
buildReadoutBuilds the readout of one bar; null for a missing or broken bar (the shell then hides the strip). The change base is options.previousClose, then the instrument.previousClose of the data contract, then the previous bar.
readoutChangedTrue when the two models differ in anything the strip shows.
barSnapTargetsTargets of one bar for a snap mode; a bar without numbers yields nothing.
priceSnapTargetsTargets of a list of prices: levels, lines, edges and round prices differ only by kind.
resolveSnapNearest target inside the pull radius, or null. off never snaps, a zero tolerance only accepts an exact hit, and the tie-break uses SNAP_PRIORITY before the order of the list.
nearestBarTargetsTargets of the bar nearest to a time, using the host clock of the series.
normalizeTooltipHoldNormalises a host value into a usable hold window in milliseconds. Absent, non-finite and negative values fall back to TOOLTIP_HOLD_MS; the result is capped at TOOLTIP_HOLD_MAX_MS. 0 is honoured as "hide immediately".
hoverHoldExpiredWhether a card that was left at leftAtMs may be released at nowMs. Timestamps are host clock readings; a clock that moved backwards keeps the card (never release on a negative elapsed value).
linkSelectionJoins the window to the group and delivers the current snapshot (selection and live drawings) to the late joiner. Returns an idempotent unsubscribe.
unlinkSelectionLeaves the group; works for both channels (one membership per window).
broadcastSelectionBroadcasts the selected object id to the other windows. Repeated identical broadcasts from one source are suppressed inside echoWindowMs (0 disables the guard). Returns the number of deliveries.
broadcastDrawingBroadcasts a drawing edit. Revisions order the edits: an upsert older than the stored revision is dropped, an equal upsert is a duplicate, a remove clears the entry (ties of remove beat an upsert) and also clears the shared selection when it pointed at the removed object.
selectionGroupSizeWindows currently in the group.
currentSelectionCurrent shared selection (snapshot for hosts and tests).
linkedDrawingRevisionStored revision of an object, or null when the group never saw it.
disposeLinkGroupDrops every member and the stored state of the group.
auctionPhaseAtPhase of the moment; weekends never hold an auction.
auctionBandsBands of the auction windows intersecting [from, to) - the shape the session bands of RenderInput already accept. Band times stay unclipped, so cues keep the real auction start; the renderer clips to the viewport.
auctionCuesCues for the host: one per band whose real start falls inside [from, to). Sound stays host-side: route cues into the delivery or a custom policy.
timeframeToMsDuration of a timeframe in milliseconds. Calendar timeframes (1M) return null: their length varies per month.
bucketStartStart of the bucket that contains the given time. Weeks start on Monday (UTC), months start on the first day of the month.
minutesInRangeLocal-minutes membership in a session range; exported for auction windows.
localMinutesLocal minutes since midnight of the exchange clock.
localWeekdayLocal weekday of the exchange clock (0 - Sunday).
sessionDayStartStart (UTC ms) of the local day containing the moment.
sessionPhaseAtRTH beats ETH beats CLOSED; weekends close everything.
isCalendarOpen-
sessionBreakMarkersMoments where the phase changes between consecutive samples - the breaks the chart draws as boundaries. The first sample never opens a break.
formatPriceDigitsPrice with the instrument precision. Non-finite input renders as a dash.
formatVolumeCompact volume: 12 400 -> 12,4K, 3 100 000 -> 3,1M.
formatCompactVolumeCompact volume for chart furniture (axis labels, volume tag, readout): 1.2K / 3.4M / 1.1B, plain digits below a thousand. Locale-neutral on purpose: the point separator is a dot and there is no grouping, so a narrow axis never grows a label that does not fit.
formatPercentSigned percentage, always with an explicit sign for growth.
formatTimeLabelAxis label for the given timeframe: intraday shows time, higher frames show dates.
formatDateTimeFull date and time for tooltips and journals.
usEasternOffsetMinutesUS Eastern offset for the moment: -240 during DST, -300 otherwise.
isUsEasternDstTrue when the moment falls in the US DST window (exposed for tests).
minutesOfDayMinutes from midnight, UTC.
isWeekend-
isInSessionTrue when the moment belongs to a trading session (no session spec means always open).
dayStartStart of the UTC day that contains the moment.
sessionMinutesBetweenTrading minutes inside the interval [from, to); weekends and breaks are excluded.
sessionGapMsMilliseconds inside the interval that belong to no session (weekend included).
nextSessionOpenFirst moment at or after time that belongs to a session. Scans forward day by day; a spec without ranges means the market is always open.
percentileLinear-interpolated percentile of unsorted finite values; null when none.
anomalyThresholdsThresholds of the large tail of a tape. Size and money are separate because a cheap instrument prints many shares and an expensive one prints few: the host filters by whichever it means.
filterTapeRowsApplies the filters together and keeps the incoming order of the tape.
bookWallEventsWalls over time: a level that appears with a dominant size, then either loses its size (pulled) or trades through it (absorbed). The difference matters to a trader - a pulled wall was never real.
auctionGridCells to a price-by-time matrix. Rows run from the highest price down (row 0 paints at the top), columns are the sorted time buckets, and a cell keeps the summed TPO of its price level. A non-positive step is derived from the price range, so a profile without a configured tick still paints.
buildBarProfileLadder of one bar from its prints; null when there is nothing to bucket.
nearestProfileLevelCentre price of the profile level nearest to a print ( follow-up "linking a large print to its footprint cell"): the tape and the ladder speak the same grid, so the clicked print maps onto the row to highlight. Null for an empty profile or a non-finite price.
runningVwapRunning VWAP line over bars on the typical price (h+l+c)/3, weighted by bar volume. window limits the average to the last N bars (session VWAP when the caller feeds one session); bars without volume change nothing.
cumulativeDeltaRunning sum of deltas. Rows with a non-finite time or price are skipped; a non-finite delta counts as zero. carry continues the sum across days (session boundary stitching is a host decision).
deltaExtremes-
deltaDivergencesClassic swing divergences: - bearish: a swing high prints a higher price than the previous swing high, while the cumulative delta prints a lower value; - bullish: a swing low prints a lower price than the previous swing low, while the cumulative delta prints a higher value. Swing points are deterministic local extremes with swing points on each side (strict on the left, non-strict on the right).
buildLadderMerges the two sides of the book into a classic price ladder (descending price), carrying cumulative depth per side. Missing prices on one side stay zero so the host can render a single grid.
tapeRowsNewest-first tape window with a buy/sell split. Ticks without a side are counted as unknown and do not skew the delta.
classifyLargePrintsClassifies tape prints: a print is large when it reaches any configured threshold. Without options nothing is marked (the report still carries the totals), so the host can flip the policy without rebuilding data.
aggregatePrintBucketsAggregates prints into price buckets of the shared profile grid - the bridge to footprint cells: pass the grid used by the bar profile and the rows land on the same bands.
tapeWindowsFolds the tape into count windows of windowMs, aligned to multiples of windowMs on the event clock, so two calls over the same tape agree. Ticks are sorted internally; non-finite times (and non-finite volumes, which count as zero) are handled without throwing. Windows without trades still appear, because the gap itself is the reading.
collectReplayHeatmapCollects the depth history of a replay up to replay.time: only snapshots whose time is already applied reach the heatmap, so the picture follows the cursor on seeks in both directions (the heatmap is rebuilt, not patched).
sliceHeatmapTime window slice of an intensity grid; intensities are re-normalised.
liquidityRibbonGridSamples to a one-row grid (row 0 sits at the top). A non-finite imbalance or a side with no depth leaves the cell out: the painter reads a non-finite value as "nothing to tint", so an empty book shows the price axis only.
decimateRangeCollapses [from..to] into at most columns buckets: open - first bar, close - last bar, high/low - extremes, volume - sum. Column boundaries are even, so the widest column differs from the narrowest by one bar at most.
decimateBarsWhole packed history decimated to columns.
tileRangesEven tile plan over a bar count; the last tile takes the remainder.
visibleTilesTiles intersecting the visible range [from..to] (inclusive).
smaAbiLayout-
writeSmaBufferWrites the layout (header, input, zeroed output) into a buffer.
pilotSmaStreaming kernel: one pass with a rolling sum, NaN until the window is full. This is the shape the WASM module will implement - same order of additions, so parity is exact.
referenceSmaNaive reference: recomputes each window from scratch.
smaParityComparison of the two kernels. The default is exact equality (NaN positions must match too); decimal pipelines that legitimately drift in the last ulp pass an explicit epsilon.
validateWasmExportsProblems of a host-supplied module; empty list means the ABI is honoured.
registerPanePrimitiveRegisters a pane painter and returns its idempotent dispose.
clearPanePrimitivesTest and host hook: drops every registration.
panePrimitiveNames-
hasPanePrimitives-
paintPanePrimitivesPaints the registered primitives of one phase and returns how many of them succeeded. Empty viewports (visibleFrom >= visibleTo) and throwing painters are skipped; the other primitives still paint.
windowBarsBars of the window, inclusive on both ends; without a window - all bars.
sessionProfile-
compositeProfileComposite of several session windows: one profile over the concatenation.
compareProfiles-
resolveTick-
buildProfileGridGrid of levels covering [min..max] with a tick-aligned step.
gridBand-
gridIndexBand index of a price, clamped into the grid.
gridMid-
resolveValueAreaValue area percentage, clamped to 50..95 (canon 78).
updateProfileBar-
profileLevels-
buildWindowProfileProfile of an explicit window of bars; null when the window is empty or broken.
valueAreaHistoryOne row per session profile, oldest first, cut to the history limit.
compositeSessionProfileComposite of the sessions plus their value area history. sessions are bar arrays in time order, the same shape compositeProfile takes; the session time is the first bar of each session.
sessionSlicesSplits bars into local trading days (bars keep their order).
sessionProfiles-
sessionCompositeProfileComposite profile over the last sessions session entries (all without the option): the existing window composite builds one profile over the concatenated bars, so the value area covers the union of the ranges.
sessionSeparatorsTimes where the local session day changes; the first bar never separates.
tpoLetterLetter of the bar by its index in the window: A..Z, a..z, then the cycle.
buildTpoProfile-
buildVolumeProfile-
adaptiveDetailModeMode for a bar density. A density that cannot be trusted (zero, negative, NaN) keeps the candles: a missing value must not hide information. An infinite density is the densest case, so it reads as a line.
quantilesQuartile summary of a sample; null for fewer than two finite values (a single point has no spread to describe).
paintBoxPlotPaints boxes left-to-right; returns the number of boxes drawn.
bulletScaleUpper bound of the scale: the largest finite band, value or target.
bulletRangesSorted, finite band boundaries; an empty input falls back to the scale.
paintBulletPaints the bands top-down, then the value marker (solid) and the target tick (dashed). Returns the number of painted primitives.
paintFanChartPaints the bands (widest first) and the median on top. Returns the number of painted series (bands plus the median when it has a segment).
frontierCurveUpper convex hull of the candidates, sorted by risk: at every risk level only the highest return survives, and a candidate is dropped when it sits on or below the segment of its two kept neighbours. The chain is concave - every extra unit of risk buys fewer points of return than the previous one - which is the classic efficient frontier. Returns [] below two usable points.
paintEfficientFrontierDraws the frontier curve, the candidate dots and the current portfolio. The caller owns the axis and the domains; style.color tints the curve and the current marker.
buildAnalyticReadoutOne readout row per series at the cursor x; null when no series has samples. The pixels are plot-local (add the plot offset in the host).
pickAnalyticPointNearest sample across series inside the tolerance; ties fall to the lower pixel distance and then to the earlier series. null when everything is farther than tolerancePx (a click on empty space).
clampAnalyticWindowOrders the window, clamps it inside full and enforces the minimum span.
zoomAnalyticWindowZooms about the anchor under the cursor: factor > 1 zooms in, share (0..1) is the anchor position inside the current window.
panAnalyticWindowPans by a share of the current span; the full domain clamps the result.
paintPaceOfTape-
paintAnalyticCurveCurve: a single polyline over the accepted samples. Returns the number of plotted points; fewer than two accepted samples paint nothing.
paintAnalyticBandBand: a filled ribbon between an upper and a lower boundary (zones around a payoff, confidence envelopes). Returns the number of paired samples; fewer than two painted pairs draw nothing.
paintAnalyticPointsPoints: a dot per accepted sample. Returns the number of dots.
paintAnalyticMarkersMarkers: dots with a text label to the right. The label is skipped when it would not fit into the plot (the dot stays). Returns the number of dots.
paintAnalyticBarsBars: vertical columns from the baseline to the sample, up/down colored by the sign against the baseline. Returns the number of bars (zero-height bars are skipped).
nearestAnalyticPointNearest sample to a domain value; the distance is measured in pixels through the axis. The samples must be sorted by x (the contract of every provider); ties fall to the lower index.
withAlpha#rgb/#rrggbb theme color to rgba with the given alpha (clamped to 0..1). Non-hex forms (host tokens like var(...)) pass through unchanged.
yOfY value to pixel; a flat domain maps every value to the vertical center.
waterfallSpansRunning bases of the bridge: start columns grow from zero, delta columns from the running total, total columns span the whole accumulated value. Non-finite steps are dropped, so the sum of the returned spans always closes.
paintWaterfallPaints the bridge columns; returns the number of columns drawn.
selectAxisLabelsDrops every candidate that would touch an already kept one. The first candidate wins its place, later ones yield - so a dense axis thins out from the left/top edge instead of piling up on the newest bars.
timeLabelStepBars between two time labels: wide enough for the measured text plus the gap, and never denser than MAX_TIME_LABELS labels per window.
priceLabelCountValue labels asked for from a pane height: tick count follows the height.
fitTextSizeFont size that fits text into maxWidth. null means the fitted text would be smaller than minSize and is not painted at all (a watermark must not become an unreadable smear in a small window).
valueAxisLabelPlacement-
volumeDepthShareVolume of the bar against the reference volume, clamped to 0..1. A non-positive or non-finite reference means "no scale available" and gives 0, so a missing average never brightens a body.
bodyDepthAlphaShade alpha of a depth share: linear between the two canonical stops.
paintBodyDepthPaints the inner shade of one body. A tall body takes two flat fills - a light shade over the whole body and a heavier foot; a short one takes a single fill, because the second fill is invisible there and the dense-history measurement charges for it. Returns false when there is nothing to paint (share zero, box degenerate), so callers can count real work.
vapRowsVAP rows of one bar: the cluster cells of that bar, largest level first through the cap, returned in price order. Cells of other bars, non-finite prices and non-positive volumes are skipped; rows are clipped to the body box, so a level outside the body never draws outside it.
paintVapInBodyPaints the rows from the left edge of the body: the width follows the share, so the profile of the bar reads at a glance. Returns the painted row count.
morphProgressProgress of a fold over elapsedMs, eased out: fast start, soft landing.
morphDurationMsDuration under the motion policy: zero when the host asked for reduced motion, so the fold is skipped entirely instead of being played silently.
morphBarsBars of the fold at progress. The result is next itself at a completed fold and an empty array without a next series; a bar whose previous value is unknown keeps its own values (no invented history).
rebaseToBaselineRebases one series to the baseline at its first finite point. That first point has to be non-zero: a series whose first value is zero has no base at all, and silently starting from a later point would compare different moments.
paintCompareOverlayPolyline per series plus the label of its last visible point. Every series is normalized to overlay.baseline (100 by default) on its first visible point, so the curves compare from the same moment whatever the host handed over. More than COMPARE_OVERLAY_LIMIT series are cut deterministically - the first ones win, the caller can report the cut. A series whose first visible value is zero or missing has no base to compare from and is skipped.
resolveCrosshairBar under the crosshair. The index sticks to the nearest bar and is clamped to the data (invariant I-1: the returned bar is the data itself, no rounding); a hidden crosshair or an empty series yields no bar.
stickyBarIndexInteger bar index under a pixel; -1 when there is no data.
tooltipRowsValue rows of the tooltip window. Order is stable for tests and hosts: time, open, high, low, close, volume, change in percent.
crosshairLabelsFlat labels for hosts that render a single line: O 815.40 and friends.
clampAxisLabelKeeps an axis label inside the axis area (invariant I-2).
tooltipHeadingHeading of the hover card: ticker, timeframe and exchange.
tooltipRowToneTone of one tooltip row: the close and the change follow the bar direction.
tooltipBoxCard next to the crosshair: it sits on the wider side of the cursor and flips to the other one when the plot runs out, while the caret keeps aiming at the hovered bar. Everything is clamped into the plot, so the card is never painted over the price axis or out of the frame.
barUpdateFlashLast-bar update highlight over progress of DATA_FLASH_MS: quadratic fade from BAR_FLASH_PEAK to zero; outside 0..1 - zero.
alertFlashAlert row flash over progress: same decay, louder peak and its own tone.
cellPulseLadder cell pulse: null when the value did not change (the cell must not blink), otherwise the tone of the change and its normalised intensity. Equal magnitudes relative to the larger side map to the same intensity.
motionAlphaApplies the surface motion policy to any envelope: zero when the host asked for reduced motion, the value itself otherwise.
buildDataWindowBuilds the row list of one bar. Sections without their source are omitted entirely; without ext only the bar group is returned. A repeated build of the same bar with the same ext and options objects is memoised.
dataWindowGroupsGroups of the model in display order; only non-empty groups are listed.
isDeltaBarModeTrue when the value is one of the delta bar modes.
deltaNormaliserNormaliser of the tone: the host value when it is usable, otherwise the mean |delta| of the window. Returns 0 when no delta is finite, which the tone functions read as "paint the plain palette colour".
deltaBackgroundToneTint behind the slot: only the sign of the delta decides the colour, the saturation stays constant so the OHLC of the bar is not disturbed.
deltaBarSplitLower/upper halves of a body box, split at its vertical middle.
paintDeltaBackgroundPaints the background tint of the whole slot. Returns false when there is nothing to paint, so the caller can count real work.
deltaTailToneTone of the lower half of the body: the delta tone of the bar. Returns null when the delta carries no information - the body then keeps its own direction colour.
lastBarRegionRegion affected by an update of the newest bar: from one bar slot left of the last bar to the right edge, full height - this covers the price axis labels as required by §7.2.
drawDotOne data dot on the canvas: round when the context implements arc, a square of the same size otherwise. Markers, lollipop dots and analytic points all come through here, so the degrade rule lives in one place and a minimal context (a mock, a canvas shim) still gets a dot.
createLaneItemsCache-
eventLaneItems-
eventBadgeColorFill of a badge by kind: alerts warn, the rest stay in the accent family.
eventLaneBadgeRectRect of one badge in canvas coordinates; painter and hit test share it.
eventLaneHitBadge under a canvas point, or null. The tolerance widens the target, so touch hosts can pass a bigger value without changing the layout.
paintEventLanePaints the lane in the axis strip right above the time chip. Returns the number of badges drawn; an empty lane paints nothing at all.
formatPlaceholderPlaceholder of a missing or broken value: / n/a.
formatPricePrice with the instrument precision; placeholder for a broken value.
formatPercentValuePercent with a sign; placeholder for a broken value.
formatBarTimeBar time in the timeframe granularity and the locale representation.
normalizeAngleAngle of the gradient normalised into 0..360; a non-finite value falls back.
normalizePhasePhase of the shimmer normalised into 0..1; a non-finite value means no shift.
gradientEndpointsEnd points of the gradient across a box at the given angle, in radians from the centre; the axis always spans the box, so no corner stays unpainted.
applyGradientPaints nothing but prepares ctx.fillStyle with the gradient of the box. Returns false when the canvas cannot paint gradients.
gridDashDash pattern of the grid lines; dotted keeps a dense plot quiet.
periodDividersIndexes of the first bar of every new period inside [from, to): the painter draws a divider there. Gaps in the history (weekends, halts) never open a period on their own, because the scan compares neighbouring bars.
bookGrid-
candleHeatmapGridCandle screener: instruments by rows, periods by columns, cell value is the period change in percent. Missing pairs stay absent (painted as nothing).
paintAuctionHeatmap-
heatmapAlphaQuantised withAlpha: 65 alpha steps, bounded cache, cleared when flooded.
heatmapColorColour of one cell. intensity is 0..1 for the flat tones and -1..1 for diverging, where the sign picks the side and the magnitude the alpha.
heatmapPaletteResolves the tone palette of a grid. resolveLook walks the whole look pack, so a per-cell call would dominate the frame - painters resolve once and then use heatmapToneColor for every cell.
heatmapToneColorColour of one cell for a palette that was already resolved.
heatmapPlotRectPlot rectangle of a heatmap of the given size. Overlay layers (a POC line, a value-area border) recompute a row position through it instead of repeating the padding constants.
paintHeatmapGridPaints the grid and returns the number of filled cells. A grid with no rows or no columns paints the "no data" state instead of throwing.
paintLiquidityRibbon-
leftFadeShareShare of the plot covered by the fade; false/absent means no fade.
paintLeftFadeTrue when the fade painted; false when the option or the backend refuses.
legendToggleBoxBox of the collapse chevron: it sits under the ticker heading, on the left, like a panel toggle. The position is deterministic (no measurement), so the host hit-tests the same rectangle it sees.
legendChevronPointsChevron triangle: the apex points up when the row is open, down when not.
legendTextOne compact, locale-formatted OHLCV row; pure and testable.
legendTitleSegments-
legendSegmentsSegments of the compact row (P5). plain returns one run in the direction colour (legacy look); fields returns label/value pairs so the close and the change carry the direction colour while the rest stay neutral.
paintLegendLayerPaints the legend row and returns true when something was drawn. The row refuses narrow panes and empty bars; plain mirrors the series direction (up when close is not below open), fields tones every field separately.
paintSessionLevelsDashed levels with their tags; the tag tone changes when the price breaks one.
paintAutoFibImpulse line plus the retracement levels of the automatic Fibonacci.
lookFontFamilyFont stack of a look: a LOOK_FONTS name, a literal stack or the theme one.
resolveLookResolves the look against the theme. Absent input always yields the classic / presentation, so the option is strictly additive.
lookLineTailTail of a body under lineGradient: the theme tail, or a share-scaled base.
paintChartGradientPaints the chart background gradient of the frame. Returns false when the canvas cannot paint gradients, so the caller keeps the flat theme fill.
lookDirectionColorGrowth or fall colour of a bar under the resolved look (I-1: theme or look).
lookTailColorGradient tail of a bar under the resolved look.
paintBodyGradientVertical body shade from the bright top to the soft tail. Returns false when the canvas has no gradients, so the caller keeps the flat fill.
paintAuroraDiagonal accent glow of the aurora backdrop: a soft band from the top-right corner, blended over the flat or gradient fill. Returns false when the canvas cannot paint gradients, so the caller keeps whatever it painted.
paintStrokeGradientHorizontal taper of a stroke: full colour at fromX, a faint tail at toX. Returns false when unsupported, so the caller keeps the flat stroke.
measureDeltaOutcome of the ruler: bars, price delta, percent, span and direction.
measureDurationSpan of the ruler in one unit: seconds, minutes, hours or days.
measureTagTextOutcome text; fits false drops the percent part (narrow axes).
measureChromeVertical guides of the ruler, clamped into the plot area.
paintMeasurePaints the ruler and returns the number of guides drawn (two when the anchors land inside the plot, one when only one does). A ruler without finite prices still paints the verticals and the span chip.
miniExtentNormalises a sample to its finite extent; null when nothing is drawable.
miniRatioMaps a value into 0..1 inside the extent; NaN for a flat or empty range.
paintSparklinePolyline of a sample: the trend of a value across its window.
paintDeltaBarSigned bar from the centre: direction and size of a change.
paintInlineBarBar of a value against the column maximum, over a quiet track.
paintMicroBarsSmall column series; columns below the first value take the down colour.
paintHeatStripRow of heat cells (months, buckets) toned by value.
paintMiniStackStacked shares of one group: what the row is made of.
paintScaleMarkMarker on a labelled scale: rating, tenor, percentile.
paintQualityStripCoverage strip: one segment per field, height by fill ratio, stale segments take the warning colour. Answers "can I trust this row".
paintTimelineStripEvents of a row on one line: position in 0..1, weight sets the dot radius, kind picks the tone (accent, up, warn).
paintMiniDistributionHistogram of a column sample with the median tick; range shades the part the host filtered or brushed.
paintMiniGaugeUtilisation arc: how much of a limit the row consumed.
paintMiniWaterfallSteps of a bridge: how the pieces build the total.
paintMiniLadderBid and ask depth of the row: bars grow left and right from the middle.
paintRiskLadderRisk ladder of an order or a position: the entry line, the stop below it in the down tone and the target above it in the up tone. The two legs are drawn to scale, so the row shows the risk-to-reward ratio without a number.
paintStatusFunnelStage funnel: how many items reached each step of a workflow.
paintIvMatrixVolatility surface (TAB-C4): one cell per strike and expiry, tinted by the level, and the smile of every expiry drawn through the cheapest strike of that row - the shape a trader looks for before reading any number.
paintPayoffCurvePayoff of a strategy (TAB-C5): the curve against the underlying, the winning side filled up and the losing side down, with a mark where the curve crosses zero - the break-even of the host model.
paintGreekBarsGreeks of a position (TAB-C5): one signed bar per greek around the middle line, so a delta and a negative theta are told apart at a glance. A greek that is not a number is dropped: half a row of bars lies about the position.
paintTermCurveFutures term structure (TAB-F1): the curve of the contracts and the open interest under every point as a bar, because a flat curve with no interest is not a signal.
paintCorrelationHeatCorrelation heat of a book (TAB-F4; the name tells it apart from the risk kit painter paintCorrelationMatrix): diverging tint - one colour for moving together, another for moving apart - with the diagonal left empty, because a member is always correlated with itself and the cell says nothing.
paintScenarioConeScenario cone (TAB-F6): the band a shock spreads over the horizon, drawn as a filled envelope with the centre path on top, because the question is the width of the risk and not four numbers in a row. A band that is not centred on the starting value of the host stays visible: that value is marked on the left.
paintBalanceTimelineBalance timeline of an account (TAB-G3): money does not move between two settlements, so the line steps instead of sloping, the part below zero is tinted as a violation and the lowest point of the window carries a mark - the reader looks for the day the balance was thin.
paintCashflowLadderCash-flow calendar (TAB-G6): every period is a column - inflows above the line, outflows below - and the cumulative line runs over them, because the question is whether the account survives the month, not the size of one payment.
paintLimitBarUtilisation of a limit with its breach threshold (TAB-H3): the bar grows with the usage, the threshold is a mark on the track, and the part above it takes the warning colour - a limit breach is a fact of the row, not a caption.
paintAgreementScatterAgreement of two books (TAB-G5): one dot per compared pair, the expected value on one axis and the actual on the other, with the diagonal of perfect agreement and the outliers outside the tolerance band. A reader sees in one glance whether the breaks are noise around the line or a systematic shift.
paintMiniFigureDispatcher by id; the payload is the array or scalar the figure expects.
clampUnitClamp a progress value to the 0..1 range; NaN becomes 0.
lerpLinear interpolation between two numbers.
easeOutCubicCubic ease-out: fast start, soft landing (zoom steps, scrolls).
easeOutQuadQuadratic ease-out: gentler variant for short 80-120 ms transitions.
easeInOutQuadEase-in-out: symmetric mid acceleration (crossfades).
animatedBarSpacingBar spacing after elapsedMs of an animated zoom step (ease-out cubic).
markerAppear-
drawingGhostStyleFade-in of a placement or drag ghost: transparency 0 -> 0.5 with a dashed edge while the object stays uncommitted. Zero duration (reduced motion) returns the final ghost immediately.
drawingAppearStyleObject-level appear envelope: alpha 0 -> 1 and marker scale 0.6 -> 1 over 140 ms; zero duration returns the final style.
flashDecay-
crossfadeAlphaAlpha of the outgoing frame during a crossfade: 1 -> 0 (ease-in-out).
createZoomAnimation-
paintOrderbookChartPaints one order book chart variant and returns the number of painted primitives (levels, bars, cells, labels) - a diagnostic the tests assert on. An empty book paints the "no liquidity" state instead of an exception.
buildOrderbookViewBuilds the normalised view: buckets, caps every side to levels best rows and recomputes both cumulative curves from the best price outwards.
paintLineOverlaysPaints every overlay over the visible bar window and returns the number of points written into the visible plot. The dash pattern is reset after the pass so the following layers start from a clean state.
dimAlphaForSpotlight dim of the plot area: 5 percent dark, 3 percent light (item 2).
hoverColumnAlphaForHovered column tint: 6 percent on dark, 4 percent on light (item 7).
wickWidthOfWick width by zoom: two pixels above ten pixels per bar (item 4).
bodyRadiusOfBody corner radius by zoom: one pixel above ten pixels per bar (item 4).
pulseGlowAlphaPulse glow alpha of the last price tag: 0 -> 0.25, 0.5 -> 0.55 (item 1).
vignetteOuterAlphaVignette outer alpha: 16 percent on dark, 3 percent on light (item 9).
shade-
paintBackgroundGradientVertical background gradient: background at the top, shaded at the bottom.
paintVignetteRadial vignette over the whole canvas (item 9); false when unsupported.
paintAxisDotSolid axis dot used by the spotlight; falls back to a square (item 2).
lockGlyphPadlock of a locked tag: body below, shackle arc above (size 8 by default).
priceLineTagBoxTag of a price line on the price axis: the width covers the label plus the padlock, the vertical centre stays inside the frame (invariant I-2).
priceLineHitNearest line within the tolerance, or null; inactive lines stay reachable.
paintPriceLinesPaints the hairlines and their axis tags; returns the number of lines drawn.
readoutColumnsColumns of the line mode. Order is stable: heading, OHLC, volume, trades, change; the change column carries the tone of the movement.
readoutStripHeightHeight of the strip: zero when there is nothing to paint.
readoutDirtyRegionTrue when the strip has to repaint: model change or different legend rows.
truncateReadoutTextTruncates text with an ellipsis so it never overflows width.
paintReadoutPaints the strip inside its own clipped band. The heading column (symbol, timeframe, time) is dropped first when the width is tight, then the rest is ellipsized; a null model with no rows paints nothing.
attributionRowsRows of an attribution table. The share is the step value over the largest span of the bridge, so a negative step reads as a negative share; the cumulative column is the running level of waterfallSpans and therefore ends on the bridge total. A step with a non-finite value never reaches this table (the span builder drops it), and a bridge without usable steps is an empty table rather than an exception.
correlationGridLabels plus a square correlation matrix to a heatmap grid. The value is clamped to -1..1, a non-finite cell stays neutral (not tinted) and the diagonal is forced to 1 - a correlation matrix that disagrees with itself is a data error, not a figure. With an asymmetric input the upper triangle wins, because that is the triangle the labels read against.
paintCorrelationMatrixPaints the correlogram: the shared heatmap painter with the diverging tone.
monteCarloConeSimulates paths geometric random walks and returns the median path plus the nested confidence bands. steps below one, paths below one, a non-finite start or a non-positive volatility return an empty cone (the caller paints the no-data state); volatility = 0 collapses every band onto the drift path.
monteCarloJobSame simulation in flat typed arrays for a worker: the job is structured-clone safe and its buffers can be transferred instead of copied. The math is one implementation - monteCarloCone and monteCarloJob differ only in the shape they hand back, so a host may compute in a worker and validate in the main thread without divergence.
coneFromJobPoints the painter as before, rehydrated from a job result (once per result).
monteCarloJobTransferablesBuffers of a job, for postMessage(job, transferables): each buffer appears once, so a host never lists the same array twice (a duplicate transfer list is rejected by the structured clone algorithm).
paintMonteCarloConePaints the cone through the fan chart of the analytic family.
riskContributionsRelative risk contributions of the weights under the covariance matrix. The covariance is symmetrised first (a covariance matrix is symmetric by definition, and a host that feeds half of it should not change the answer), the weights are normalised to sum one, and a portfolio with zero variance has no decomposition at all - the function returns [] instead of dividing by zero. A non-finite weight or matrix entry drops the asset.
paintRiskDecompositionDraws the contributions as signed columns from zero: the tone follows the sign (a hedged asset contributes negatively) and the bar geometry comes from the analytic series family. Returns the number of painted columns.
visibleSliceInclusive-exclusive bar window with a one bar margin on both sides.
xOfCenter of the slot of the given bar index.
barWidthOfBody width of a candle/column: 70 percent of the slot, at least one pixel.
directionColorGrowth or fall color; the only source of these colors is the theme (I-1).
deltaToneBody colour of one candle: up/down by the sign, accent for a flat or non-finite delta. normaliser <= 0 means "no scale available" and paints the full palette colour.
registerSeriesTypeRegisters a custom series type; returns the unregister function (idempotent). Throws on an empty name, a missing paint, a built-in name or a duplicate.
customSeriesPainterPainter of a custom type; undefined for built-ins and unknown names.
customSeriesNamesNames of the registered custom types, in registration order.
heatmapBandPricesBand prices of a uniform grid, used by hosts that aggregate by price step.
columnCellsCells of one column from bar ranges, spreading the bar volume over its bands.
periodGhostBars of the period before the one the newest bar belongs to, together with the shift that aligns them with the current period. Returns null when the period step is unusable or when the history holds less than two periods - a ghost of a partial period would compare different things.
trendImpulseATR-normalised impulse of one bar: 0 without a usable ATR (or without a finite range) and 1 when the body already covers the whole true range.
trendToneBody colour under the trend tone: the direction colour of the bar, faded at a weak impulse and solid at a strong one. baseTREND_MIN_ALPHA.
paintGhostDashed contour of the ghost series plus its close line. Ghost bars outside the plot are skipped; the live series is painted after and stays on top.
createSparksOpens a particle state. The seed makes the model deterministic: the same seed and the same calls produce the same trajectories (tests and scenes).
spawnSparksSpawns up to count particles at the given screen point and returns how many were created (the budget may cut the burst short). Unknown points are refused, so hosts can pass unmeasured coordinates safely.
stepSparksAdvances the model by the frame delta (ms) and returns the alive count: particles drift with damping and gravity, burn out and leave the list.
clearSparksDrops every particle (a preset turned off before the burst burned out).
paintSparksPaints the particles into the plot area and returns the painted count. Particles outside the plot (plus a small margin) are skipped; the canvas is restored to full alpha afterwards. Degrades to tiny squares when the context has no arc (fake contexts and exotic hosts).
splinePointsSmoothed points of one run of finite points, in order. Fewer than two points come back as they are; the run itself is never reordered or deduplicated.
isChartStateKind-
chartStateText-
chartStateHint-
paintChartStatePaints the centred state message and returns true when anything was drawn. The title and the hint sit on one centre axis; the hint uses the muted tone.
blackOverlayBlack overlay with the given alpha (spotlight dim, hover tint, vignette).
whiteOverlayWhite overlay with the given alpha (new-bar flash, glow hilites).
resolveThemeByNamePalette by public name (`` §1). The lookup is case-insensitive and an unknown or missing name falls back to the dark base, so a foreign attribute or property value can never reach the renderer unchecked (AUD-010). The caller owns the host preference: prefersLight resolves the system alias only.
systemThemeResolves the system alias to the dark or light base palette.
resolveMotionPolicyMotion policy for prefers-reduced-motion ( §3). The flag comes from the host (matchMedia), so the core never reads the environment itself.
contrastRatioWCAG contrast ratio of two colors (1..21). Accepts #rgb, #rrggbb, rgb and rgba; an unparsable value yields NaN so callers can decide.
contrastFloorAlphaSmallest alpha at which a flat color still reads against background - the WCAG non-text threshold (3:1 by default), composited the way the canvas does it (c = a*fg + (1-a)*bg). Returns null for an unparsable color or a target below 1, so a caller keeps its own documented lower bound instead of losing the tint completely. Themes differ by an order of magnitude here: a tint that reads on the dark background disappears on the light one, which is why the floor is derived from the palette rather than fixed in the painter.
themeFromTokensBuilds a theme from shell tokens with fallback to a base theme. resolve is provided by the host (browser reads CSS variables), so the core stays free of DOM access.
paintVolumeLayer-
watermarkImageBoxPlacement of the mark: centred on the plot or tucked into the corner.
watermarkLines-
buildWebGL2BatchesBatches per series type; every batch carries its theme color.
parseColorRgbaConverts a theme color into normalized RGBA for GL uniforms. Accepts the same notations as the contrast helper: #rgb, #rrggbb, rgb, rgba. Contains color patterns, not color literals: parser.
clipTransform-
buildCandleGeometryCandle bodies and wicks split into growing and falling batches.
buildBarGeometryOHLC bars: high-low line plus opening and closing ticks.
buildPolylineGeometryThick polyline as one quad per segment.
buildStepGeometryStep-after polyline: horizontal to the next slot, then the vertical jump.
buildAreaFillGeometryArea fill: two triangles per segment down to the pane bottom.
closePointsClosing-price points of the visible window for line-like series.
createFlatProgramCompiles the single flat-color program used by all batches; returns null when the driver rejects the shaders (the factory then falls back to canvas2d).
resolveRenderModeWorker only when it is supported, not lite and a port is wired in.
encodeWorkerMessageJSON-safe envelope: the port may be a real worker (structured clone).
decodeWorkerMessage-
createWorkerRenderStarts the worker render: sends init, then a paint per frame with a monotonically growing sequence; acks coming back are counted, so the host can watch the queue depth. Main-thread mode returns null - the caller renders in place, the public API stays the same.
serializeMarketReplayRecordDeterministic JSON of the record: fixed key order, optional fields once.
parseMarketReplayRecordTolerant parser; the record is null when the payload cannot serve a replay (broken JSON, missing symbol or no valid ticks). Invalid ticks and empty snapshots are dropped with an issue, an oversized tape is truncated.
recordMarketSession-
niceTicksTick values on the 1-2-5 ladder inside [min, max]; empty for a flat domain.
formatAxisTickAxis label for a tick value; without a formatter the step picks the precision.
periodRangeInclusive-exclusive bar range of the preset relative to the anchor.
niceStepRounds a step to the nearest 1, 2 or 5 times a power of ten.
digitsOfStepDecimals a step needs; a step of 0 or a non-finite one asks for none.
priceTickOfTick of an instrument, from its explicit step or from its digits.
snapToTickSizeNearest price that is a multiple of the step; float noise is trimmed by digits.
tickAlignedTicksAxis values inside [from, to] that are multiples of the step. The distance between neighbours is itself a multiple of the step, so the grid stays on the instrument's price ladder instead of on a pretty-but-unreachable number.
chooseScaleModeMode the data asks for. Order of the questions matters and is part of the contract: a volume pane, then broken prices, then a wide range (log), then a known base (percentage), then a flat or narrow series (linear).
futureExtentSpace reserved to the right of the newest bar: the axis keeps advancing at the bar step, so the future is a real time range and not a decorative gap.
futureSlotsForWidthEmpty slots that fit the reserved share of the plot width.
classifyTickMarkGranularity of a time label from the timeframe: months and years for the long frames, day numbers for the daily ones, clock times below an hour and seconds for sub-minute frames.
applyTickMarkFormatterApplies the formatter with the default label as the fallback: null and empty strings hide the tick, exceptions return the default (frame stays alive).
cachedTickLabelFormatter with a per-formatter cache: one axis asks each tick once, repeated frames with the same formatter identity reuse the labels.
sessionGapsEmpty zones of a series: consecutive bars whose pause is longer than the threshold. Overlapping pauses merge, a single bar never makes a zone.
timeCompressionPiecewise mapping: everything left of a zone keeps its place, the zone itself shrinks to gapWidthPx, and everything right of it moves left by the removed width. Inside the zone the mapping stays proportional, so the function is continuous at both edges and invertible everywhere.
timeAxisRowsTwo rows of time labels: days on the primary row and months on the secondary one. Repeats are dropped (a month is written once), and the secondary row is empty when the plot is too narrow to read it - an unreadable row is worse than a missing one ( §4.0).
auctionAxisMarkersMarkers of the auctions and of the clearing windows on the time axis.
clearingMarkersClearing windows of the calendar: one marker per session boundary.
createLayer-
isSceneTypeNarrows a foreign attribute or query value to a scene type (AUD-010).
sceneBarsThe bar series a scene renders. Candles, bars and the profile scene render the original series; renko folds the closes into fixed-size bricks.
sceneProfileVolume profile summary of a window for the profile scene overlay; null for an empty series or a window the grid cannot resolve.
keyComboCanonical combo string, e.g. Shift+ArrowLeft.
resolveKeyboardAction-
keyboardConflictsCombo bound to more than one action (must stay empty).
chartAria-
clampTextScale-
fontSizeAtScale-
auditAccessibilityStructural audit; an empty list means no violations found.
fuzzyScoreFuzzy subsequence score with word-start and consecutive-run bonuses. Returns 0 when the query is not a subsequence of the title.
rankCommandsRanks commands for the palette query. Empty query keeps the original order (the host usually wants its most used commands first); ties are broken by the original index, so the result is deterministic.
buildComparisonDelta of B over A (B minus A); used by the compare chip and hosts.
defaultChartConfig-
parseChartConfigParses a JSON config defensively. Unknown versions, malformed panes and foreign values degrade to the default config with an issue each.
serializeChartConfigStable serialisation: two spaces, trailing newline, keys in a fixed order.
linkCrosshairJoins the chart to the group; returns the unsubscribe function (idempotent). An empty group id is a programming error and throws.
unlinkCrosshairLeaves the group the chart is in, if any.
broadcastCrosshairDelivers the cursor to every other chart of the group and returns the number of successful deliveries. The source chart never receives its own time; a throwing (disposed) chart is skipped without breaking the rest.
crosshairGroupSizeCharts currently linked to the group.
nearestBarIndexIndex of the bar nearest to time, or null for an empty series. Ties pick the earlier bar; hosts use it to map a cursor between timeframes.
diagnosticsSnapshot-
localeTextSubstitutes {name} placeholders; missing keys fall back to EN, then to the key itself.
formatNumber-
formatDate-
reservePdfSignatureAppends the reserved signature object as an incremental update (new object, single-entry xref, trailer with /Prev). Returns null when the source is not a document of our builder (no trailer, startxref or /Root).
pdfSignatureDigestInputBytes to hash: everything except the /Contents hex field.
signPdfSignatureWrites the signature into the reserved field. sign receives the digest input and returns the raw signature bytes; the platform key and the hash algorithm live with the injector (WebCrypto, HSM, audit service).
readPdfSignatureFinds and decodes the detached signature of a document; null when absent.
verifyPdfSignatureChecks the detached signature with an injected checker; false when the document has no signature or the checker rejects it.
base64ToBytesManual base64 decoder: the core never touches environment globals.
jpegFromDataUrl-
chartPdfFilename-
buildChartPdfBuilds the PDF bytes; null when the data URL is not a JPEG or the size is not positive. Page size keeps the snapshot aspect at 96 dpi.
pdfToLatin1Latin-1 view of the bytes for text assertions and logging.
buildApiRegistryParses export { a, type B } from './group/file.js' blocks of the index source and derives the registry entries. export * is not supported by the public surface - the test fails loudly if it appears.
registryCoverageBoth-direction coverage check between a registry and expected names.
registryStats-
createShortLinkService-
createMemoryShortLinkStoreDeterministic in-memory store: codes are <prefix><base36 counter>, so the same call sequence gives the same codes (tests, CI stands, SSR fixtures).
encodeShareStateEncodes the config into a paste-ready payload.
decodeShareStateDecodes a payload back into a parsed config; null only when the envelope itself is broken (foreign prefix or invalid base64url). Config issues are reported through the parser result as usual.
createMemoryShareStore-
encodeShareShortWraps the payload into a short link (uf1:<code>).
decodeShareShortReads a short link back; null for a foreign prefix, unknown or expired code.
createTableChartLinkCreates the link. The same reference published twice raises one event, because a pointer that stays on a row must not repaint the chart on every frame.
exposeVersionPublishes the version on the given scope (globalThis by default). A foreign non-empty value is never overwritten - several chart bundles may coexist on a host page.
runPaperStrategyRuns the strategy over the bars; the last bar always closes the position.
compareSeriesAligns up to ten series on the reference timestamps and normalises them (absolute, indexed to 100 or percent change). A missing bar carries the previous close forward; before the first bar the value is NaN ( §4).
alignByTimeClose of the last bar at or before each timestamp (carry forward).
formatStudyValueA value that is not computed yet shows as -, never as NaN ( §3).
buildLegendLegend and crosshair rows for the active studies at one bar (FR-IND-06): title with parameters, all output values of that bar, error text when the study failed. The same rows feed the value row and the crosshair tooltip.
createOutputBuffers-
studyBarAtReads a bar defensively: out-of-range gives undefined, never throws.
readOutputReads an output value: missing, out-of-range and non-finite give null.
numberParamNumber parameter with fallback; non-finite and wrong types fall back.
booleanParam-
stringParam-
validatePlugin-
installPluginInstalls a plugin atomically: either every study is registered or nothing is. A collision with an existing id refuses the whole plugin (no silent override).
validateDefinitionContract check with actionable problems; used by the registry and by tests.
validateStudyParamsRuntime parameters of a registered study (wave, ): a key the definition never declared is refused with the declared names, a value outside the declared range is refused with the range. Values are NOT coerced.
paramsHashStable parameter hash: key order does not matter, types do. Used as a part of the result cache key ( §2).
indicatorCacheKey-
defaultPoolSizePool size rule from §2.
createTemplateLibrary-
loadStarterTemplatesLoads the starter pack into a fresh library (idempotent per id).
fibonacciLevelsLevels for a swing from from to to (anchor prices, either direction). Non-finite anchors yield an empty list instead of NaN prices.
bracketEntryRequestEntry leg of the plan on the platform catalogue (the six types of trading-ms).
bracketDistancesAbsolute distance of a level from the entry, in ticks and percents.
targetFromRiskQuick targets of the risk ruler: the 1R / 2R multiple of the entry risk.
orderTypeSpec-
orderTypeLabelPanel label of the order type; KZ has its own column, uz falls back to EN.
validateOrderRequestProblems list; an empty list means the request may be sent (I-4).
confirmationDecision-
hitTestTradeLinesNearest trading line within tolerancePx of the pointer, else null.
snapToTickRounds a price to the instrument tick; a broken tick passes the price through.
clampTradePriceClamps a price into the allowed band; broken bounds are ignored.
resolveDragPriceFinal price of one drag step: optional tick snap, then the band clamp.
canPlaceOrder-
canModifyStopModifying a stop is a significant action: same gates as placing.
dragConfirmationRequiredIn live a dragged stop needs an explicit confirmation by default.
buildTradingOverlay-
ticketAvailabilityPanel availability of the current role and mode ( §5.3).
orderTagPaper-order tag: demo orders are marked as demo, the rest as live.
paperSessionReportBuilds the session report. equityCurve is optional; without it the drawdown is computed on the running sum of realized PnL, which matches the broker cash line for closed trades.
paperLeverageClamp of the leverage policy: non-finite and out-of-range values fall back.
paperKpiKPI of the paper desk. The unrealised part and the equity come from the account state unchanged, so the dock and the session report show the same numbers; only the margins are derived here.
referencePrice-
previewOrder-
computeRisk-
addVolumePaneAdds a pane that carries its own volume price scale and is linked to the shared time range: columns grow from the pane baseline to the tallest visible volume. The host paints the columns through paintVolumeLayer; the pane keeps the volume scale off the price pane ( §2-§3).

Types (805)

SymbolWhat it does
AlertActionKind-
AlertAction-
AlertActionPlan-
SeriesMapIndicator series aligned by bar index; null marks a gap.
AlertDeliveryHost-
AlertDeliveryResult-
DrawingConditionResult-
AlertTickAlert engine (FR-ALERT-04, §4/§6/§7): one instance per instrument stream. Rules are validated and stored with their runtime state - the last fire time (cooldown), the trigger window of repeated and the object-alert side for drawing conditions. A repeated tick (same time and price) is ignored entirely (gate: idempotency), the first tick only seeds the comparison base. While dataComplete is false the emitted events carry the flag through to the journal (snapshot mode, §4.5).
BarHelpers-
AlertUpsertResult-
AlertEngineOptions-
AlertGroupLogic-
AlertConditionGroup-
AlertGroupResult-
DeliveryStatusAlert journal (FR-ALERT-04, §5/§6): records of the firings with their delivery status (pending -> sent -> failed), combination filters (all fields are ANDed, the period is inclusive, the search is case-insensitive) and a stable CSV export. The trade link follows the product order "fired -> acted -> executed": an order id must be attached before a trade id, the reverse order is rejected.
JournalRecord-
AlertJournalFilter-
JournalStats-
AlertPriceLineDraggable alert price line (ANALYSIS/06 §5.2): a price level with a step-snapped drag model. The host paints the line and routes pointer events; the model keeps the price honest (snapped to the step, positive, clamped).
AlertLineOptions-
AlertLineHitOptions-
PlatformAlertRuleMapping to the platform rule model (FR-ALERT-03, §2): the library never invents its own format - toPlatformRules produces the exact fields of notification-ms (metricName, conditionOperator, thresholdValue, severity, notificationChannel, ruleType, thresholdCount, timeWindowMinutes). Conditions the single-threshold model cannot express (a two-sided cross, a range exit) unfold into two platform rules.
PlatformMetric-
AlertSeverityAlert rule model (FR-ALERT-01/03, §1-2): the union of the twelve condition kinds ALT-01..12, the rule that mirrors the notification-ms alert_rules model and the event the engine emits. Evaluation kernels live in ticks.ts / bars.ts / patterns.ts / drawings.ts; the engine (engine.ts) owns rule state, debounce and limits.
AlertChannel-
AlertRuleType-
AlertDirection-
AlertOperator-
CandlePatternId-
AlertFormulaEvaluatorExternal formula evaluator (ALT-12): host wires the S5 sandboxed runtime.
AlertCondition-
AlertConditionKind-
AlertEvaluationMode-
AlertConditionMeta-
AlertRuleRule mirrors notification-ms alert_rules ( §2).
AlertEventOut-
EditableAlertConditionKindEditor defaults of the catalogue conditions ( follow-up "the alert rule editor form"): a ready-to-edit condition per kind, so rule builders and the alert group editor do not hard-code their own fixtures. The formula kind needs a host evaluator and is excluded on purpose.
AlertPanelStatus-
AlertFiredFact-
AlertPanelRow-
AlertPanelOptions-
AlertPanelFilter-
AlertTemplateContextProduction alert helpers (§5): message templates with placeholders and the delivery retry policy. The BFF owns the queue itself; the core provides the deterministic pieces - rendered text, retry timing (exponential with a cap and a seeded jitter) and the retryable-error class.
RetryPolicy-
TickContextTick condition kernels (§1/§4): deterministic edge predicates over the (previous, current) pair. ALT-01/02/03 fire strictly on a crossing - a tick that is already beyond the level stays silent until the price comes back and crosses again. ALT-10 fires on the first tick outside the range (borders inclusive) or on a close beyond them.
TimelineKindEvent timeline (FR-ALERT-05, §5): news, dividends, reports, alerts and trades on one axis. Entries are deduplicated by id, ranges are inclusive, and markers come out sorted by time; on equal times the kind priority decides (alert above trade above report above dividend above news) so a firing stays visible next to the event that caused it.
TimelineEntry-
TimelineMarker-
FibLevel-
AutoFibResult-
BasketMemberOne selected row with its weight (nominal, quantity, exposure).
BasketMetrics-
BasketOptions-
BasketSeriesSeries of one member: the composite is built over the common time axis.
CursorBucketOne bucket of a cursor: the day (or week) the crosshair points at.
TimeFilter-
ComparisonRowInput-
ComparisonRow-
ComparisonTableOptions-
ComparisonSortKey-
ComparisonSortDirection-
DivergenceKind-
DivergencePoint-
DivergencePair-
DivergenceOptions-
DivergencePaintInput-
DayCountConventionDay-count convention of an accrual period.
IsoDatePartsParsed calendar date of an ISO string.
InstrumentStatsOptionsInstrument statistics HUD (ANALYSIS/06 §4.2): last price and change, day extremes, ATR, VWAP distance and close-to-close volatility. The trading day is the UTC day of the last bar; the host calendar stays authoritative for exchange-local sessions and the values are honest aggregates of the passed bars only.
InstrumentStats-
LeaderboardRowCompare leaderboard (ANALYSIS/06 §4.1): ranks instruments by their change against the session open. Rows with a zero or invalid open are dropped; ties fall back to the symbol order, so the ranking is stable.
LeaderboardDirection-
LeaderboardEntry-
LeaderboardOptions-
ReconciliationPairOne pair of numbers about the same key: what was expected and what came.
ReconciliationEntryOne compared pair with the difference and the verdict.
ReconciliationSummary-
ReconcileOptions-
ReasonStepOne step of the reason waterfall: a label and the signed amount behind it.
DatedRowOne row of a book at a point in time.
AsOfGapDifference between two versions of the same book.
ReconciliationTextOptions-
RsPointRelative strength (ANALYSIS/06 §4.6): the instrument against a benchmark, aligned by exact bar time and normalised so the first aligned point equals baseValue (default 100). Bars without a matching time are skipped; the alignment count keeps the honest coverage.
RelativeStrength-
RsPanelRow-
RsPanelOptions-
RsPanelSummary-
LevelPeriod-
LevelKind-
SessionLevel-
SessionLevelsOptions-
LevelBreakout-
SwingKind-
SwingPoint-
SwingOptions-
ImpulseOptions-
Impulse-
TreeEntryOne visible line of a flattened tree.
TableTreeOptions-
TreeKeyOfKey of a row inside the tree: the same key the table uses for its rows.
TableAggregateAggregated value of one column of a group; null when there is nothing to show.
TableTextOptionsText form of a table (TAB-D6): tab separated by default, comma separated with separator: ','. The header is always taken from the column titles, and a cell is the formatted value, exactly as it is displayed.
TableViewRangeRange filter of one column, as a view stores it.
TableViewChartChart the view was looking at; the host fills what it needs.
TableViewSaved arrangement of a board.
TableColumnKind-
TableTone-
TablePill-
TableFigureFigure of a table cell: which painter draws the cell, how the values of a row are read and what a screen reader hears. The model only describes the figure and resolves the samples; drawing belongs to the host, so the cell figure works in a table, a board or a printed report alike.
TableColumn-
TableSortDirection-
TableSort-
TableHistogramBucketOne interval of a column distribution.
TableHistogram-
HttpResponseLikeHost owned HTTP transport: the core never touches fetch or DOM.
HttpTransport-
EventSourceLike-
SseFactory-
StompSocketLike-
StompFactory-
MarketDataEndpoints-
MarketDataAdapterOptions-
MemoryAdapterOptions-
AdjustmentMode-
AdjustmentAction-
BarApplyKind-
TickRejectReasonWhy a tick did not produce a bar write (used by pipeline counters).
TickApplyResult-
TickDetailedResultDetailed outcome of one tick: applied bar or a concrete reject reason.
BarAggregatorEventStream events of the tick aggregator ( follow-up, event stage 5).
SeriesCacheMetaIdentity of the data behind a cached series ( §4).
ComparisonFeedSymbol-
ComparisonFeedRequest-
ComparisonFeedIssue-
ComparisonFeedResult-
ConnectionState-
ConnectionSnapshot-
ConnectionEvent-
ConnectionControllerOptions-
DataControllerOptions-
LoadRequest-
LoadResult-
StreamRequest-
DataControllerEvent-
BarsEvent-
DatafeedErrorKindTyped datafeed errors (§3). Messages never carry tokens, headers or full response bodies: hosts show them to users and send them to telemetry (NFR-RELY-02, NFR-OPS-04).
CalendarEventKind-
CalendarEvent-
EventLaneMarker-
EventClusterOne group of the lane: a single marker or a crowd of close markers.
BarsCsvOptions-
GetBarsRequestDatafeed contract (§3). The core never owns a transport: hosts inject it into adapters, so the package stays DOM free.
BarsPage-
SubscribeBarsRequest-
SubscribeTicksRequest-
Unsubscribe-
MarketMarkKind-
MarketMark-
MarksRequest-
LoadStateUI level state of a series ( §3, FR-INTERACT-07).
Datafeed-
GapMonitorEventStream event of the monitor ( follow-up).
LegacyFeedLike-
LegacyAdapterIssue-
LegacyAdapterOptions-
RenkoOptions-
KagiOptions-
PointAndFigureOptions-
RangeBarsOptions-
LineBreakOptions-
OrderbookLevelOrder book layer: a framework-free model that keeps the ladder honest - levels are validated, sorted and deduplicated, snapshots are applied idempotently by sequence, and derived values (best bid/ask, spread, mid, cumulative depth, imbalance) are pure functions of the kept state.
OrderbookSnapshot-
OrderbookRow-
OrderbookDepth-
BarPackColumnar view over a bar series. Time stays float64 (epoch ms), prices and volume are float32: enough for tick precision and half the memory of a plain array of objects.
VisibleWindow-
PAndFAutoOptions-
PAndFParameters-
TickPipelineStats-
TickPipelineOptions-
PipelineBarKind-
GapReport-
GapSpanOne missing stretch: time after which buckets are absent ( follow-up).
StompFrameMinimal STOMP 1.2 frame reader/writer. Covers exactly what the market-data stream needs: CONNECT/SUBSCRIBE/UNSUBSCRIBE out, MESSAGE in, heartbeats. A full client with reconnects is deferred (delta of S3).
StompParseResult-
StompSocketFactory-
StompTimersTimer seam: tests advance reconnects deterministically.
StompReconnectOptions-
StompSubscriptionOptions-
StompSubscriptionHandle-
StoredSeries-
AsyncKeyValueStoreNarrow async key-value contract a host adapts to IndexedDB, OPFS or any other storage; the core never touches browser APIs directly.
PersistentStorePersistence of loaded pages so a reload does not refetch history.
AlertKindObject alerts (FR-DRAW-08, §5): touch a level, break a channel, leave a closed figure, enter a zone. Evaluation is pure: it consumes bars and a state, returns the edge-triggered events and the next state. Delivery to EMAIL/SMS/IN_APP/PUSH stays with the host.
ObjectAlert-
AlertEvent-
AlertSide-
AlertState-
AlertEvaluation-
MoveDeltaDrawing commands and the fifty step history ( §2). Every mutation goes through a command that returns its inverse; unchanged commands are not recorded, objects are replaced instead of mutated, so snapshots stay intact.
DrawingCommand-
DrawingHistoryEventStream payload of the history stack ( follow-up: history:changed).
CustomPrimitivePrimitive of a custom builder without the identity fields the engine owns.
CustomToolContext-
CustomToolSpec-
CustomToolAdapters-
FillPatternKind-
FillPatternDefinition-
FillShapeRect-
FillShapeEllipse-
FillShapePolygon-
FillShape-
FillBounds-
FillSegment-
FillDot-
FillPatternGeometryGeometry of one pattern tile set: strokes, dots or nothing.
FillPatternPaintInput-
FillPatternPaintResult-
ScreenPointScreen geometry of the wave one tools ( §6): every tool turns its resolved anchors into primitives that the renderer draws and the hit test queries. All coordinates are finite or the object is considered invisible.
Viewport-
GeometryEnv-
DrawingPrimitive-
GeometryOptions-
MeasureSummary-
BoxHit testing of drawing primitives ( §2-3): point markers win over bodies, higher layers win over lower ones, hidden objects never reach this layer (geometry returns nothing for them). The spatial grid answers box and point queries so a chart with thousands of objects stays responsive.
HitResult-
JournalRowObject journal (FR-DRAW-05, §2): a derived view of the store rows, the focus frame for jumping to an object and the group actions that the host sends through the regular command history.
JournalFilter-
JournalGroupAction-
MagnetModeMagnet snapping ( §2): off leaves the cursor alone, weak snaps to candlestick fields and object anchors inside 6 px, strong widens the radius to 12 px and adds round price levels.
MagnetKind-
MagnetCandidate-
MagnetContext-
MagnetResult-
DrawingPointKindDrawing model of the charting core ( §1): objects anchor to time and price only, style travels with the object and colours stay theme tokens so the palette gate keeps hex literals out of the core.
TimePricePoint-
BarPricePoint-
PricePoint-
TimePoint-
DrawingPoint-
LineStyle-
TextAlign-
DrawingStyle-
DrawingMeta-
Drawing-
DrawingInit-
DrawingValidation-
MeasurePoint-
MeasureSet-
MeasureSpan-
MeasureSpread-
DrawingPaletteTool-
DrawingPaletteSubgroup-
DrawingPaletteGroup-
DrawingPaletteStateSerializable toolbar state of the palette rail: the plain-JSON payload that lands in a workspace snapshot unchanged (NFR-RELY-04). All transitions are pure and ignore unknown tool ids, so a snapshot of an older catalogue stays safe (NFR-SEC-06: unknown fields are ignored, a damaged snapshot never throws).
DrawOp-
GeometryCacheStats-
DrawingAppearancePer-frame appearance of one object (ghost, drag, appear),.
LayerOpsOptions-
LayerOps-
AnchorEnvAnchor resolution ( §1): drawings live in time and price. The host injects the pixel mapping of the current scales; time anchors find the bar that opens at (or just before) their timestamp, so switching a timeframe keeps the object on the same moment of the market.
ResolvedAnchor-
DrawingIssue-
DrawingParseResult-
DrawingTemplate-
TemplateParseResult-
DrawingStoreEventOrdered collection of drawings ( §2): stable order by layer z, then by insertion; every mutation keeps the collection consistent. The store also streams its mutations: created/changed/removed, cleared and selection changes reach the subscribers in mutation order.
DrawingStyleTemplate-
StyleTemplateInit-
TemplateTargetTemplate library (FR-DRAW-06, §4): named object sets, one default template for a fresh chart, applying a set to another instrument. The library keeps immutable templates and never touches the store itself.
DrawingCategoryWave S6 tool catalogue ( §6, rows marked "S6"): 29 tools across five categories. Tool definitions describe the anchor contract and the default style; geometry lives in geometry.ts, the model in model.ts.
DrawingPointSpec-
DrawingToolDefinition-
DrawingForInit-
PinnedTooltipDrawing tooltip pinning: hosts pin the tooltip of one drawing object so it stops following the cursor. A second click on the same object unpins it, a pin on another object replaces the previous one and a removed object clears its pin on the next frame. Pure state only - drawing the pinned label stays with the host scene.
DrawingTreeRow-
DrawingTreeNode-
DrawingTreeOptions-
ChartEventKindEvents overlay (ANALYSIS/06 §4.3): news, dividends, reports and alert facts anchored to bars. Markers snap forward to the first bar at or after the event time (nearestIndexAtOrAfter semantics, the lesson), events beyond the loaded data are skipped, and same-bar markers stack into lanes.
ChartEventRow-
ChartEventMarker-
EventMarkerOptions-
EventFilter-
EventHitLayout-
ContextMenuAction-
ContextMenuInput-
ContextMenuItem-
InteractionHostEverything the controller reads from the hosting chart.
InteractionControllerOptions-
PointerKind-
HoverState-
WheelOptions-
FollowOptionsAuto-follow of the last bar and the elastic history edge (, ideas 40 and 33).
ViewWindow-
FollowInput-
FollowDecision-
ElasticPan-
GestureIntentGesture intents: one table turns modifiers and pointer kinds into the action of the gesture, so hosts and the controller never duplicate the modifier logic. Pure data, no DOM.
GestureModifiers-
LongPressInput-
InteractionStateInteraction state owned by the host shell. Reducers below are pure in the sense that they only mutate the passed time scale - the returned state is a new object, so hosts can store it in their own reactive store.
WheelLike-
GestureLike-
PriceWindowVisible price window a vertical gesture rescales.
ScaleDragOptions-
MarqueeRectMarquee selection in pixels (the host draws the rectangle).
NavDirectionKeyboard navigation over drawings and layers (, idea 39).
NavItem-
ProCommandId-
ProShortcut-
ScaleClickOrderInput-
ScaleClickOrderResult-
InteractionCommandKeyboard map of §6: pure data, so hosts can display and remap it.
KineticOptionsKinetic scrolling: decaying pixel velocity for the time axis. The core keeps no timers - hosts advance tick(dtMs) from their frame loop and apply the returned pixel delta to the scale. Friction and the duration budget are explicit, so the stop moment is deterministic in tests.
KineticTick-
MinimapLayoutMinimap geometry (ANALYSIS/06 §1.5): a density strip over the whole history with a draggable viewport window. Pure geometry: the host paints columns and moves the window; the model only maps indexes to pixels.
MinimapColumn-
MinimapWindow-
ReadoutModel-
ReadoutBuildOptions-
ReadoutInstrumentMinimal instrument shape of the readout: hosts pass at least the symbol, the remaining fields refine the change base and the precision.
BarSelectionEventStream event of the selection ( follow-up).
SnapModeWhere the cursor looks for a price: the whole bar, or one part of it.
SnapKindWhat a target is, used for the tie-break order and for the label.
SnapTarget-
SnapInput-
SnapResult-
LinkSelectionEventLINK selection and drawing channels: in addition to the crosshair bus (sdk/crosshair-link.ts) a LINK group of windows can share the selected drawing object and apply drawing edits (upsert/remove). The bus is a pure model: members are injected, delivery skips the source window, repeated broadcasts of the same payload from one source are suppressed inside the echo window, drawing revisions order the edits (remove wins over a stale update) and a late joiner receives the current snapshot.
DrawingLinkOp-
LinkedWindow-
AuctionWindow-
AuctionConfig-
AuctionPhase-
AuctionBand-
AuctionCue-
BarCore market data model: bars, ticks, instruments and timeframes. No DOM and no framework dependencies here.
TickSide-
Tick-
SessionSpec-
Instrument-
Timeframe22 timeframes from a second to a month ( §2).
TradingCalendar-
SessionCalendarOptions: dst: true follows the US Eastern rules for the offset.
SessionPhase-
SessionBreak-
UpsertResult-
SessionRange-
AnomalyThresholds-
AnomalyOptions-
TapeFilters-
WallEventKind-
WallEvent-
AuctionCellOne TPO cell: a price level visited during one time bucket.
BarProfileLevel-
BarProfile-
VwapPoint-
BookLevelOrder book history heatmap (ANALYSIS/06 §3 heatmap): keeps a bounded history of depth snapshots and projects it into a price x time intensity grid for rendering. Memory is bounded by maxColumns (oldest columns are dropped) and maxLevels (largest levels win); the grid coarsens its step until the row count fits maxRows.
HeatmapLevel-
HeatmapColumn-
HeatmapGridOptions-
HeatmapRow-
HeatmapGrid-
BookHeatmapOptions-
DeltaRowCumulative delta (ANALYSIS/06 §3.3, §2 extension): aggregates per-bar footprint deltas into a running curve and finds classic price/delta divergences on swing points. Pure model: no DOM, no timers.
DeltaPoint-
DeltaExtremes-
DeltaDivergence-
DeltaDivergenceOptions-
LadderRow-
LadderView-
TapeEntry-
TapeView-
LargePrintOptions-
LargePrint-
LargePrintReport-
PrintBucketRow-
TapeWindowOne window of the tape: a half-open [from, to) interval with its counters.
ReplayLikeThe minimal replay surface the collector needs (MarketReplay satisfies it).
ReplayHeatmapOptions-
ReplayHeatmapGridOptions-
ReplayHeatmap-
RibbonSampleOne sampled book state: imbalance is -1..1 by contract, depth is size.
TileRange-
SmaAbiLayoutWASM pilot (PRO wave, CHT-13-28): the ABI, the memory layout and two independent implementations of the moving average - the streaming kernel shaped after the planned WebAssembly module and the naive reference. Parity must hold bit-for-bit before a real binary is wired in.
SmaParityResult-
PanePrimitiveFrame-
PanePrimitivePainter-
PanePrimitiveOptions-
ProfileWindowProfile windows (FR-PROF-03/04, §4): the caller owns the calendar, the core slices bars by an inclusive [from..to] window, and the composite profile simply concatenates the sessions in order.
CompositeProfile-
ProfileCacheKeyProfile cache (FR-PROF-05, §5): LRU of built profiles keyed by symbol, period, level count and mode. The key is stored as a nested map chain - no string is built per lookup (frame-path friendly). invalidate without a period drops everything; with a period it drops the entries of that period only. Stats are cumulative and survive clear.
ProfileCacheStats-
ProfileComparisonComparison of two profiles (FR-PROF-04, §4): the anchor levels (VAL, POC, VAH) of the left profile are matched against the right one within the common step; unmatched levels split into positive (above the shared pivot) and negative (below it).
FootprintTickFootprint clusters (FR-PROF-02, §2): tick level aggregation into bar x price cells with bid/ask sides, delta, imbalance flags and optional absorption. Ticks are idempotent by eventId, the cell budget is enforced with pruning of the oldest bars.
FootprintCell-
FootprintOptions-
FootprintState-
FootprintEventStream event of the footprint accumulator ( follow-up, event stage 5).
FootprintErrorEventStream event: malformed prints of a batch ( follow-up, event stage 7).
ProfileGridOptionsShared price grid of the profile family ( §1): levels from the low of the window, step rounded up to the instrument tick. Used by the volume, TPO and footprint profiles so every mode speaks the same level indices.
ProfileGrid-
UpdateProfileOptionsIncremental profile patch (FR-PROF-05, §5): the forming bar is replaced without a full rebuild - its old contribution is subtracted and the new one added on the grid of the previous profile. The grid is extended by whole steps when the new bar leaves the previous range (the base moves down by whole steps, an upwards extension keeps the base), which keeps the band edges aligned: the result is identical to a full rebuild whenever the rebuild resolves the same grid. When the rebuild would shrink the range (the replaced bar owned an extreme) the patch keeps the wider grid and the host should rebuild instead.
ProfileLevelKind-
ProfileLineLevel-
WindowRange-
WindowProfileStats-
WindowProfileCacheOptions-
SessionValueArea-
ValueAreaMigration-
SessionHistory-
CompositeSessionResult-
SessionSlice-
SessionProfileEntry-
TpoFormTPO profile (FR-PROF-03, §3): one base bar paints one mark on every level it passed - the profile measures time, not volume. POC and the value area share the rules of the volume profile (tie to the lower level, VA expansion prefers the upper side).
TpoProfileOptions-
TpoLevel-
TpoProfile-
ProfileDistribution-
ProfileSpread-
VolumeProfileOptions-
ProfileLevel-
VolumeProfile-
AdaptiveDetailModeText representation of one bar; candles are the richest, the line the cheapest.
BoxStats-
BulletSpec-
FanBand-
PortfolioPointOne candidate portfolio: risk (volatility) on X, expected return on Y.
AnalyticReadoutSeriesOne series the readout walks: samples sorted by x, optional labels.
AnalyticReadoutRowNearest sample of one series at the cursor.
AnalyticReadout-
AnalyticPickPick of a single sample; hosts turn it into selection events.
AnalyticWindowVisible domain of the analytic X axis.
NearestAnalyticPoint-
AnalyticPointOne analytic sample: a domain value on X and a value on Y.
AnalyticSeriesKindKinds of the analytic series family ( §1).
AnalyticSeriesSpecDeclarative description of one analytic series; painters read the same fields.
AnalyticStylePer-call style of the painter functions; every field falls back to the theme.
AnalyticGradientFillTwo-stop ramp of a band fill (S105): the box is the bounding box of the ribbon, so the ramp spans the whole band and never a single cell; the angle follows the look pack (0 - to the right, 90 - down by default).
AnalyticBarGradientVertical ramp of the bar painter (S105): every bar keeps its role colour and its own box, the dense end sits at the tip of the bar and the tail fades to the baseline - never per cell.
AnalyticPaintInput-
WaterfallStep-
WaterfallSpan-
AxisLabelBoxOne candidate label of an axis: centre is the middle of its box in px.
ValueAxisLabelPlacementWhere a value-axis label sits: x is the text start, align the canvas text alignment of the paint call, null means the label is dropped.
BackendId-
BackendPreference-
RenderBackend-
BackendFactoryCreates a backend or reports that it is unavailable. The host owns context creation, so the core still never touches the DOM.
RendererChangedEvent-
RendererEventMap-
ChartRendererOptions-
BodyBoxRectangle of one body in plot pixels.
VapRowOne VAP row: a horizontal bar at the price level, share of the widest one.
Canvas2DLikeMinimal surface of CanvasRenderingContext2D used by the renderer and the series/layer code. Declared locally so the core has no DOM dependency in typing and can be exercised by a fake context in tests.
RenderInput-
RenderStats-
CompareOverlayPoint-
CompareOverlaySeries-
CompareOverlayData-
CompareOverlayPaintInput-
CrosshairStateCrosshair state: which pane and bar the pointer points at ( §3, §6). The model is intentionally free of pixels so hosts can sync panes.
TooltipRow-
CrosshairResult-
TooltipBoxInput-
TooltipBox-
CellPulse-
DataWindowGroup-
DataWindowTone-
DataWindowRow-
DataWindowBookLevel-
DataWindowExtOptional extended sources of the row under the cursor.
BuildDataWindowOptions-
DataWindowModel-
DeltaBarModeModes of the delta reading on the candle.
RectDirty region tracking and partial repaint support (§7.2). The tracker is dumb on purpose: it accumulates rectangles, merges overlaps and falls back to a full frame when the region budget is exceeded.
EventLaneItem-
EventLaneInputFrame option of the lane: the markers of the window and the badge overrides.
EventLaneCardRowOne row of the event card: label on the left, value on the right.
EventLaneCardDetail card of a badge: title, rows and an optional action label.
EventLaneGeometryGeometry of the lane band; shared by the painter and the hit test.
EventLaneLayoutInput-
LaneItemsCacheMemo of the lane layout ( follow-up): a dense corporate calendar would be re-laid out on every frame and on every pointer move otherwise. The cache compares the markers by identity plus the view numbers, so pan, zoom and new data invalidate it while hovering does not.
EventLanePaintInput-
GradientBox-
GradientOptions-
GridStyle-
GridPeriod-
CandleHeatmapCellOne screener cell: an instrument, a period and the period change.
AuctionPaintInput-
HeatmapPaletteTone colours of one grid, resolved once per paint.
HeatmapToneColour ramp of a heatmap; diverging reads a signed intensity.
HeatmapRowLikeOne grid row: an optional label (price, year) and its cell values.
HeatmapGridLikeNormalised matrix every heatmap source maps onto.
HeatmapPaintInput-
FadeRect-
LegendInput-
LegendTitleHeading of the legend row: the ticker, its timeframe and its exchange.
LegendPaintInput-
LegendToneTone of one legend segment: muted labels, text plain values.
LegendSegment-
LevelLineInput-
BackdropStyleBackdrop of the background layer: flat fill, soft gradient or an accent glow.
ReadoutSkinReadout strip skin: plain columns, chips or value cards.
ChartLookInput-
ResolvedLook-
ResolvedChartGradient-
MeasureInput-
MeasureDelta-
MeasureChrome-
MeasurePaintInput-
MiniFigureInputBox a mini figure draws into; the host owns the pixels.
MiniFigureStylePer-call style; every field falls back to the theme.
MiniFigureIdIds of the built-in mini figures.
MiniFigureInfoOne entry of the figure catalogue: id, human title and what it answers.
IvMatrixInputImplied volatility of one option: the row of a smile, cell by cell.
SquareMatrixInputSquare symmetric matrix (correlation of the members of a book).
LimitBarInputUtilisation of one limit: what is used, the ceiling and where the breach starts.
ScenarioConeInputScenario cone of a horizon: the value of the host today and the band around it.
DrawingGhostStyle-
DrawingAppearStyle-
ZoomAnimationAn eased zoom between two bar spacings (CHT-15-08). The core never runs timers: hosts advance elapsedMs (wall clock or rAF) and read spacingAt.
OrderbookChartVariant-
OrderbookChartInput-
OrderbookViewInput-
OrderbookViewLevel-
OrderbookView-
LineOverlayHost-provided line overlays (PRO wave): indicator curves (moving averages, VWAP, Bollinger bands) and level lines painted by the series layer over the price pane. Values are aligned to bars by index: null breaks the polyline, a gap is never bridged. The core paints, the host computes - the same contract as every other layer.
OverlayPaintInput-
PerformanceGuardOptionsFrame budget guard (§7.1). Three frames over budget in a row switch the chart to the economy mode (no grid); a single frame inside the budget resets it. The rule is deliberately simple and testable.
VisualPolish-
ChartPriceLine-
LockGlyph-
PriceLineTagBoxInput-
PriceLineTagBox-
PriceLinePaintInput-
ReadoutOptions-
ReadoutColumn-
ReadoutRow-
ReadoutStripInput-
ReadoutPaintLayout-
AttributionRow-
MonteCarloSpec-
MonteCarloBands-
MonteCarloJobFlat, transferable cone: the same simulation in typed arrays, so a host can run it in a worker and hand the buffers over without a per-point copy (monteCarloJobTransferables). The painter consumes the point form, built once per result with coneFromJob.
SeriesRenderTypeSeries render types. The first wave ( §5): candles, outlineCandles, bars, line, area, histogram, step, baseline. adds the PRO pair: the footprint cluster grid and the four non-standard looks (renko, kagi, pointAndFigure, lineBreak) fed by the data/non-standard builders. adds the analytic four: volumeCandles, lineWithMarkers, hlcArea, highLow.
FootprintPaintDataFootprint cluster data attached by the host; bars are indexes of the series.
SeriesPaintInput-
SeriesTypeDefinition-
VisibleSlice-
SeriesPainterInputEverything a painter needs to draw one frame of its window.
SeriesPainter-
TimePriceCell-
TimePriceHeatmapData-
GhostPaintDataGhost series of the previous period, aligned to the current one.
SparkParticle-
SparksState-
SparkStyleNameNamed spark bursts: ten presets a host picks per chart.
SparkStyle-
SplinePointMonotone spline points (, idea 14): the smoothed curve of the spline series. The interpolation is the Fritsch-Carlson monotone cubic - unlike the classic Catmull-Rom it never leaves the span of the neighbouring points, so a smoothed price chart cannot show a price that was never traded.
SplineOptions-
ChartStateKind-
ChartStateInput-
ChartStatePaintInput-
TextMetricsLikeText measurement cache. Axis chips and tooltip rows measure the same strings every frame; the cache keeps the last N measurements and drops the oldest entries first (Map keeps insertion order).
TextCacheStats-
ChartThemeChart theme. Colors are never hardcoded in layers: they come from the shell tokens (--ud-*) of the Desktop Kit or from the built-in defaults below ( §1).
ThemeNameNames of the selectable palettes plus the system alias.
BuiltInThemeNameNames of the six palettes the library ships, in menu order.
BarPaletteNameBar palettes of the look pack: classic keeps the theme up/down.
BarPalette-
VolumeToneNameVolume tone of the look pack: how the columns read against the series.
VolumeTone-
MotionPolicy-
TokenResolver-
VolumeLayerInput-
VolumePaintInput-
WatermarkLine-
WatermarkImageHost image of the watermark (white label): an opaque canvas source with its size in CSS pixels. The core never touches the DOM - it only forwards the source to drawImage, so any host image type works.
WatermarkPositionWhere a watermark sits: the plot centre or the bottom-left corner.
Rgba-
ClipTransformCPU geometry builders for the WebGL2 backend. Everything is produced in clip space (-1..1, y up) so the vertex shader stays a pass-through; the builders mirror the canvas2d pixel math, which is what makes the parity check meaningful.
PlotGeometryContext-
CandleGeometry-
BarsGeometry-
WebGL2LikeMinimal WebGL2 surface used by the backend. Declared locally so the core keeps no DOM dependency: hosts pass a real WebGL2RenderingContext, tests pass a recording fake.
FlatProgram-
WorkerMessageWorker render bridge (PRO wave, CHT-13-27): the message protocol and the controller of off-main-thread painting over an injected port. The library never creates the worker itself - the host owns the worker file, the OffscreenCanvas transfer and the lite switch; the bridge keeps the sequencing (init, paint with ack, dispose) and the deterministic fallback.
RenderPort-
WorkerRenderOptions-
RenderMode-
WorkerRenderState-
WorkerRender-
ReplayParseOptions-
ReplayParseResult-
ReplaySpeed-
ReplayOptions-
ReplayEngineEventStream events of the replay engine ( follow-up, event stage 4).
MarketReplayRecord-
MarketReplayOptions-
MarketReplayState-
RecordSessionOptions-
AxisFormatterNon-time X axis (§1): numeric and categorical scales for analytic series whose domain is not a bar index - yield curves, payoff diagrams, open interest by strike. Degenerate domains never divide by zero: a flat numeric domain widens by one unit per side, a zero-width axis maps every value to the zero pixel.
AxisTickA laid out axis tick: the domain value, its pixel position and label.
NumericAxisOptions-
CategoryAxisOptions-
AnalyticXAxisCommon surface of the analytic X axes; painters read only this block.
PeriodPresetPeriod presets (ANALYSIS/06 §1.6): maps 1D/1W/1M/YTD/ALL buttons to a bar index range. The calendar is anchored to the last bar time (or an injected anchor) and uses UTC days - the host calendar/session layer stays authoritative for exchange-local boundaries.
PeriodRange-
PriceScaleMode-
PriceScaleOptions-
PriceRange-
PriceTick-
ScaleModeHint-
ScaleModeChoice-
TimeMappingPositional data of the axis: time to pixel and back.
ScaleModeInput-
FutureExtent-
TickMarkTypeGranularity of a time label; price marks value-axis labels.
TickMarkContext-
TickMarkFormatterUser label of one tick; null hides the tick, exceptions fall back.
TimeGap-
GapOptions-
AxisLabel-
AxisMarker-
CompressionInput-
TimeCompression-
AxisRowsInput-
TimeScaleOptions-
VisibleRangeVisible window in bar indexes (fractional while panning).
RenderProfileRender profiles decide which layers are active ( §4): sparkline - dashboards, no grid, axes or crosshair; mini - small chart with axes; standard - the portal chart; terminal - the desktop shell.
LayerIdLayer identifiers and the canonical paint order of §4. Orders are spaced by ten so hosts can insert their own layers later.
FrameContextEverything a layer needs to paint one frame.
SceneLayer-
SceneStats-
SceneType-
SceneOptions-
SceneProfileSummary-
KeyboardBinding-
KeyModifiers-
ChartAriaDescriptor-
ChartAria-
PaletteCommandCommand palette model (PRO feature 1.3): a pure ranking function over host-provided commands. The core never touches the DOM or key events here - the host collects its commands, passes the typed query and renders the list.
ScoredCommand-
BarRef-
ComparisonDelta-
BarPairComparison-
ConfigThemePalette names of the declarative config: the six registries of §1 plus the white-label brand entry, which the host resolves from tokens.
ChartPaneConfig-
ChartIndicatorConfig-
ChartConfig-
ParsedChartConfig-
LinkedCrosshairChart-
DiagnosticsSeriesDiagnostics snapshot (NFR-OPS-04): a compact state image for error reports - series sizes, panel layout, caches, connection and renderer status plus the version. Personal data never leaves: keys that look like a token, secret, password, credential, session or an API key are cut out at any nesting level, deep structures are truncated.
DiagnosticsPanel-
DiagnosticsInput-
CrosshairPoint-
CrosshairMoveEvent-
CrosshairLeaveEventThe pointer left the plot area; the crosshair is hidden.
CrosshairPinEvent-
BarClickEvent-
InteractionEventName-
InteractionEvent-
LocaleCodeCore locale pack (FR-SDK-06, §2): the strings of the core UI plus deterministic number and date formatting for RU, EN, UZ and KZ. Formatting is implemented locally (no Intl dependency) so the output never drifts with the host ICU version: RU/UZ/KZ group with a space and a comma decimal, EN groups with a comma and a dot decimal.
LocalePack-
PdfSignatureSlotPDF signature slots ( follow-up "crypto signature of PDF reports"): the platform owns the signing keys and the trust chain, the library owns the document mechanics - a reserved detached signature field appended as a PDF incremental update with a proper /ByteRange, so the signed bytes and the verified digest are stable and reproducible. Crypto (hashing, signing, verification) is injected: the core never touches environment globals.
PdfSignatureReserveOptions-
ReadPdfSignature-
ChartPdfMetaPDF export (PRO wave, CHT-13-24): a deterministic single-page PDF with the chart snapshot as a JPEG image - written by the library itself, no third-party PDF writer. The output is byte-stable for the same inputs (the timestamp is injected), so signed reports keep reproducible hashes.
ApiStabilityPublic API registry (FR-SDK-09, §9): the stability map of the @unifin/chart-core exports. The registry is derived from the real index.ts source - buildApiRegistry parses the re-export blocks, so the stability map can never drift from the published surface; the test compares the derivation with the runtime namespace in both directions.
ApiKind-
ApiRegistryEntry-
ApiEventEntry-
ShortLinkPort-
ShortLinkService-
ShareStoreShare store seam: the platform stores an opaque payload server-side and hands back a short code (uf1:<code>); hosts with a backend inject their HTTP transport, hosts without one get a deterministic in-memory store with TTL. The drawing codec (C1.) and the chart-config links (S1., sdk/share-link.ts) keep their formats - this seam serves arbitrary payloads and adds the idempotent-put and collision rules.
MemoryShareStoreOptions-
TableRowRefOne row of a table, as the chart side sees it.
TableLinkEventDirection of a published reference.
TableChartLinkOptions-
TableChartLink-
WorkspaceMetaWorkspace library (PRO feature 1.1): named layouts over the chart snapshot of the host. Storage-agnostic and DOM-free - the host persists the exported JSON wherever it wants (localStorage, server, file). Time comes from an injected clock, so tests and reports stay deterministic.
WorkspaceRecord-
WorkspaceLibraryOptions-
WorkspaceLibraryEventStream event of the workspace library ( follow-up, event stage 3).
PaperStrategy-
PaperRunResult-
CategorySummary-
Preset-
CatalogSnapshot-
ComparisonNormalization-
ComparisonInputOne instrument in a comparison panel ( §4, FR-DATA-09).
ComparisonOptions-
ComparisonSeriesModel-
ComparisonModel-
LegendOutputValue-
LegendRow-
LegendOptions-
IndicatorCategoryStudy model ( §1): one contract for core, catalogue and future plugins. A definition never touches DOM, network or storage; it only reads bars and parameters and writes numeric outputs aligned to the bars array. * Parameters arrive as a plain record: helpers below read them defensively, so a broken setting degrades one indicator instead of breaking the layer.
IndicatorPlacement-
InputKind-
IndicatorInput-
OutputKind-
OutputStyle-
IndicatorOutput-
ReferenceLevel-
StudyParametersEverything a calculation may read and write: no other ambient state.
StudyState-
StudyContextEverything a calculation may read and write: no other ambient state.
IndicatorDefinition-
IndicatorDefinitionProblem-
PluginLicensePlugin contract ( §1): a third party extends the catalogue without forking it. Installation is atomic and gated: source, licence and every definition are checked before anything reaches the registry.
IndicatorPlugin-
EngineOptions-
EngineStats-
IndicatorEngineEventStream events of the indicator engine ( follow-up, event stage 6).
IndicatorInstance-
SchedulerTaskOptions-
SchedulerHandle-
FrameSchedulerOptions-
WorkerLikeWorker transport stays outside the core: the host injects a factory over its real Worker (browser) or worker_threads (Node), the pool only speaks messages.
WorkerFactory-
WorkerPoolOptions-
WorkerTask-
TemplatePayload-
TemplateRecord-
TemplateCatalog-
FibonacciLevel-
TradingAdapterTrading adapter contract ( §6, NFR-SEC-01): the ONLY way out of the library towards the trading contour. The host implements it over the BFF of the portal; the core never holds tokens and never talks to a brokerage API directly. Errors travel as TradingException with a typed kind.
BracketLevelId-
BracketPlanIdentity-
BracketLayerOptions-
BracketLevelVersion-
BracketGeometryLine-
BracketGeometryZone-
BracketGeometry-
BracketPlan-
BracketDistances-
BracketStatus-
BracketEvent-
BracketOutcome-
BracketSeamOptions-
OrderTypeSpecOrder catalogue (FR-TRADE-01, §1): exactly the six types of trading-ms with their panel fields. The library never extends the catalogue on its own - a new type appears in the platform first.
ConfirmationThresholds-
ConfirmationInput-
ConfirmationDecision-
ConfirmationOptions-
TradeLineBoundsTrading line drags (CHT-16-06): the pure half of "drag the stop, take or order line on the chart". The core maps pointer pixels to prices, snaps to the instrument tick and clamps into the allowed band; the host owns the pointer events, the journal (StopManager) and the redraw.
TradeLineLikeAny horizontal trading line a pointer can grab (stop, take, order).
TradeLineHit-
DragPriceInput-
AccessDecisionRole and mode gates (FR-TRADE-06/07, §5): orders are created by TRADER and PARTICIPANT only; OPERATOR and COMPLIANCE watch and export; readOnly blocks everyone. The gates are pure - the host calls them BEFORE touching the adapter, so a forbidden action never reaches the BFF.
OrderRecordTrading journal ( §7): orders may reference the alert that fired, trades reference their order - chain(alertId) resolves the product story "fired -> acted -> executed". A trade without a known order is rejected, so the chain never starts in the middle.
TradeRecord-
TradeChain-
OrderSideTrading layer model (FR-TRADE-01/06/07, §1/§5/§6): the order catalogue of trading-ms stays exactly six types, roles and modes follow the platform, and the library never talks to a brokerage API itself - the host wires a TradingAdapter behind the BFF (NFR-SEC-01).
OrderType-
TradingMode-
TradingRole-
OrderStatus-
TradingErrorKind-
OrderRequest-
OrderResult-
AccountSnapshot-
OrderPreview-
StopModifyRequest-
OrderUpdate-
PositionUpdate-
TradingUnsubscribe-
OrderLineVersionOrder lines on the chart ( follow-up, closing CHT-16-06): a pending order is a horizontal line the trader drags to a new price - the platform order is modified by the host, the library only keeps the current price per line id and the version journal (who, when, was, became). A drag over N steps writes N records - one per step - and the last record is the final level, matching the stop journal (FR-TRADE-04). The host owns the pointer events, the redraw and the platform call.
OrderLineManagerOptions-
OrderLineMeta-
OrderLineState-
OverlayLineTrading objects on the chart (FR-TRADE-05/07, §4/§5): the model projects the trading state into render-agnostic structures - stop/take lines, the position zone and the entry/order/trade markers. The host draws them; the core only decides what exists and in which order (time, then entry before order before trade on equal times).
OverlayZone-
OverlayMarker-
OverlayOrderInput-
OverlayTradeInput-
TradingOverlayInput-
TradingOverlay-
PaperSessionReport-
PaperKpiInput-
PaperKpi-
PaperSidePaper trading (PRO feature 2.3): a pure virtual broker for replay sessions. Market orders fill immediately at the given price; limit orders rest as working and fill when the tape crosses them. Positions average on increases and realize PnL on reductions; no platform calls are made.
PaperOrderType-
PaperOrderInput-
PaperOrder-
PaperFill-
PaperTrade-
PaperAccountState-
PaperBrokerOptions-
PaperBrokerEventStream events of the paper broker ( follow-up, event stage 3).
FillPosition tracking (FR-TRADE-05, §4): fills open, add to, reduce and flip the position; the average price follows the actual fills and the realised P&L is accumulated on the closing part of every opposite fill. Unrealised P&L is (last - average) * size, zero for a flat position.
PositionState-
PreviewContextOrder preview (FR-TRADE-02, §2): the client-side estimate of the panel - notional, commission, required margin and the free remainder after the order. The reference price is the order price, the trigger price or the last market price in this order. The BFF preview of the adapter stays the source of truth; the deviation is a host concern.
RiskInputRisk ruler (FR-TRADE-03, §3): the numbers shown on the chart and in the order panel before the confirmation - risk per unit, risk amount and its share of the capital, the side-aware potential, R:R and the day limit usage. The day limit itself comes from the BFF; the library only compares. Zero risk is a valid case (R:R stays null), the potential of a take on the wrong side is negative - both are product states, not errors.
RiskMetrics-
StopVersionStop and take management (FR-TRADE-04, §4): every drag writes a full version into the journal (who, when, was, became). A drag over N steps produces N records - one per step - and the last record is the final level.
StopManagerOptions-
StopMeta-
TicketStateOrder panel pipeline (FR-TRADE-02/06/07, §2/§5): draft -> gates -> validation -> preview -> submit -> accepted / rejected / partially filled / filled. The gates run BEFORE the adapter, so a forbidden role, the readOnly mode, an incomplete request or a local shortage of funds never send anything (the negative tests count the adapter calls). Errors of the adapter arrive as TradingException and leave the pipeline in rejected with the kind.
TicketOutcome-
TicketOptions-
PaneOptions-
PaneRect-
VolumePaneOptionsOptions of the ready-made volume pane preset (P3).

Constants (197)

SymbolWhat it does
CANDLE_PATTERN_TITLES-
CANDLE_PATTERN_TITLES_KZ-
ALERT_CONDITION_METARegistry of the twelve conditions, ALT ids follow §1.
ALERT_SEVERITIES-
ALERT_CHANNELS-
ALERT_RULE_TYPES-
DEFAULT_ALERT_TEMPLATESDefault templates of the product (no personal data in either language).
AUTO_FIB_RATIOSRatios shown by the automatic retracement: the impulse ends are the line itself.
COMPARISON_TABLE_LIMIT-
DIVERGENCE_LOOKBACK-
DIVERGENCE_MAX_PAIRS-
DIVERGENCE_MIN_STRENGTH-
RS_WINDOW_POINTSPoints of the window the change of the ratio is measured over.
LEVEL_PERIOD_MSLength of a period in milliseconds: the same convention as scale/periods.
SWING_LOOKBACKBars on each side of a pivot; the classic five-bar fractal.
IMPULSE_ATR_SHAREShare of the ATR an impulse has to cover to count as significant.
EVENT_CLUSTER_GAP_PXDefault screen gap below which markers merge into a numbered group.
PAND_F_BOX_ATR_SHAREShare of the volatility that one box covers; a classic starting point.
PAND_F_MIN_REVERSALReversal columns needed to switch direction; two is the minimum that works.
PAND_F_RANGE_PERIODPeriod of the fallback average range when the host brings no ATR.
DRAWING_HISTORY_LIMITDefault history limit: fifty steps, §2. Hosts override it through the constructor argument - the panel reads the value back (history.limit), so one number is shown and enforced.
CUSTOM_TOOL_LIMIT-
FILL_PATTERNSThe registry: fifteen samples, the first four are the canonical set.
FILL_PATTERN_IDSIds of the registry, in the display order (the API grows additively).
DEFAULT_FILL_PATTERNPattern of a legacy style that never named one: the flat alpha fill.
POINT_MARKER_RADIUSRadius of the edit point markers ( §2); exported for custom tools.
HIT_TOLERANCE-
DRAWING_POINT_LIMIT-
MEASURE_LIMITPoints kept at once; beyond it the set refuses the click instead of forgetting.
EMPTY_MEASURE_SET-
PALETTE_RECENT_LIMITCap of the recent-tools list of the palette rail.
PALETTE_STATE_INITIAL-
DRAWING_LAYER_BUDGET_MSFrame budget for one layer rebuild, ms (ANALYSIS/03-NFR.md, §3).
DRAWING_SCHEMA_VERSIONDrawing snapshots and templates ( §4): a versioned JSON envelope with tolerant parsing - unknown fields are ignored, damaged objects are dropped with a message. Share payloads are encoded with a self contained base64 so the core stays environment agnostic (no btoa, no Buffer).
SHARE_COMPACT_PREFIXPrefix of the compressed share payloads; the legacy format has none.
STYLE_LIBRARY_LIMIT-
DRAWING_STYLE_STARTERSStarter sets: one canonical look per key tool class (idempotent load).
TEMPLATE_COMMAND_PREFIXPalette commands of the stored templates (PRO wave closure, CHT-13-04: "templates as commands"): the host ranks them with the other commands and calls TemplateLibrary.apply on the picked id. Command ids are prefixed, so they never collide with the built-in palette entries.
DRAWING_TOOLS-
CONTEXT_MENU_ACTIONSContext menu model (AUD-003, §6): the core supplies the item list and the enabled rules, the host renders and positions the menu and performs the actions. The canon items are bar values, add alert, add tool, reset scale and a PNG snapshot; titles come from the RU/EN locale pack.
EDGE_RESISTANCEDefault elastic resistance of the history edge, in share of the requested shift.
EDGE_MAX_OVERSHOOT_PXHard cap of the elastic overshoot, in pixels.
EDGE_RELEASE_FACTORShare of the remaining overshoot returned per frame; small enough to read.
LONG_PRESS_MSLong-press timing of §6: hold without movement opens the menu.
LONG_PRESS_SLOP_PX-
INITIAL_INTERACTION_STATE-
WHEEL_ZOOM_SPEEDWheel sensitivity: factor = exp(-deltaY * speed).
MARQUEE_MIN_PXA marquee narrower than this is a click, not a zoom.
NAV_KEYSKeys a keyboard-first host binds; Tab walks, Home/End jump.
PRO_KEYMAP-
KEY_COMMANDS-
HANDLED_KEYSKeys the chart consumes; the host uses the list to call preventDefault.
SNAP_TOLERANCE_PXDefault pull radius, in pixels.
SNAP_PRIORITYTie-break order at an equal distance: a session level outranks a bar value, a bar value outranks a plain line, a round price comes next and a shape edge is last (it is the least meaningful of the five).
TOOLTIP_HOLD_MSDefault hold of the hover card after the pointer leaves: five seconds.
TOOLTIP_HOLD_MAX_MSUpper bound of the hold window (a card must never stick forever).
TIMEFRAMES-
ANOMALY_DEFAULT_SHAREShare of the tape that belongs to the "large" tail by default.
AUCTION_DEFAULT_STEPFallback row height when the cells carry no usable price range.
TAPE_DEFAULT_WINDOW_MSDefault span of one window; the tape reads at second granularity.
TAPE_DEFAULT_COUNTDefault number of windows returned; the newest window comes last.
RIBBON_INTENSITY_MAXThe imbalance is bounded by construction, so the diverging scale is 1.
WASM_PILOT_EXPORTSRequired export names of the future module (checked before wiring it in).
LIVE_PROFILE_WINDOW_MAXUpper bound of the window the cache accepts, in bars.
SESSION_HISTORY_MAXSessions kept in the history, newest last.
PROFILE_BUDGET_P50_MSCold day profile budget of 260 000 bars, ms (NFR-PERF-05, §5).
PROFILE_BUDGET_P99_MS-
ADAPTIVE_CANDLE_MIN_SPACINGAt or above this many pixels per bar the chart keeps the candles.
ADAPTIVE_LINE_MAX_SPACINGAt or below this many pixels per bar the chart drops to the close line.
ADAPTIVE_RIBBON_HEIGHTHeight of the direction band of the ribbon mode, pixels.
ADAPTIVE_STRIP_HEIGHTHeight of the direction strip under the close line, pixels.
BOX_IQR_FACTORInterquartile factor of the whiskers (Tukey).
FAN_BAND_ALPHAAlpha of the widest band; narrower bands step up towards the median.
FAN_BAND_ALPHA_STEP-
FRONTIER_POINT_RADIUSCandidate dot radius; the current portfolio gets a larger marker.
FRONTIER_CURRENT_RADIUS-
FRONTIER_EPSILONCross-product tolerance of the hull test. A candidate that sits on the segment of its neighbours turns by less than this and is dropped, so a straight run of candidates reduces to its two ends even though floating point rarely produces an exact zero.
ANALYTIC_WINDOW_MIN_SHAREThe window never shrinks below this share of the full domain.
ANALYTIC_CLIP_MARGINPixels of margin kept around the plot; samples outside are skipped.
AXIS_LABEL_GAPFree space kept between two label boxes, px (portal density, §4).
MAX_TIME_LABELSTime labels asked for at most: the axis stays a ruler, not a wall of text.
MAX_PRICE_LABELSValue labels asked for at most (the pane height thins them further).
VAP_MIN_BODY_WIDTHSmallest body width in pixels that still carries readable VAP rows.
VAP_MAX_LEVELSRows per bar: the biggest levels survive the cap, the rest is dropped.
VAP_ROW_ALPHAAlpha of the VAP rows: readable over the body, never louder than it.
BODY_DEPTH_MIN_ALPHADepth shade of the emptiest bar and of the densest one (idea 1).
BODY_DEPTH_MAX_ALPHA-
MORPH_DURATION_MSLength of the fold; the host may pass its own, the policy keeps the default.
COMPARE_OVERLAY_LIMITSeries a reader can still tell apart on one plot.
COMPARE_MAX_POINTS_PER_SERIESPoints drawn per series at most. The window of a zoomed-out chart can hold a hundred thousand points: the painter walks them in even steps instead of mapping every one (the S7/ lesson - a per-point pass over the whole series is what blows a frame, not the drawing).
COMPARE_BASELINEBase of the rebasing; the comparison table of uses the same one.
HIDDEN_CROSSHAIR-
DATA_FLASH_MSDecay of a live-data highlight ( motion policy, ladder 160 ms).
BAR_FLASH_PEAKPeak alpha of the last-bar update highlight.
ALERT_FLASH_PEAKPeak alpha of the alert row flash.
DELTA_BACKGROUND_ALPHAAlpha of the background tint: present but never louder than the body.
EVENT_GLYPHSLetters of the badges; hosts may override any of them.
EVENT_LANE_HEIGHT-
EVENT_BADGE_SIZE-
EVENT_MIN_GAPBadges closer than this collapse into the leftmost one.
GRADIENT_DEFAULT_ANGLEDefault direction: top to bottom.
GRADIENT_MAX_PHASELongest distance a phase shift may move the ramp, as a share of the box.
GRID_PERIODS-
HEATMAP_TONES-
HEATMAP_MAX_ALPHAIntensity-to-alpha ceiling; keeps the palette colours readable.
HEATMAP_MIN_INTENSITYA cell below this intensity is not painted (keeps the frame cheap).
LEFT_FADE_SHAREShare of the plot width the fade covers when the host asks for true.
LEFT_FADE_MAXWidest fade the option accepts; a full cover would hide the data.
LEGEND_MIN_WIDTHPanes narrower than this hide the legend row entirely.
LEGEND_TOGGLE_SIZESide of the collapse chevron.
GRADIENT_TAIL_SHAREDefault share of the body and volume gradients (47-104).
CHART_GRADIENT_ANGLEDefault direction of the chart background gradient: top to bottom.
MINI_FIGURESCatalogue of the mini figures, in the order a page shows them.
ZOOM_STEP_MSDefault zoom step duration of motion policy.
MARKER_APPEAR_MSRising marker envelope: scale 0.6 -> 1 and alpha 0 -> 1 over 140 ms.
DRAWING_GHOST_MSGhost envelope of an object being placed or dragged.
FLASH_DECAY_MSFast decay of the new-bar flash over 160 ms (1 -> 0).
CROSSFADE_MSCrossfade window of a timeframe swap (CHT-15-08).
ORDERBOOK_CHART_VARIANTS-
AREA_GRADIENT_TOP_ALPHAArea gradient: 8 percent at the line, zero at the bottom (item 5).
PRICE_LINE_ACTIVE_WIDTHWidest stroke of an active line, in pixels.
PRICE_LINE_IDLE_ALPHA-
READOUT_LINE_HEIGHT-
READOUT_ROW_HEIGHT-
READOUT_PADDING-
CORRELATION_MAXCorrelation is bounded by definition, so the diverging scale is 1.
MONTE_CARLO_PATH_LIMITUpper bound on the simulated paths; a bigger request is clamped, not refused.
MONTE_CARLO_DEFAULT_PATHSDefault path count of a cone that stays inside the frame budget.
MONTE_CARLO_LEVELSQuantile levels of the bands, widest first (80% then 50%).
adaptiveSeries-
DELTA_MIN_ALPHABody alpha of the smallest meaningful delta; the largest reaches 1.
deltaCandlesSeries-
seriesTypesRegistry of the series types: the eight basic ones ( §5, S1 wave) plus the PRO set - the footprint cluster grid and the four non-standard looks (renko, kagi, pointAndFigure, lineBreak) - plus the analytic four (volumeCandles, lineWithMarkers, hlcArea, highLow) and the adaptive detail type (idea 9).
SERIES_RENDER_TYPESThe same list at runtime (AUD-010): hosts that receive a type from an attribute or plain JS validate membership against it instead of casting.
lollipopSeriesLollipop series (, idea 15): one dot per bar with a stem down to a baseline - the event look for dividends, reports and corporate actions. The baseline is the close of the first visible bar (comparison with the start of the period) unless the host passes lollipop.baseline.
splineSeriesSpline series (, idea 14): the smoothed close line for yields and indices. Runs of finite closes are smoothed on their own, so a gap in the data breaks the curve instead of drawing through it.
HEATMAP_CELL_MIN_WIDTHBelow this slot width the cells are unreadable and become column strips.
timePriceHeatmapSeriesHeatmap series: one filled rectangle per cell, the tone of the cell from the ladder of the theme and the alpha from the weight of the cell against the heaviest one on screen. A slot narrower than HEATMAP_CELL_MIN_WIDTH degrades to one strip per column (the same idea the delta block uses), because a cell thinner than a pixel is noise, not information.
TREND_MIN_ALPHAWeakest tint of the trend tone; the strongest reaches full alpha.
GHOST_ALPHAAlpha of the ghost stroke; it must stay behind the live series.
SPARKS_LIMITHard particle budget; further spawns are dropped while it is reached.
SPARK_LIFE_MSTime for a fresh particle to burn out, ms.
SPARK_STYLESThe ten presets. bengal (small sparkler sparks) is the light, fast and short-lived one; nova and sparkler are the widest, fountain throws upward, comet and shower are directional.
SPLINE_SEGMENT_SAMPLESSamples drawn per segment; enough for a smooth curve at any bar spacing.
CHART_STATE_KINDS-
STATE_MIN_PLOT_WIDTHPanes narrower or lower than these hide the state text.
STATE_MIN_PLOT_HEIGHT-
THEME_TOKENSTheme token to shell variable mapping.
DARK_THEME-
LIGHT_THEME-
ORANGE_THEMETerminal palette of the kit: black base with amber accent, a monospace readout and compact density. The font stack names only generic families and fonts already present on the platform - no third-party asset is referenced or shipped (, ). A leftover of the old amber palette is the amber accent itself; the surface, grid and typography are the terminal flavour requested for the orange name.
CORPORATE_THEMEBusiness palette of the six set: flat light surfaces, a neutral grey grid and a restrained corporate blue. Built for quarterly reporting, portfolio and screening layouts where the chart sits inside documents and dashboards rather than a terminal.
CAPITAL_MARKETS_THEMECapital-markets palette of the six set: charcoal surface, tight grid, muted green/red and a restrained brass accent - the density and restraint of a professional data vendor terminal, on our own colours.
UNIFIN_THEMEBrand palette of Unifin Charts (; owner wave 06.10.2026): the UNIFIN wordmark gradient - deep violet base, violet accent, the same two stops the portal paints its brand name with (#2700fe -> #cc06fb). Every gradient of the look pack derives its tail from this accent, so a chart in the brand style runs violet end to end, while up and down keep the trading green and red.
NEUTRAL_THEMEExtra neutral base of the library (P4): a flat, almost-black surface with a neutral grid, for terminal layouts. It is an option - the default stays DARK_THEME (navy) and the four kit palettes are unchanged.
CHART_THEMESNamed registry of the six shipped palettes (`` attribute accepts, so the menu order, the attribute values and the registry cannot drift apart.
BUILT_IN_THEMESThe six palettes shipped by the library, in menu order.
LOOK_BAR_PALETTESNamed bar palettes for the look pack. classic is a marker - the resolver keeps the live theme colours for it, so a white-label shell stays repaintable ( §1). Every other entry is a deliberate showcase palette.
LOOK_VOLUME_TONESVolume tones: theme is the classic pass-through, dim sinks the columns into a neutral shade, accent tints them with the palette accent and contrast uses a cool slate so the volumes read as a separate band.
LOOK_FONTSPopular reading fonts offered by the look pack (font option).
SYSTEM_THEME_NAMEName of the palette that follows the host preference (dark or light base).
SYSTEM_THEMEBase of the system alias: hosts swap it with systemTheme(prefersLight).
THEME_PALETTESSeven palettes of `` §1: the six shipped basses plus the system alias. The alias itself is resolved by the host, the core stays DOM free.
THEME_NAMESSelectable palette names, system included, in menu order (ThemeName).
VOLUME_MIN_PANEPanes below this height drop the layer entirely (volume-tiny edge).
VOLUME_MIN_COLUMNColumns shorter than this degrade to zero (volume-zero edge).
MAX_REPLAY_TICKS-
REPLAY_SPEEDS-
FUTURE_SLOTS_MAXCap of the empty space reserved for the bars to come.
GAP_MIN_MSShortest pause that counts as an empty zone; below it the chart is continuous.
GAP_SLIVER_PXWidth a compressed zone keeps, in pixels - visible, but not proportional.
DEFAULT_MONTHSFallback month row: the host passes its own pack for other locales.
RENDER_PROFILES-
LAYER_ORDER-
SCENE_TYPES-
KEYBOARD_MAP-
LOCALES-
API_SINCE_BY_GROUPthe group was introduced in (rules of the breaking-change policy).
API_STABILITY_OVERRIDESPer-symbol stability overrides; everything else is stable. The analytic layer is beta until the kit contracts (-) settle ( §9).
PUBLIC_API_EVENTSReal event names currently emitted by the core (DataController and the render backend). The product target of §9 is 62 events; the list grows as producers are added - the record keeps the honest delta.
SHORT_LINK_PREFIX-
SHARE_STATE_PREFIX-
SHARE_SHORT_PREFIX-
UNIFIN_CHARTS_VERSIONRuntime version (NFR-OPS-03): UNIFIN_CHARTS_VERSION is the single source used in error reports, and exposeVersion publishes the __UNIFIN_CHARTS_VERSION__ global the diagnostics convention expects. The constant must equal packages/chart-core/package.json - a test reads the manifest and fails on drift.
COMPARISON_LIMIT-
PLUGIN_LICENSES-
PLUGIN_DEFINITION_LIMIT-
TEMPLATE_LIMITRecord limit of the local catalogue ( §9 spirit).
TEMPLATE_STARTERSTen starter setups: id, title, presets and layout.
FIB_RATIOSFibonacci retracement levels: the seven classic ratios over a swing between two anchor prices. Pure maths - hosts paint the lines and format the labels; the element builds level overlays from this list.
RISK_ZONE_PATTERNZone fills of the risk and the profit side ( registry ids).
PROFIT_ZONE_PATTERN-
ORDER_TYPE_CATALOGUE-
DEFAULT_CONFIRMATION_THRESHOLDSSafe starting thresholds for hosts that want defaults, not a policy.
PAPER_DEFAULT_LEVERAGELeverage applied when the host gives none.
PAPER_MAX_LEVERAGEUpper bound of the leverage clamp, the catalog range of the platform.
MAX_PANESHard product limit from §3: no more than 16 panes.

Subpath @unifin/chart-core/workspace (81)

Imported as @unifin/chart-core/workspace; the subpaths of this table are self-contained: a host that does not need them does not pay for them.

Functions (30)

SymbolWhat it does
sliderShareToIndexBar index behind a share of the track; the share is clamped to 0..1.
paneAlertBadgesBadges per pane, most serious first. Alerts without a pane are ignored: the badge belongs to a pane and a host cannot place it anywhere else.
searchShortcutsShortcuts matching the query, best first. An empty query returns the list as it is, a query that matches nothing returns an empty list - never a guess.
indexToSliderShareShare of the track for a bar index; an out-of-range index is clamped.
auditOverlayRowsRows of the overlay; a poor feed or a slow request is marked as a warning.
buildExportLegend-
normalizeWeightsWeights that sum to 1; a layout of zeroes or a single pane stays usable.
scenarioFromReplaySteps in the order of the replay; ties keep the order of the input. An empty replay gives an empty scenario with zeroed bounds, never a phantom step.
narrateFrameSentence describing the state of the chart: instrument, visible window, price range, and how many series, drawings and notes sit on it.
frameGovernorDecisionTwo independent reasons to leave the frame: the picture is already below the rate, or the series is large enough that it will be. Without a worker the answer is always the main thread.
snapShareToSessionsHandle pulled to the nearest session boundary within tolerance shares.
groupAlertFeedGroup alerts of one instrument and kind that arrived within windowMs of each other. Groups are returned newest first; the sum of count always equals the number of the input items.
layersOfDrawings grouped by layer, unknown layers resolved to the default one.
resizePaneDrag the border under id by deltaPx: the pane grows and its neighbour shrinks, neither falls below PANE_MIN_SHARE, and the sum stays 1.
parseAssistantRequestCalls of the catalogue found in the phrase, in the order of the phrase. The numbers of the phrase go to the parameters the command declares first, so the result stays explainable.
projectLine-
exportFileNameFile name of an export: instrument, UTC timestamp, extension. The time has no colons (Windows refuses them) and the symbol keeps its letters and digits only.
frameBudgetRowsRows of the panel: p50 and p99 against the budget, plus the counted steps.
buildHeaderValuesValues of the visible fields; an unknown field is skipped, not rendered as NaN.
applyLayerStateDrawings with the layer rules applied. A missing layer leaves the object as it was: an unknown layer is a host mistake, not a reason to hide the user's work.
maximizePaneFull-screen pane: every other pane collapses, the layout is remembered.
restoreLayoutBack from full screen; a layout that was not maximised is returned as it is.
notesAtNotes grouped by the bar they fall on; a note off the history is dropped.
isMaximizedTrue when exactly one pane holds the whole workspace.
visibleHeaderFieldsFields to render: the required ones are added back in catalogue order, so a host layout can never drop the symbol.
addTimeNote-
removeTimeNote-
alignInstrumentLayersSeveral instruments on one axis: the axis unions their times, a missing bar is carried forward (a line does not jump back), a leading gap stays empty.
classOfInstrumentClass of an instrument: the explicit assetClass wins, the venue code is the fallback, anything else is other (a wrong guess is worse than a plain one).
templateForClassTemplate of a class, with the any template as the fallback.

Types (41)

SymbolWhat it does
SessionShareTime slider of the workspace (, idea 88): the track of the history in shares and the bar index behind it. Snapping keeps the handle on the session boundaries a trader expects, without leaving the range.
AlertSeverityAlert feed with grouping (, idea 84): a burst of the same alert on the same instrument becomes one row with a count, so the feed stays readable without losing a single event. Channels stay those of the platform.
ScenarioActionScenarios out of a replay (, idea 63): the actions a user made during a replay become an ordered list of steps a host can replay, export or turn into a test. The module copies nothing: it only names what happened.
AuditOverlayInputAudit overlay of the workspace (, idea 83): the rows a support engineer reads out loud - how much data is loaded, which quality level it has, how much markup sits on the chart. Values only, no internal identifiers.
ShortcutEntry-
FrameNarrationInput-
HeaderFieldId-
PaneAlertBadge-
AlertFeedItem-
ReplayEventInput-
LegendEntry-
AssistantCommandAssistant of the chart (, idea 100): a phrase in natural language becomes chart-as-code calls of the known catalogue. The module only returns data: it never runs the phrase, never calls the network and never builds a function from the text (eval and new Function are forbidden by the project rules). Unknown words are reported instead of guessed.
PaneSpec-
ProjectionPoint-
HeaderField-
ShortcutHit-
PaneLayout-
AlertGroup-
ExportLegendRow-
ScenarioStep-
AuditOverlayRow-
FrameGovernorInput-
ProjectionInput-
AssistantCall-
DrawingLayer-
Scenario-
LegendModel-
AssistantDraft-
LayerGroup-
FrameGovernorDecision-
Projection-
HeaderValue-
EffectiveDrawingEffective state of an object after the layer rules are applied.
FrameBudgetRow-
TimeNote-
BarNotes-
InstrumentSeries-
AlignedLayer-
AlignedLayers-
InstrumentClass-
DrawingTemplateRef-

Constants (10)

SymbolWhat it does
EXPORT_LEGEND_MAX_ROWSHard cap of legend rows: a chart with more series needs a summary, not a list.
FRAME_P99_BUDGET_MSFrame budget of p99, in milliseconds (ANALYSIS/03-NFR.md).
PANE_MIN_SHARESmallest share a pane keeps while resizing, in parts of the whole.
PROJECT_MAX_BARSHard cap of projected bars, whatever the host asks for.
WORKER_FPS_THRESHOLDBelow this observed rate the calculation leaves the frame.
WORKER_POINT_LIMITAbove this many points the calculation leaves the frame.
DEFAULT_LAYER_IDLayer of objects the host did not assign.
HEADER_FIELDS-
ASSISTANT_MAX_WORDSLongest phrase the assistant reads, in words; the rest is left unmatched.
INSTRUMENT_CLASSES-

On this page