@spectrum-charts/vega-spec-builder-s2 0.1.0 → 0.2.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/@types/src/axis/axisReferenceLineUtils.d.ts +15 -38
- package/dist/@types/src/axis/axisReferenceLineUtils.d.ts.map +1 -1
- package/dist/@types/src/axis/axisSpecBuilder.d.ts.map +1 -1
- package/dist/@types/src/bar/barUtils.d.ts +8 -2
- package/dist/@types/src/bar/barUtils.d.ts.map +1 -1
- package/dist/@types/src/chartSpecBuilder.d.ts.map +1 -1
- package/dist/@types/src/line/lineMarkUtils.d.ts +4 -0
- package/dist/@types/src/line/lineMarkUtils.d.ts.map +1 -1
- package/dist/@types/src/line/linePointUtils.d.ts +2 -38
- package/dist/@types/src/line/linePointUtils.d.ts.map +1 -1
- package/dist/@types/src/line/lineSpecBuilder.d.ts.map +1 -1
- package/dist/@types/src/line/lineTestUtils.d.ts.map +1 -1
- package/dist/@types/src/line/lineUtils.d.ts +4 -1
- package/dist/@types/src/line/lineUtils.d.ts.map +1 -1
- package/dist/@types/src/lineDirectLabel/index.d.ts +2 -0
- package/dist/@types/src/lineDirectLabel/index.d.ts.map +1 -0
- package/dist/@types/src/lineDirectLabel/lineDirectLabelUtils.d.ts +15 -0
- package/dist/@types/src/lineDirectLabel/lineDirectLabelUtils.d.ts.map +1 -0
- package/dist/@types/src/lineDirectLabel/lineDirectLabelUtils.test.d.ts +2 -0
- package/dist/@types/src/lineDirectLabel/lineDirectLabelUtils.test.d.ts.map +1 -0
- package/dist/@types/src/trendline/trendlineTestUtils.d.ts.map +1 -1
- package/dist/@types/src/types/axis/referenceLineSpec.types.d.ts +2 -21
- package/dist/@types/src/types/axis/referenceLineSpec.types.d.ts.map +1 -1
- package/dist/@types/src/types/marks/barSpec.types.d.ts +6 -0
- package/dist/@types/src/types/marks/barSpec.types.d.ts.map +1 -1
- package/dist/@types/src/types/marks/lineSpec.types.d.ts +10 -1
- package/dist/@types/src/types/marks/lineSpec.types.d.ts.map +1 -1
- package/dist/@types/src/types/marks/supplemental/index.d.ts +1 -0
- package/dist/@types/src/types/marks/supplemental/index.d.ts.map +1 -1
- package/dist/@types/src/types/marks/supplemental/lineDirectLabelSpec.types.d.ts +41 -0
- package/dist/@types/src/types/marks/supplemental/lineDirectLabelSpec.types.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -7
|
@@ -1,50 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AxisSpecOptions,
|
|
1
|
+
import { Mark, NumericValueRef, PathMark, ProductionRule, RuleMark, ScaleType, SignalRef, TextMark } from 'vega';
|
|
2
|
+
import { AxisSpecOptions, ReferenceLineSpecOptions } from '../types';
|
|
3
3
|
export declare const getReferenceLines: (axisOptions: AxisSpecOptions) => ReferenceLineSpecOptions[];
|
|
4
4
|
export declare const scaleTypeSupportsReferenceLines: (scaleType: ScaleType | undefined) => boolean;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
/**
|
|
6
|
+
* S2 reference lines are horizontal only — only emits marks for vertical axes (left/right).
|
|
7
|
+
*/
|
|
8
|
+
export declare const getReferenceLineMarks: (axisOptions: AxisSpecOptions, scaleName: string) => Mark[];
|
|
9
9
|
export declare const getPositionEncoding: ({ scaleType }: AxisSpecOptions, { value, position }: ReferenceLineSpecOptions, scaleName: string) => ProductionRule<NumericValueRef> | SignalRef;
|
|
10
|
-
export declare const getReferenceLineRuleMark: ({ position, ticks }: AxisSpecOptions, { color, colorScheme, name, lineType }: ReferenceLineSpecOptions, positionEncoding: ProductionRule<NumericValueRef> | SignalRef) => RuleMark;
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
13
|
-
* @param AxisSpecOptions
|
|
14
|
-
* @param ReferenceLineSpecOptions
|
|
15
|
-
* @param referenceLineIndex
|
|
16
|
-
* @param positionEncoding
|
|
17
|
-
* @returns SymbolMark
|
|
11
|
+
* Horizontal rule line — spans from x: 5 to x2: width - 5 (aligned with caps).
|
|
18
12
|
*/
|
|
19
|
-
export declare const
|
|
13
|
+
export declare const getReferenceLineRuleMark: ({ colorScheme }: AxisSpecOptions, { name }: ReferenceLineSpecOptions, positionEncoding: ProductionRule<NumericValueRef> | SignalRef) => RuleMark;
|
|
20
14
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @param AxisSpecOptions
|
|
23
|
-
* @param ReferenceLineSpecOptions
|
|
24
|
-
* @param referenceLineIndex
|
|
25
|
-
* @param positionEncoding
|
|
26
|
-
* @returns TextMark
|
|
15
|
+
* Left-pointing arrow cap at the left edge of the chart area.
|
|
27
16
|
*/
|
|
28
|
-
export declare const
|
|
17
|
+
export declare const getReferenceLineStartCapMark: (_axisOptions: AxisSpecOptions, { colorScheme, name }: ReferenceLineSpecOptions, positionEncoding: ProductionRule<NumericValueRef> | SignalRef) => PathMark;
|
|
29
18
|
/**
|
|
30
|
-
*
|
|
31
|
-
* @param labelFontWeight
|
|
32
|
-
* @param label
|
|
33
|
-
* @param position
|
|
34
|
-
* @param positionEncoding
|
|
35
|
-
* @param icon
|
|
36
|
-
* @returns updateEncoding
|
|
19
|
+
* Right-pointing arrow cap at the right edge of the chart area.
|
|
37
20
|
*/
|
|
38
|
-
export declare const
|
|
39
|
-
label: string;
|
|
40
|
-
}, positionEncoding: ProductionRule<NumericValueRef> | SignalRef) => GuideEncodeEntry<TextEncodeEntry>;
|
|
21
|
+
export declare const getReferenceLineEndCapMark: (_axisOptions: AxisSpecOptions, { colorScheme, name }: ReferenceLineSpecOptions, positionEncoding: ProductionRule<NumericValueRef> | SignalRef) => PathMark;
|
|
41
22
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* If this is a vertical axis, it will return the correct baseline property and value
|
|
45
|
-
* Otherwise, it will return the correct align property and value
|
|
46
|
-
* @param position
|
|
47
|
-
* @returns align | baseline
|
|
23
|
+
* Two text marks: background halo then foreground.
|
|
24
|
+
* Label is below the line, right-aligned, with S2 typography.
|
|
48
25
|
*/
|
|
49
|
-
export declare const
|
|
26
|
+
export declare const getReferenceLineTextMark: ({ colorScheme, label, name }: ReferenceLineSpecOptions, positionEncoding: ProductionRule<NumericValueRef> | SignalRef) => TextMark[];
|
|
50
27
|
//# sourceMappingURL=axisReferenceLineUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axisReferenceLineUtils.d.ts","sourceRoot":"","sources":["../../../../src/axis/axisReferenceLineUtils.ts"],"names":[],"mappings":"AAWA,OAAO,
|
|
1
|
+
{"version":3,"file":"axisReferenceLineUtils.d.ts","sourceRoot":"","sources":["../../../../src/axis/axisReferenceLineUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAajH,OAAO,EAAE,eAAe,EAAwB,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAG3F,eAAO,MAAM,iBAAiB,gBAAiB,eAAe,KAAG,wBAAwB,EAIxF,CAAC;AAYF,eAAO,MAAM,+BAA+B,cAAe,SAAS,GAAG,SAAS,KAAG,OAGlF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,gBACnB,eAAe,aACjB,MAAM,KAChB,IAAI,EAgBN,CAAC;AAEF,eAAO,MAAM,mBAAmB,kBACf,eAAe,uBACT,wBAAwB,aAClC,MAAM,KAChB,eAAe,eAAe,CAAC,GAAG,SAYpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,oBAClB,eAAe,YACtB,wBAAwB,oBAChB,eAAe,eAAe,CAAC,GAAG,SAAS,KAC5D,QAmBF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,iBACzB,eAAe,yBACN,wBAAwB,oBAC7B,eAAe,e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;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,IAAI,EACV,mBAAmB,EAAE,OAAO,EAC5B,SAAS,EAAE,MAAM,EACjB,gBAAgB,EAAE,MAAM,EAAE,EAC1B,WAAW,GAAE,WAAkC,QAYhD;AAED,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;GAKG;AACH,eAAO,MAAM,OAAO;eAIH,MAAM;;;cAGP,QAAQ;YAwHtB,CAAC;AAyCH,eAAO,MAAM,YAAY;eAIR,MAAM;;;;;cAKP,QAAQ;YA8BtB,CAAC;AA2DH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,UAAQ,GAAG,IAAI,CAGlE"}
|
|
@@ -20,9 +20,15 @@ export declare const getCornerRadiusEncodings: (options: BarSpecOptions) => Rect
|
|
|
20
20
|
export declare const getStackedCornerRadiusEncodings: ({ name, metric, hasSquareCorners, }: BarSpecOptions) => RectEncodeEntry;
|
|
21
21
|
export declare const rotateRectClockwiseIfNeeded: (rectEncodeEntry: RectEncodeEntry, { orientation }: BarSpecOptions) => RectEncodeEntry;
|
|
22
22
|
export declare const getBaseBarEnterEncodings: (options: BarSpecOptions) => EncodeEntry;
|
|
23
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Returns the Vega fill encoding for the bar. When {@link BarSpecOptions.colorOverride} is set
|
|
25
|
+
* it takes precedence and the bar fill is taken from that data field (one color per row).
|
|
26
|
+
* Otherwise fill is from the color scale via {@link getColorProductionRule} using {@link BarSpecOptions.color}.
|
|
27
|
+
*/
|
|
28
|
+
export declare const getBarFillEncoding: (options: BarSpecOptions) => ColorValueRef;
|
|
29
|
+
export declare const getBarEnterEncodings: (options: BarSpecOptions) => EncodeEntry;
|
|
24
30
|
export declare const getBarUpdateEncodings: (options: BarSpecOptions) => EncodeEntry;
|
|
25
|
-
export declare const getStroke: (
|
|
31
|
+
export declare const getStroke: (options: BarSpecOptions) => ProductionRule<ColorValueRef>;
|
|
26
32
|
export declare const getDimensionSelectionRing: (options: BarSpecOptions) => RectMark;
|
|
27
33
|
export declare const getStrokeDash: ({ chartPopovers, idKey, lineType }: BarSpecOptions) => ProductionRule<ArrayValueRef>;
|
|
28
34
|
export declare const getStrokeWidth: ({ chartPopovers, idKey, lineWidth, name, }: BarSpecOptions) => ProductionRule<NumericValueRef>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"barUtils.d.ts","sourceRoot":"","sources":["../../../../src/bar/barUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,aAAa,EACb,aAAa,EACb,WAAW,EACX,SAAS,EACT,eAAe,EACf,cAAc,EACd,eAAe,EACf,QAAQ,EACT,MAAM,MAAM,CAAC;AAyBd,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,iCAAkC,cAAc,KAAG,OAEjF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,YAAa,cAAc,YAGvD,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAAa,cAAc,KAAG,SAoC5D,CAAC;AAEF,eAAO,MAAM,2BAA2B,YAAa,cAAc,KAAG,eAUrE,CAAC;AAEF,eAAO,MAAM,8BAA8B,YAAa,cAAc,KAAG,eAOxE,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAAa,cAAc,KAAG,eA2C5D,CAAC;AAEF,eAAO,MAAM,yBAAyB,YAAa,cAAc,KAAG,eAgDnE,CAAC;AAEF,eAAO,MAAM,wBAAwB,YAAa,cAAc,KAAG,eAmBlE,CAAC;AAEF,eAAO,MAAM,+BAA+B,wCAIzC,cAAc,KAAG,eAYnB,CAAC;AAEF,eAAO,MAAM,2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MAAM,mBAAmB,iBAAkB,YAAY,KAAG,YAMhE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,gBAAiB,CAAC,UAAU,EAAE,UAAU,CAAC,KAAG,WAMzE,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,gBAAiB,CAAC,UAAU,EAAE,UAAU,CAAC,KAAG,WAM9E,CAAC;AAEH,eAAO,MAAM,iBAAiB,eAAgB,SAAS,EAAE,KAAG,YAG3D,CAAC;AAEF,eAAO,MAAM,eAAe,eAAgB,SAAS,KAAG,YAAY,GAAG,UAatE,CAAC;AAiBF;;GAEG;AACH,eAAO,MAAM,OAAO;YAA8B,MAAM,EAAE;YAsBxD,CAAC;AAEH,eAAO,MAAM,YAAY,WAAY,WAAW,yBAE/C,CAAC;AAEF,eAAO,MAAM,QAAQ,WAAY,WAAW,qBAE3C,CAAC;AAEF,eAAO,MAAM,eAAe,cAAe,SAAS,4BAEnD,CAAC;AAEF,eAAO,MAAM,iBAAiB,aAAc,QAAQ,GAAG,QAAQ,EAAE,yBAEhE,CAAC;AAEF,eAAO,MAAM,aAAa,cAAe,SAAS,0BAEjD,CAAC;AAEF,eAAO,MAAM,kBAAkB,iBAAkB,YAAY,6BAE5D,CAAC"}
|
|
@@ -7,6 +7,10 @@ import { LineMarkOptions } from './lineUtils';
|
|
|
7
7
|
* @returns Y encoding with conditional scale selection for dual metric axis
|
|
8
8
|
*/
|
|
9
9
|
export declare const getLineYEncoding: (lineMarkOptions: LineMarkOptions, metric: string) => ProductionRule<NumericValueRef>;
|
|
10
|
+
/**
|
|
11
|
+
* Generates an area mark with a gradient fill beneath the line, fading from the line's color to transparent.
|
|
12
|
+
*/
|
|
13
|
+
export declare const getLineGradientMark: (lineMarkOptions: LineMarkOptions, dataSource: string) => Mark;
|
|
10
14
|
/**
|
|
11
15
|
* generates a line mark
|
|
12
16
|
* @param lineOptions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineMarkUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/lineMarkUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,cAAc,EAAY,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"lineMarkUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/lineMarkUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,EAAE,cAAc,EAAY,MAAM,MAAM,CAAC;AAqCjF,OAAO,EAAoB,eAAe,EAAE,MAAM,aAAa,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,oBAAqB,eAAe,UAAU,MAAM,KAAG,eAAe,eAAe,CAqBjH,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,mBAAmB,oBAAqB,eAAe,cAAc,MAAM,KAAG,IA0B1F,CAAC;AAmBF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,oBAAqB,eAAe,cAAc,MAAM,KAAG,QA0ClF,CAAC;AAEF,eAAO,MAAM,cAAc,wHAOxB,eAAe,KAAG,eAAe,eAAe,CAgDlD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,gBACf,eAAe,cAChB,MAAM,+BACW,MAAM,KAClC,IAAI,EAgBN,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { LineSpecOptions
|
|
1
|
+
import { SymbolMark } from 'vega';
|
|
2
|
+
import { LineSpecOptions } from '../types';
|
|
3
3
|
import { LineMarkOptions } from './lineUtils';
|
|
4
4
|
/**
|
|
5
5
|
* Gets the point mark for static points on a line chart.
|
|
@@ -32,40 +32,4 @@ export declare const getSelectionPoint: (lineOptions: LineMarkOptions) => Symbol
|
|
|
32
32
|
* @returns SymbolMark
|
|
33
33
|
*/
|
|
34
34
|
export declare const getSecondaryHighlightPoint: (lineOptions: LineMarkOptions, secondaryHighlightedMetric: string) => SymbolMark;
|
|
35
|
-
/**
|
|
36
|
-
* gets the fill color for the highlighted point
|
|
37
|
-
* @param lineMarkOptions
|
|
38
|
-
* @returns fill rule
|
|
39
|
-
*/
|
|
40
|
-
export declare const getHighlightPointFill: (markOptions: LineMarkOptions) => ProductionRuleTests<ColorValueRef>;
|
|
41
|
-
/**
|
|
42
|
-
* gets the stroke color for the highlighted point
|
|
43
|
-
* @param lineMarkOptions
|
|
44
|
-
* @returns stroke rule
|
|
45
|
-
*/
|
|
46
|
-
export declare const getHighlightPointStroke: (markOptions: LineMarkOptions) => ProductionRuleTests<ColorValueRef>;
|
|
47
|
-
/**
|
|
48
|
-
* gets the stroke opacity for the highlighted point
|
|
49
|
-
* @param lineMarkOptions
|
|
50
|
-
* @returns stroke opacity rule
|
|
51
|
-
*/
|
|
52
|
-
export declare const getHighlightPointStrokeOpacity: ({ opacity, staticPoint, }: LineMarkOptions) => ProductionRuleTests<NumericValueRef>;
|
|
53
|
-
/**
|
|
54
|
-
* gets the size for the highlighted point
|
|
55
|
-
* @param lineMarkOptions
|
|
56
|
-
* @returns size rule
|
|
57
|
-
*/
|
|
58
|
-
export declare const getHighlightPointSize: ({ staticPoint }: LineMarkOptions) => ProductionRuleTests<NumericValueRef>;
|
|
59
|
-
/**
|
|
60
|
-
* gets the stroke width for the highlighted point
|
|
61
|
-
* @param lineMarkOptions
|
|
62
|
-
* @returns stroke width rule
|
|
63
|
-
*/
|
|
64
|
-
export declare const getHighlightPointStrokeWidth: ({ staticPoint, }: LineMarkOptions) => ProductionRuleTests<NumericValueRef>;
|
|
65
|
-
/**
|
|
66
|
-
* Gets point that is used for the selection ring.
|
|
67
|
-
* @param lineMarkOptions
|
|
68
|
-
* @returns SymbolMark
|
|
69
|
-
*/
|
|
70
|
-
export declare const getSelectRingPoint: (lineOptions: LineMarkOptions) => SymbolMark;
|
|
71
35
|
//# sourceMappingURL=linePointUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linePointUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/linePointUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"linePointUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/linePointUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAUlC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,gBAAiB,eAAe,KAAG,UA4BjE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,gBAAiB,eAAe,KAAG,UAoB1E,CAAC;AAwBF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,gBAAiB,eAAe,KAAG,UAEhE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,gBAAiB,eAAe,KAAG,UAEhE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,gBACxB,eAAe,8BACA,MAAM,KACjC,UAmBF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineSpecBuilder.d.ts","sourceRoot":"","sources":["../../../../src/line/lineSpecBuilder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"lineSpecBuilder.d.ts","sourceRoot":"","sources":["../../../../src/line/lineSpecBuilder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AA2BjD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAM9F,eAAO,MAAM,OAAO;;;;WAOP,MAAM;;YA4ElB,CAAC;AAEF,eAAO,MAAM,OAAO,oDAsBlB,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB,SAAU,IAAI,EAAE,WAAW,eAAe,SAqB3E,CAAC;AAEF,eAAO,MAAM,UAAU,wDAarB,CAAC;AAEH,eAAO,MAAM,SAAS,sDA0BpB,CAAC;AAGH,eAAO,MAAM,YAAY,oDA8BvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineTestUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/lineTestUtils.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,eAAO,MAAM,sBAAsB,EAAE,eAWpC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"lineTestUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/lineTestUtils.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,eAAO,MAAM,sBAAsB,EAAE,eAWpC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,eAsBhC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BarAnnotationOptions, ChartPopoverOptions, ChartTooltipOptions, ColorFacet, ColorScheme, DonutSummaryOptions, HighlightedItem, InteractionMode, LineTypeFacet, LineWidthFacet, MetricRangeOptions, OpacityFacet, ScaleType, ScatterPathOptions, SegmentLabelOptions, TrendlineOptions } from '../types';
|
|
1
|
+
import { BarAnnotationOptions, ChartPopoverOptions, ChartTooltipOptions, ColorFacet, ColorScheme, DonutSummaryOptions, HighlightedItem, InteractionMode, LineTypeFacet, LineWidthFacet, MetricRangeOptions, OpacityFacet, ScaleType, ScatterPathOptions, SegmentLabelOptions, TrendlineOptions, InterpolationType } from '../types';
|
|
2
2
|
export declare const getPopoverMarkName: (chartPopovers: ChartPopoverOptions[], lineName: string) => string | undefined;
|
|
3
3
|
/**
|
|
4
4
|
* Checks if the line chart is a dual metric axis chart
|
|
@@ -19,6 +19,7 @@ export interface LineMarkOptions {
|
|
|
19
19
|
displayOnHover?: boolean;
|
|
20
20
|
donutSummaries?: DonutSummaryOptions[];
|
|
21
21
|
dualMetricAxis?: boolean;
|
|
22
|
+
gradient?: boolean;
|
|
22
23
|
hasOnClick?: boolean;
|
|
23
24
|
highlightedItem?: HighlightedItem;
|
|
24
25
|
idKey: string;
|
|
@@ -33,11 +34,13 @@ export interface LineMarkOptions {
|
|
|
33
34
|
metricRanges?: MetricRangeOptions[];
|
|
34
35
|
name: string;
|
|
35
36
|
opacity: OpacityFacet;
|
|
37
|
+
pointSize?: number;
|
|
36
38
|
popoverMarkName?: string;
|
|
37
39
|
scaleType: ScaleType;
|
|
38
40
|
scatterPaths?: ScatterPathOptions[];
|
|
39
41
|
segmentLabels?: SegmentLabelOptions[];
|
|
40
42
|
staticPoint?: string;
|
|
41
43
|
trendlines?: TrendlineOptions[];
|
|
44
|
+
interpolate?: InterpolationType;
|
|
42
45
|
}
|
|
43
46
|
//# sourceMappingURL=lineUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/lineUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"lineUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/lineUtils.ts"],"names":[],"mapp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B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,SAAS,CAAC;IACrB,YAAY,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACpC,aAAa,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lineDirectLabel/index.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Data, Mark } from 'vega';
|
|
2
|
+
import { LineDirectLabelOptions, LineDirectLabelSpecOptions, LineSpecOptions } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Derived dataset: one row per series at the last (max-dimension) data point.
|
|
5
|
+
*/
|
|
6
|
+
export declare const getLineDirectLabelData: (lineName: string, labelOptions: LineDirectLabelSpecOptions, lineOptions: LineSpecOptions) => Data;
|
|
7
|
+
/**
|
|
8
|
+
* Text marks: background stroke halo + foreground fill, placed at the end of each line series.
|
|
9
|
+
*/
|
|
10
|
+
export declare const getLineDirectLabelMarks: (lineName: string, labelOptions: LineDirectLabelSpecOptions, lineOptions: LineSpecOptions, backgroundColor: string | undefined, colorScheme: 'light' | 'dark') => Mark[];
|
|
11
|
+
/**
|
|
12
|
+
* Applies defaults to direct label options, inheriting context from the parent line.
|
|
13
|
+
*/
|
|
14
|
+
export declare const getLineDirectLabelSpecOptions: (labelOptions: LineDirectLabelOptions, index: number, lineOptions: LineSpecOptions) => LineDirectLabelSpecOptions;
|
|
15
|
+
//# sourceMappingURL=lineDirectLabelUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineDirectLabelUtils.d.ts","sourceRoot":"","sources":["../../../../src/lineDirectLabel/lineDirectLabelUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAwB,MAAM,MAAM,CAAC;AASxD,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,eAAe,EAAc,MAAM,UAAU,CAAC;AAE3G;;GAEG;AACH,eAAO,MAAM,sBAAsB,aACxB,MAAM,gBACF,0BAA0B,eAC3B,eAAe,KAC1B,IAgEF,CAAC;AAqBF;;GAEG;AACH,eAAO,MAAM,uBAAuB,aACzB,MAAM,gBACF,0BAA0B,eAC3B,eAAe,mBACX,MAAM,GAAG,SAAS,eACtB,OAAO,GAAG,MAAM,KAC3B,IAAI,EAiEN,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B,iBAC3B,sBAAsB,SAC7B,MAAM,eACA,eAAe,KAC1B,0BAaD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineDirectLabelUtils.test.d.ts","sourceRoot":"","sources":["../../../../src/lineDirectLabel/lineDirectLabelUtils.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trendlineTestUtils.d.ts","sourceRoot":"","sources":["../../../../src/trendline/trendlineTestUtils.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEjE,eAAO,MAAM,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"trendlineTestUtils.d.ts","sourceRoot":"","sources":["../../../../src/trendline/trendlineTestUtils.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEjE,eAAO,MAAM,kBAAkB,EAAE,eAsBhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,oBAoBrC,CAAC"}
|
|
@@ -1,34 +1,15 @@
|
|
|
1
|
-
import { FontWeight } from 'vega';
|
|
2
1
|
import { ColorScheme } from '../chartSpec.types';
|
|
3
|
-
import { LineType, PartiallyRequired } from '../specUtil.types';
|
|
4
|
-
import { SpectrumColor } from '../spectrumVizColor.types';
|
|
5
2
|
export type Icon = 'date' | 'sentimentNegative' | 'sentimentNeutral' | 'sentimentPositive';
|
|
6
3
|
export interface ReferenceLineOptions {
|
|
7
|
-
/** The color of the reference line. */
|
|
8
|
-
color?: SpectrumColor | string;
|
|
9
4
|
/** The value on the axis where the reference line should be drawn. */
|
|
10
5
|
value: number | string;
|
|
11
|
-
/** Adds an icon as the reference line label on the axis. */
|
|
12
|
-
icon?: Icon | string;
|
|
13
|
-
/** Color of the icon. */
|
|
14
|
-
iconColor?: SpectrumColor | string;
|
|
15
6
|
/** Position the line on the value, or between the previous/next value. Only supported in Bar visualizations. */
|
|
16
7
|
position?: 'before' | 'after' | 'center';
|
|
17
|
-
/** Axis text label.
|
|
8
|
+
/** Axis text label. */
|
|
18
9
|
label?: string;
|
|
19
|
-
/** Specifies what layer the reference line should be drawn on. `front` will render the reference line infront of other marks. `back` will draw the refence line behind other marks. */
|
|
20
|
-
layer?: 'back' | 'front';
|
|
21
|
-
/** Color of the label. */
|
|
22
|
-
labelColor?: SpectrumColor | string;
|
|
23
|
-
/** Font weight of the label. */
|
|
24
|
-
labelFontWeight?: FontWeight;
|
|
25
|
-
/** Line type of the reference line. */
|
|
26
|
-
lineType?: LineType;
|
|
27
10
|
}
|
|
28
|
-
|
|
29
|
-
export interface ReferenceLineSpecOptions extends PartiallyRequired<ReferenceLineOptions, ReferenceLineOptionsWithDefaults> {
|
|
11
|
+
export interface ReferenceLineSpecOptions extends ReferenceLineOptions {
|
|
30
12
|
colorScheme: ColorScheme;
|
|
31
13
|
name: string;
|
|
32
14
|
}
|
|
33
|
-
export {};
|
|
34
15
|
//# sourceMappingURL=referenceLineSpec.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referenceLineSpec.types.d.ts","sourceRoot":"","sources":["../../../../../src/types/axis/referenceLineSpec.types.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"referenceLineSpec.types.d.ts","sourceRoot":"","sources":["../../../../../src/types/axis/referenceLineSpec.types.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG,mBAAmB,GAAG,kBAAkB,GAAG,mBAAmB,CAAC;AAE3F,MAAM,WAAW,oBAAoB;IACnC,sEAAsE;IACtE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,gHAAgH;IAChH,QAAQ,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACzC,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACpE,WAAW,EAAE,WAAW,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -12,6 +12,12 @@ export interface BarOptions {
|
|
|
12
12
|
metric?: string;
|
|
13
13
|
/** Bar color or key in the data that is used as the color facet */
|
|
14
14
|
color?: ColorFacet | DualFacet;
|
|
15
|
+
/**
|
|
16
|
+
* Data field whose value is the CSS color for each bar (one color per row).
|
|
17
|
+
* When set, bar fill uses this field instead of the color scale; takes precedence over {@link color}.
|
|
18
|
+
* Distinct from {@link color} (which maps through the color scale).
|
|
19
|
+
*/
|
|
20
|
+
colorOverride?: string;
|
|
15
21
|
/** Data field used for the bar categories (x-axis for a vertical bar) */
|
|
16
22
|
dimension?: string;
|
|
17
23
|
/** Data type field used for the bar categories (x-axis for a vertical bar) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"barSpec.types.d.ts","sourceRoot":"","sources":["../../../../../src/types/marks/barSpec.types.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACvH,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,MAAM,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACzC,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE3C,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,KAAK,CAAC;IAEhB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,8FAA8F;IAC9F,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qDAAqD;IACrD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kGAAkG;IAClG,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wFAAwF;IACxF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,aA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AAC,UAAU,EAAE,sBAAsB,CAAC;IAC3F,WAAW,EAAE,WAAW,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC"}
|
|
@@ -3,9 +3,11 @@ import { ColorScheme, HighlightedItem } from '../chartSpec.types';
|
|
|
3
3
|
import { ChartPopoverOptions } from '../dialogs/chartPopoverSpec.types';
|
|
4
4
|
import { ChartTooltipOptions } from '../dialogs/chartTooltipSpec.types';
|
|
5
5
|
import { ColorFacet, FacetRef, LineTypeFacet, LineWidth, OpacityFacet, PartiallyRequired, ScaleType } from '../specUtil.types';
|
|
6
|
+
import { LineDirectLabelOptions } from './supplemental/lineDirectLabelSpec.types';
|
|
6
7
|
import { MetricRangeOptions } from './supplemental/metricRangeSpec.types';
|
|
7
8
|
import { TrendlineOptions } from './supplemental/trendlineSpec.types';
|
|
8
9
|
export type InteractionMode = `${INTERACTION_MODE}`;
|
|
10
|
+
export type InterpolationType = 'basis' | 'cardinal' | 'catmull-rom' | 'linear' | 'monotone' | 'natural' | 'step' | 'step-after' | 'step-before';
|
|
9
11
|
export interface LineOptions {
|
|
10
12
|
markType: 'line';
|
|
11
13
|
/** Sets the name of the component. */
|
|
@@ -39,13 +41,19 @@ export interface LineOptions {
|
|
|
39
41
|
metricAxis?: string;
|
|
40
42
|
/** Enables dual metric axis mode where the last series uses a secondary axis with independent scale */
|
|
41
43
|
dualMetricAxis?: boolean;
|
|
44
|
+
/** If true, displays a gradient fill beneath the line fading from the line color to transparent */
|
|
45
|
+
gradient?: boolean;
|
|
46
|
+
/** Sets the interpolation method for the line */
|
|
47
|
+
interpolate?: InterpolationType;
|
|
42
48
|
chartPopovers?: ChartPopoverOptions[];
|
|
43
49
|
chartTooltips?: ChartTooltipOptions[];
|
|
50
|
+
lineDirectLabels?: LineDirectLabelOptions[];
|
|
44
51
|
metricRanges?: MetricRangeOptions[];
|
|
45
52
|
trendlines?: TrendlineOptions[];
|
|
46
53
|
}
|
|
47
|
-
type LineOptionsWithDefaults = 'chartPopovers' | 'chartTooltips' | 'color' | 'dimension' | 'hasOnClick' | 'lineType' | 'metric' | 'metricRanges' | 'name' | 'opacity' | 'scaleType' | 'trendlines';
|
|
54
|
+
type LineOptionsWithDefaults = 'chartPopovers' | 'chartTooltips' | 'color' | 'dimension' | 'gradient' | 'hasOnClick' | 'lineDirectLabels' | 'lineType' | 'metric' | 'metricRanges' | 'name' | 'opacity' | 'scaleType' | 'trendlines';
|
|
48
55
|
export interface LineSpecOptions extends PartiallyRequired<LineOptions, LineOptionsWithDefaults> {
|
|
56
|
+
backgroundColor?: string;
|
|
49
57
|
colorScheme: ColorScheme;
|
|
50
58
|
comboSiblingNames?: string[];
|
|
51
59
|
highlightedItem?: HighlightedItem;
|
|
@@ -56,6 +64,7 @@ export interface LineSpecOptions extends PartiallyRequired<LineOptions, LineOpti
|
|
|
56
64
|
lineWidth?: FacetRef<LineWidth>;
|
|
57
65
|
popoverMarkName: string | undefined;
|
|
58
66
|
interactionMode?: InteractionMode;
|
|
67
|
+
interpolate?: InterpolationType;
|
|
59
68
|
}
|
|
60
69
|
export {};
|
|
61
70
|
//# sourceMappingURL=lineSpec.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineSpec.types.d.ts","sourceRoot":"","sources":["../../../../../src/types/marks/lineSpec.types.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAA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W,GACX,YAAY,CAAC;AAEjB,MAAM,WAAW,eAAgB,SAAQ,iBAAiB,CAAC,WAAW,EAAE,uBAAuB,CAAC;IAC9F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,WAAW,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;IAChC,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC"}
|
|
@@ -4,6 +4,7 @@ export * from './metricRangeSpec.types';
|
|
|
4
4
|
export * from './scatterAnnotationSpec.types';
|
|
5
5
|
export * from './scatterPathSpec.types';
|
|
6
6
|
export * from './segmentLabelSpec.types';
|
|
7
|
+
export * from './lineDirectLabelSpec.types';
|
|
7
8
|
export * from './trendlineSpec.types';
|
|
8
9
|
export * from './trendlineAnnotationSpec.types';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/types/marks/supplemental/index.ts"],"names":[],"mappings":"AAYA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/types/marks/supplemental/index.ts"],"names":[],"mappings":"AAYA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ColorScheme } from '../../chartSpec.types';
|
|
2
|
+
import { ColorFacet, PartiallyRequired, ScaleType } from '../../specUtil.types';
|
|
3
|
+
export type LabelValue = 'last' | 'average' | 'series';
|
|
4
|
+
export type LabelPosition = 'start' | 'end';
|
|
5
|
+
export interface LineDirectLabelOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Value to display.
|
|
8
|
+
* - 'last': value at last data point
|
|
9
|
+
* - 'average': average of all values in the line
|
|
10
|
+
* - 'series': series key/name
|
|
11
|
+
* @default 'last'
|
|
12
|
+
*/
|
|
13
|
+
value?: LabelValue;
|
|
14
|
+
/**
|
|
15
|
+
* Where to place the label along the line.
|
|
16
|
+
* - 'end': right side of the chart, y-positioned at the last data point
|
|
17
|
+
* - 'start': left side of the chart, y-positioned at the first data point
|
|
18
|
+
* @default 'end'
|
|
19
|
+
*/
|
|
20
|
+
position?: LabelPosition;
|
|
21
|
+
/** Number format string (matches axis formatting). */
|
|
22
|
+
format?: string;
|
|
23
|
+
/** Text prepended to the value. */
|
|
24
|
+
prefix?: string;
|
|
25
|
+
/** Series values to exclude from labeling. */
|
|
26
|
+
excludeSeries?: string[];
|
|
27
|
+
}
|
|
28
|
+
type LineDirectLabelOptionsWithDefaults = 'value' | 'position' | 'excludeSeries';
|
|
29
|
+
export interface LineDirectLabelSpecOptions extends PartiallyRequired<LineDirectLabelOptions, LineDirectLabelOptionsWithDefaults> {
|
|
30
|
+
color: ColorFacet;
|
|
31
|
+
colorScheme: ColorScheme;
|
|
32
|
+
dimension: string;
|
|
33
|
+
excludeSeries: string[];
|
|
34
|
+
index: number;
|
|
35
|
+
lineName: string;
|
|
36
|
+
metric: string;
|
|
37
|
+
position: LabelPosition;
|
|
38
|
+
scaleType: ScaleType;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=lineDirectLabelSpec.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lineDirectLabelSpec.types.d.ts","sourceRoot":"","sources":["../../../../../../src/types/marks/supplemental/lineDirectLabelSpec.types.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEhF,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AACvD,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,KAAK,CAAC;AAE5C,MAAM,WAAW,sBAAsB;IACrC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,KAAK,kCAAkC,GAAG,OAAO,GAAG,UAAU,GAAG,eAAe,CAAC;AAEjF,MAAM,WAAW,0BACf,SAAQ,iBAAiB,CAAC,sBAAsB,EAAE,kCAAkC,CAAC;IACrF,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,WAAW,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,aAAa,CAAC;IACxB,SAAS,EAAE,SAAS,CAAC;CACtB"}
|