@tidal-ts/chart 0.29.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/series.d.ts +12 -54
- package/dist/series.js +5 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
export { TimeSeriesChart, annotationInView, type ChartAnnotation, type ChartStats, type TimeSeriesChartProps, type TimeSeriesChartRow, } from './TimeSeriesChart.js';
|
|
15
15
|
export type { ChartSeries } from './types.js';
|
|
16
16
|
export { levelRole, levelRoles, rowLevelMarks, type ChartLevel, type ChartLevelLine, type ChartLevelRange, type ChartLevelStyle, type LevelLineMark, type LevelRoleStyle, type LevelWashMark, } from './levels.js';
|
|
17
|
-
export { configAxisId, effectiveSplit, formatSeriesValue, isStudySeries, LINE_WIDTHS, PAIR_JOINS, PAIR_LENSES, seriesAxisId, readsCompare, drawsAsCompare, isCompareSide, seriesDrawn, seriesCategoryStyle, seriesLineDashArray, seriesLineWidth, seriesOpacity, compareStyleOf, sharedAxisId, type AxisRange, effectiveAxisBounds, clampBoundsToLocks, barZeroLock, centerOnZero, axisRangeIsEmpty, axisFormat, fractionTicks, bandColumns, configBand, configColumns, configOutputs, configSpecs, dashPattern, fanIsBand, LINE_DASHES, OUTPUT_DASHES, outputKey, outputLook, publishedColumns, type ConfigOutput, type OutputLook, type OutputStyle, hasBarOutput, offersOutputBars, logAllowed, AXIS_PRECISIONS, type PairJoinOp, type PairLensOp, type SeriesGroup, type PairPartView, type PairView, type SeriesBinding, type SeriesConfig,
|
|
17
|
+
export { configAxisId, effectiveSplit, formatSeriesValue, isStudySeries, LINE_WIDTHS, PAIR_JOINS, PAIR_LENSES, seriesAxisId, readsCompare, drawsAsCompare, isCompareSide, seriesDrawn, seriesCategoryStyle, seriesLineDashArray, seriesLineWidth, seriesOpacity, compareStyleOf, sharedAxisId, type AxisRange, effectiveAxisBounds, clampBoundsToLocks, barZeroLock, centerOnZero, axisRangeIsEmpty, axisFormat, fractionTicks, bandColumns, configBand, configColumns, configOutputs, configSpecs, dashPattern, fanIsBand, LINE_DASHES, OUTPUT_DASHES, outputKey, outputLook, publishedColumns, type ConfigOutput, type OutputLook, type OutputStyle, hasBarOutput, offersOutputBars, logAllowed, AXIS_PRECISIONS, type PairJoinOp, type PairLensOp, type SeriesGroup, type PairPartView, type PairView, type SeriesBinding, type SeriesConfig, lineInput, type SeriesAxis, type SeriesStyle, type SeriesWindow, type CandleVariant, type ColorBy, readsFrom, sourcesOf, } from './series.js';
|
|
18
18
|
export { DEFAULT_CHART_SETTINGS, mergeChartSettings, type AnnotationOverride, type ChartSettings, type CategoryLineStyle, type SessionDividers, type SplitColorDefault, type LineDash, } from './chartSettings.js';
|
|
19
19
|
export { useMeasuredWidth, useMeasuredSize } from './useMeasuredWidth.js';
|
|
20
20
|
export { assembleRows, carries, foldKey, foldSources, foldSourcesReport, type SourceFoldReport, prepareChart, sourceFacts, type ConfigRow, type PreparedRow, type SourceFacts, type SourceHold, type SourceInput, type SourceInputs, } from './prepare.js';
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export { TimeSeriesChart, annotationInView, } from './TimeSeriesChart.js';
|
|
15
15
|
export { levelRole, levelRoles, rowLevelMarks, } from './levels.js';
|
|
16
|
-
export { configAxisId, effectiveSplit, formatSeriesValue, isStudySeries, LINE_WIDTHS, PAIR_JOINS, PAIR_LENSES, seriesAxisId, readsCompare, drawsAsCompare, isCompareSide, seriesDrawn, seriesCategoryStyle, seriesLineDashArray, seriesLineWidth, seriesOpacity, compareStyleOf, sharedAxisId, effectiveAxisBounds, clampBoundsToLocks, barZeroLock, centerOnZero, axisRangeIsEmpty, axisFormat, fractionTicks, bandColumns, configBand, configColumns, configOutputs, configSpecs, dashPattern, fanIsBand, LINE_DASHES, OUTPUT_DASHES, outputKey, outputLook, publishedColumns, hasBarOutput, offersOutputBars, logAllowed, AXIS_PRECISIONS,
|
|
16
|
+
export { configAxisId, effectiveSplit, formatSeriesValue, isStudySeries, LINE_WIDTHS, PAIR_JOINS, PAIR_LENSES, seriesAxisId, readsCompare, drawsAsCompare, isCompareSide, seriesDrawn, seriesCategoryStyle, seriesLineDashArray, seriesLineWidth, seriesOpacity, compareStyleOf, sharedAxisId, effectiveAxisBounds, clampBoundsToLocks, barZeroLock, centerOnZero, axisRangeIsEmpty, axisFormat, fractionTicks, bandColumns, configBand, configColumns, configOutputs, configSpecs, dashPattern, fanIsBand, LINE_DASHES, OUTPUT_DASHES, outputKey, outputLook, publishedColumns, hasBarOutput, offersOutputBars, logAllowed, AXIS_PRECISIONS, lineInput, readsFrom, sourcesOf, } from './series.js';
|
|
17
17
|
export { DEFAULT_CHART_SETTINGS, mergeChartSettings, } from './chartSettings.js';
|
|
18
18
|
export { useMeasuredWidth, useMeasuredSize } from './useMeasuredWidth.js';
|
|
19
19
|
export { assembleRows, carries, foldKey, foldSources, foldSourcesReport, prepareChart, sourceFacts, } from './prepare.js';
|
package/dist/series.d.ts
CHANGED
|
@@ -327,79 +327,37 @@ export interface SeriesConfig {
|
|
|
327
327
|
* the comparison, has nothing to restore.
|
|
328
328
|
*/
|
|
329
329
|
compareFn?: PairOp;
|
|
330
|
-
/**
|
|
331
|
-
* What a compare reads as its other side (inB), when it is **wired by hand**
|
|
332
|
-
* rather than automatic. Absent ⇒ automatic: the same chain on the
|
|
333
|
-
* comparison symbol. Set ⇒ the output of the config `id`, read on the
|
|
334
|
-
* primary symbol or on the comparison (`side`) — `iv21` against `hv21`, or
|
|
335
|
-
* against `close` with a `ratio`. Set on the ROOT of a chain, like
|
|
336
|
-
* {@link compareFn}; the studies on the metric mirror onto this input, and a
|
|
337
|
-
* function joins the metric with it.
|
|
338
|
-
*
|
|
339
|
-
* Saved with the config, and kept when the comparison goes away: like the
|
|
340
|
-
* function, it sleeps until there is a comparison again. The host does the
|
|
341
|
-
* wiring at render time and treats an `id` that no longer exists as
|
|
342
|
-
* automatic. The terminal machine drops a wiring as soon as the other side
|
|
343
|
-
* is removed or the line it reads stops being drawn: it joins a pair, or a
|
|
344
|
-
* wiring with no {@link CompareWith.output} finds it drawing several lines,
|
|
345
|
-
* or the named line is no longer one of its lines.
|
|
346
|
-
*
|
|
347
|
-
* The other side is read as its own PLAIN output, never its compare — so
|
|
348
|
-
* two metrics wired to each other, or a metric wired to its own study, form
|
|
349
|
-
* no cycle.
|
|
350
|
-
*
|
|
351
|
-
* The other config may be on **another source** (ATM vol against realized
|
|
352
|
-
* vol on price). The host rebinds its input under `sourcePrefix(source)`
|
|
353
|
-
* (`~price_close`) before any symbol prefix, and the fold joins that
|
|
354
|
-
* source's raw columns onto the metric's rows; its spec runs there, on the
|
|
355
|
-
* metric's rows, like every other part of a compare.
|
|
356
|
-
*/
|
|
357
|
-
compareWith?: CompareWith;
|
|
358
330
|
/**
|
|
359
331
|
* The symbol a compare's other side (inB) is **locked** to — `SPY` — in
|
|
360
|
-
* place of the bar's comparison. Absent ⇒ inB reads the comparison
|
|
361
|
-
*
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
*
|
|
332
|
+
* place of the bar's comparison. Absent ⇒ inB reads the comparison. A lock
|
|
333
|
+
* belongs to a DATA SOURCE, not a line (the terminal's `sourceLocks`): the
|
|
334
|
+
* host stamps it at render time onto every line of a locked source, so
|
|
335
|
+
* nothing here is saved with the config. What it means, which the host
|
|
336
|
+
* builds as it does the rest of a compare: the other side is the same chain
|
|
337
|
+
* on this symbol.
|
|
366
338
|
*
|
|
367
339
|
* Unlike the rest of a compare it never SLEEPS: it does not depend on the
|
|
368
340
|
* bar, so it draws with no comparison named. The host fetches the symbol,
|
|
369
341
|
* hands it to the fold as `SourceInput.pinned`, and rebinds the chain onto
|
|
370
342
|
* its columns with `underPrefix(input, pinnedPrefix(symbol))`
|
|
371
|
-
* (`cmp_@SPY_close`).
|
|
372
|
-
* carried by a preset, the one symbol a preset carries.
|
|
343
|
+
* (`cmp_@SPY_close`).
|
|
373
344
|
*/
|
|
374
345
|
compareOn?: string;
|
|
375
346
|
}
|
|
376
|
-
/** A compare's hand-wired other side — see {@link SeriesConfig.compareWith}. */
|
|
377
|
-
export interface CompareWith {
|
|
378
|
-
/** The config whose output is the other side. */
|
|
379
|
-
id: string;
|
|
380
|
-
/** Read on the primary symbol, or on the comparison. */
|
|
381
|
-
side: 'primary' | 'comparison';
|
|
382
|
-
/**
|
|
383
|
-
* Which of its lines, when the other config draws several — a Bollinger's
|
|
384
|
-
* `Upper`, one column of a data node drawing open and close, one output of
|
|
385
|
-
* a fanned study — by the name {@link configOutputs} gives it. Absent for a
|
|
386
|
-
* config with one line.
|
|
387
|
-
*/
|
|
388
|
-
output?: string;
|
|
389
|
-
}
|
|
390
347
|
/**
|
|
391
|
-
*
|
|
392
|
-
*
|
|
348
|
+
* The input that reads ONE drawn line of `other` — what a spec names it by
|
|
349
|
+
* when it reads that line (a compare's side): its spec or its raw column for
|
|
350
|
+
* one line;
|
|
393
351
|
* for one line of several, the column, the fanned spec or the PICKED output
|
|
394
352
|
* that is that line. Only a line the config DRAWS ({@link configColumns}):
|
|
395
353
|
* not a Bollinger's hidden middle, nor a third column of a two-line band.
|
|
396
354
|
*
|
|
397
355
|
* `null` when `output` names none of its drawn lines, or is missing for a
|
|
398
356
|
* config that draws several. A data node back to ONE column still answers to
|
|
399
|
-
* that column's name, so a
|
|
357
|
+
* that column's name, so a reader of `close` survives the node dropping
|
|
400
358
|
* `open`.
|
|
401
359
|
*/
|
|
402
|
-
export declare function
|
|
360
|
+
export declare function lineInput(other: Pick<SeriesConfig, 'column' | 'derive' | 'fan' | 'style' | 'bandMiddle'>, output?: string): DeriveInput | null;
|
|
403
361
|
/** The textures in display order. */
|
|
404
362
|
export declare const LINE_DASHES: readonly LineDash[];
|
|
405
363
|
/** Ink for ONE output of a multi-output config — see
|
package/dist/series.js
CHANGED
|
@@ -155,18 +155,19 @@ import { BAND_OUTPUTS, BAR_PRICE_COLUMNS, COMPARE_PREFIX, deriveId, hasPairOp, i
|
|
|
155
155
|
// The app-wide presentation defaults the category resolvers below read.
|
|
156
156
|
import { DEFAULT_CHART_SETTINGS, } from './chartSettings.js';
|
|
157
157
|
/**
|
|
158
|
-
*
|
|
159
|
-
*
|
|
158
|
+
* The input that reads ONE drawn line of `other` — what a spec names it by
|
|
159
|
+
* when it reads that line (a compare's side): its spec or its raw column for
|
|
160
|
+
* one line;
|
|
160
161
|
* for one line of several, the column, the fanned spec or the PICKED output
|
|
161
162
|
* that is that line. Only a line the config DRAWS ({@link configColumns}):
|
|
162
163
|
* not a Bollinger's hidden middle, nor a third column of a two-line band.
|
|
163
164
|
*
|
|
164
165
|
* `null` when `output` names none of its drawn lines, or is missing for a
|
|
165
166
|
* config that draws several. A data node back to ONE column still answers to
|
|
166
|
-
* that column's name, so a
|
|
167
|
+
* that column's name, so a reader of `close` survives the node dropping
|
|
167
168
|
* `open`.
|
|
168
169
|
*/
|
|
169
|
-
export function
|
|
170
|
+
export function lineInput(other, output) {
|
|
170
171
|
const drawn = new Set(configColumns(other));
|
|
171
172
|
const lines = configOutputs(other).filter((o) => drawn.has(o.column));
|
|
172
173
|
const several = lines.length > 1 || other.style === 'band' || other.style === 'lines';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tidal-ts/chart",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "TimeSeriesChart — a multi-row time-series chart on @pond-ts/charts, plus the series and settings vocabulary and the prepare step. Theme, colours and settings arrive as props.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"react": "^18.2.0 || ^19.0.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@tidal-ts/core": "0.
|
|
41
|
+
"@tidal-ts/core": "0.31.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@pond-ts/charts": "^0.78.0",
|