@spectrum-charts/vega-spec-builder-s2 0.3.2 → 0.4.1

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.
Files changed (135) hide show
  1. package/dist/@types/src/area/areaSpecBuilder.d.ts +1 -1
  2. package/dist/@types/src/area/areaUtils.d.ts +2 -2
  3. package/dist/@types/src/axis/axisLabelHoverUtils.d.ts +22 -0
  4. package/dist/@types/src/axis/axisLabelHoverUtils.d.ts.map +1 -0
  5. package/dist/@types/src/axis/axisLabelHoverUtils.test.d.ts +2 -0
  6. package/dist/@types/src/axis/axisLabelHoverUtils.test.d.ts.map +1 -0
  7. package/dist/@types/src/axis/axisReferenceLineUtils.d.ts +11 -7
  8. package/dist/@types/src/axis/axisReferenceLineUtils.d.ts.map +1 -1
  9. package/dist/@types/src/axis/axisSpecBuilder.d.ts +6 -0
  10. package/dist/@types/src/axis/axisSpecBuilder.d.ts.map +1 -1
  11. package/dist/@types/src/axis/axisTestUtils.d.ts.map +1 -1
  12. package/dist/@types/src/axis/axisUtils.d.ts +63 -1
  13. package/dist/@types/src/axis/axisUtils.d.ts.map +1 -1
  14. package/dist/@types/src/axisAnnotation/axisAnnotationUtils.d.ts +1 -1
  15. package/dist/@types/src/bar/barSpecBuilder.d.ts.map +1 -1
  16. package/dist/@types/src/bar/barTestUtils.d.ts.map +1 -1
  17. package/dist/@types/src/bar/barUtils.d.ts +23 -0
  18. package/dist/@types/src/bar/barUtils.d.ts.map +1 -1
  19. package/dist/@types/src/bar/dodgedBarUtils.d.ts.map +1 -1
  20. package/dist/@types/src/bar/dodgedBarUtils.test.d.ts.map +1 -1
  21. package/dist/@types/src/bar/stackedBarUtils.d.ts.map +1 -1
  22. package/dist/@types/src/barDirectLabel/barDirectLabelUtils.d.ts +119 -15
  23. package/dist/@types/src/barDirectLabel/barDirectLabelUtils.d.ts.map +1 -1
  24. package/dist/@types/src/chartInspect/chartInspectUtils.d.ts +55 -0
  25. package/dist/@types/src/{chartTooltip/chartTooltipUtils.d.ts.map → chartInspect/chartInspectUtils.d.ts.map} +1 -1
  26. package/dist/@types/src/chartInspect/chartInspectUtils.test.d.ts +2 -0
  27. package/dist/@types/src/chartInspect/chartInspectUtils.test.d.ts.map +1 -0
  28. package/dist/@types/src/chartSpecBuilder.d.ts +1 -1
  29. package/dist/@types/src/chartSpecBuilder.d.ts.map +1 -1
  30. package/dist/@types/src/data/dataUtils.d.ts +7 -2
  31. package/dist/@types/src/data/dataUtils.d.ts.map +1 -1
  32. package/dist/@types/src/donut/donutSpecBuilder.d.ts.map +1 -1
  33. package/dist/@types/src/donut/donutUtils.d.ts +22 -1
  34. package/dist/@types/src/donut/donutUtils.d.ts.map +1 -1
  35. package/dist/@types/src/donut/donutUtils.test.d.ts +2 -0
  36. package/dist/@types/src/donut/donutUtils.test.d.ts.map +1 -0
  37. package/dist/@types/src/donut/segmentLabelUtils.d.ts.map +1 -1
  38. package/dist/@types/src/legend/legendHighlightUtils.d.ts +24 -2
  39. package/dist/@types/src/legend/legendHighlightUtils.d.ts.map +1 -1
  40. package/dist/@types/src/legend/legendSpecBuilder.d.ts.map +1 -1
  41. package/dist/@types/src/legend/legendUtils.d.ts +5 -5
  42. package/dist/@types/src/legend/legendUtils.d.ts.map +1 -1
  43. package/dist/@types/src/line/directLabelUtils.d.ts +39 -0
  44. package/dist/@types/src/line/directLabelUtils.d.ts.map +1 -0
  45. package/dist/@types/src/line/lineDataUtils.d.ts +23 -0
  46. package/dist/@types/src/line/lineDataUtils.d.ts.map +1 -1
  47. package/dist/@types/src/line/lineMarkUtils.d.ts +25 -2
  48. package/dist/@types/src/line/lineMarkUtils.d.ts.map +1 -1
  49. package/dist/@types/src/line/linePointAnnotation/index.d.ts +2 -0
  50. package/dist/@types/src/line/linePointAnnotation/index.d.ts.map +1 -0
  51. package/dist/@types/src/line/linePointAnnotation/linePointAnnotationUtils.d.ts +12 -0
  52. package/dist/@types/src/line/linePointAnnotation/linePointAnnotationUtils.d.ts.map +1 -0
  53. package/dist/@types/src/line/linePointAnnotation/linePointAnnotationUtils.test.d.ts +2 -0
  54. package/dist/@types/src/line/linePointAnnotation/linePointAnnotationUtils.test.d.ts.map +1 -0
  55. package/dist/@types/src/line/linePointUtils.d.ts +9 -2
  56. package/dist/@types/src/line/linePointUtils.d.ts.map +1 -1
  57. package/dist/@types/src/line/lineSpecBuilder.d.ts +5 -1
  58. package/dist/@types/src/line/lineSpecBuilder.d.ts.map +1 -1
  59. package/dist/@types/src/line/lineTestUtils.d.ts.map +1 -1
  60. package/dist/@types/src/line/lineUtils.d.ts +12 -2
  61. package/dist/@types/src/line/lineUtils.d.ts.map +1 -1
  62. package/dist/@types/src/lineDirectLabel/lineDirectLabelUtils.d.ts +2 -2
  63. package/dist/@types/src/lineDirectLabel/lineDirectLabelUtils.d.ts.map +1 -1
  64. package/dist/@types/src/lineForecast/index.d.ts +2 -0
  65. package/dist/@types/src/lineForecast/index.d.ts.map +1 -0
  66. package/dist/@types/src/lineForecast/lineForecastUtils.d.ts +14 -0
  67. package/dist/@types/src/lineForecast/lineForecastUtils.d.ts.map +1 -0
  68. package/dist/@types/src/lineForecast/lineForecastUtils.test.d.ts +2 -0
  69. package/dist/@types/src/lineForecast/lineForecastUtils.test.d.ts.map +1 -0
  70. package/dist/@types/src/marks/drawInAnimationUtils.d.ts +83 -0
  71. package/dist/@types/src/marks/drawInAnimationUtils.d.ts.map +1 -0
  72. package/dist/@types/src/marks/drawInAnimationUtils.test.d.ts +2 -0
  73. package/dist/@types/src/marks/drawInAnimationUtils.test.d.ts.map +1 -0
  74. package/dist/@types/src/marks/hoverAnimationUtils.d.ts +93 -0
  75. package/dist/@types/src/marks/hoverAnimationUtils.d.ts.map +1 -0
  76. package/dist/@types/src/marks/hoverAnimationUtils.test.d.ts +2 -0
  77. package/dist/@types/src/marks/hoverAnimationUtils.test.d.ts.map +1 -0
  78. package/dist/@types/src/marks/markUtils.d.ts +17 -12
  79. package/dist/@types/src/marks/markUtils.d.ts.map +1 -1
  80. package/dist/@types/src/metricRange/metricRangeUtils.d.ts +1 -1
  81. package/dist/@types/src/metricRange/metricRangeUtils.d.ts.map +1 -1
  82. package/dist/@types/src/signal/signalSpecBuilder.d.ts +1 -1
  83. package/dist/@types/src/signal/signalSpecBuilder.d.ts.map +1 -1
  84. package/dist/@types/src/specTestUtils.d.ts +20 -0
  85. package/dist/@types/src/specTestUtils.d.ts.map +1 -1
  86. package/dist/@types/src/specUtils.d.ts +12 -2
  87. package/dist/@types/src/specUtils.d.ts.map +1 -1
  88. package/dist/@types/src/trendline/trendlineTestUtils.d.ts.map +1 -1
  89. package/dist/@types/src/trendline/trendlineUtils.d.ts +1 -1
  90. package/dist/@types/src/types/axis/axisAnnotationSpec.types.d.ts +3 -3
  91. package/dist/@types/src/types/axis/axisSpec.types.d.ts +3 -1
  92. package/dist/@types/src/types/axis/axisSpec.types.d.ts.map +1 -1
  93. package/dist/@types/src/types/axis/referenceLineSpec.types.d.ts +5 -0
  94. package/dist/@types/src/types/axis/referenceLineSpec.types.d.ts.map +1 -1
  95. package/dist/@types/src/types/chartSpec.types.d.ts +2 -0
  96. package/dist/@types/src/types/chartSpec.types.d.ts.map +1 -1
  97. package/dist/@types/src/types/dialogs/chartInspectSpec.types.d.ts +14 -0
  98. package/dist/@types/src/types/dialogs/{chartTooltipSpec.types.d.ts.map → chartInspectSpec.types.d.ts.map} +1 -1
  99. package/dist/@types/src/types/dialogs/index.d.ts +1 -1
  100. package/dist/@types/src/types/legendSpec.types.d.ts +7 -0
  101. package/dist/@types/src/types/legendSpec.types.d.ts.map +1 -1
  102. package/dist/@types/src/types/marks/areaSpec.types.d.ts +4 -4
  103. package/dist/@types/src/types/marks/areaSpec.types.d.ts.map +1 -1
  104. package/dist/@types/src/types/marks/barSpec.types.d.ts +5 -3
  105. package/dist/@types/src/types/marks/barSpec.types.d.ts.map +1 -1
  106. package/dist/@types/src/types/marks/donutSpec.types.d.ts +3 -3
  107. package/dist/@types/src/types/marks/lineSpec.types.d.ts +65 -6
  108. package/dist/@types/src/types/marks/lineSpec.types.d.ts.map +1 -1
  109. package/dist/@types/src/types/marks/scatterSpec.types.d.ts +3 -3
  110. package/dist/@types/src/types/marks/supplemental/barDirectLabelSpec.types.d.ts +4 -1
  111. package/dist/@types/src/types/marks/supplemental/barDirectLabelSpec.types.d.ts.map +1 -1
  112. package/dist/@types/src/types/marks/supplemental/index.d.ts +2 -0
  113. package/dist/@types/src/types/marks/supplemental/index.d.ts.map +1 -1
  114. package/dist/@types/src/types/marks/supplemental/lineDirectLabelSpec.types.d.ts +2 -0
  115. package/dist/@types/src/types/marks/supplemental/lineDirectLabelSpec.types.d.ts.map +1 -1
  116. package/dist/@types/src/types/marks/supplemental/lineForecastSpec.types.d.ts +23 -0
  117. package/dist/@types/src/types/marks/supplemental/lineForecastSpec.types.d.ts.map +1 -0
  118. package/dist/@types/src/types/marks/supplemental/linePointAnnotationSpec.types.d.ts +19 -0
  119. package/dist/@types/src/types/marks/supplemental/linePointAnnotationSpec.types.d.ts.map +1 -0
  120. package/dist/@types/src/types/marks/supplemental/metricRangeSpec.types.d.ts +3 -3
  121. package/dist/@types/src/types/marks/supplemental/trendlineSpec.types.d.ts +4 -4
  122. package/dist/@types/src/types/marks/supplemental/trendlineSpec.types.d.ts.map +1 -1
  123. package/dist/@types/src/types/marks/vennSpec.types.d.ts +3 -3
  124. package/dist/@types/src/types/specUtil.types.d.ts +16 -3
  125. package/dist/@types/src/types/specUtil.types.d.ts.map +1 -1
  126. package/dist/@types/src/vegaEmbedUtils.d.ts +8 -0
  127. package/dist/@types/src/vegaEmbedUtils.d.ts.map +1 -1
  128. package/dist/index.js +1 -1
  129. package/dist/index.js.LICENSE.txt +1 -1
  130. package/dist/index.js.map +1 -1
  131. package/package.json +5 -5
  132. package/dist/@types/src/chartTooltip/chartTooltipUtils.d.ts +0 -54
  133. package/dist/@types/src/chartTooltip/chartTooltipUtils.test.d.ts +0 -2
  134. package/dist/@types/src/chartTooltip/chartTooltipUtils.test.d.ts.map +0 -1
  135. package/dist/@types/src/types/dialogs/chartTooltipSpec.types.d.ts +0 -14
@@ -1 +1 @@
1
- {"version":3,"file":"donutSpecBuilder.d.ts","sourceRoot":"","sources":["../../../../src/donut/donutSpecBuilder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAoB,IAAI,EAAgB,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAejF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAUhG,eAAO,MAAM,QAAQ;;;;WAOR,MAAM;YA+ClB,CAAC;AAEF,eAAO,MAAM,OAAO,qDA2BlB,CAAC;AA2BH,eAAO,MAAM,SAAS,uDAIpB,CAAC;AAEH,eAAO,MAAM,QAAQ,qDAEnB,CAAC;AAEH,eAAO,MAAM,UAAU,yDAKrB,CAAC"}
1
+ {"version":3,"file":"donutSpecBuilder.d.ts","sourceRoot":"","sources":["../../../../src/donut/donutSpecBuilder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAoB,IAAI,EAAgB,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAejF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAUhG,eAAO,MAAM,QAAQ;;;;WAOR,MAAM;YA+ClB,CAAC;AAEF,eAAO,MAAM,OAAO,qDA6BlB,CAAC;AA2BH,eAAO,MAAM,SAAS,uDAIpB,CAAC;AAEH,eAAO,MAAM,QAAQ,qDAOnB,CAAC;AAEH,eAAO,MAAM,UAAU,yDAKrB,CAAC"}
@@ -1,4 +1,25 @@
1
- import { ArcMark } from 'vega';
1
+ import { ArcMark, SourceData } from 'vega';
2
2
  import { DonutSpecOptions } from '../types';
3
+ /**
4
+ * Gets the test expression that is true when the donut has no data or all metric values sum to 0.
5
+ * When the metric sum is 0, the vega pie transform produces NaN angles which cannot be rendered.
6
+ * @param name donut name
7
+ * @returns vega expression string
8
+ */
9
+ export declare const getDonutEmptyStateTest: (name: string) => string;
10
+ /**
11
+ * Gets the data source that aggregates the sum of the metric.
12
+ * Used to detect the empty state (no data or all metric values are 0).
13
+ * @param donutOptions
14
+ * @returns SourceData
15
+ */
16
+ export declare const getSumData: ({ metric, name }: DonutSpecOptions) => SourceData;
3
17
  export declare const getArcMark: (options: DonutSpecOptions) => ArcMark;
18
+ /**
19
+ * Gets the empty state arc mark. This is a light gray ring that is only visible
20
+ * when the donut has no data or all metric values sum to 0.
21
+ * @param donutOptions
22
+ * @returns ArcMark
23
+ */
24
+ export declare const getEmptyStateArcMark: (options: DonutSpecOptions) => ArcMark;
4
25
  //# sourceMappingURL=donutUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"donutUtils.d.ts","sourceRoot":"","sources":["../../../../src/donut/donutUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAM/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,UAAU,YAAa,gBAAgB,KAAG,OA2BtD,CAAC"}
1
+ {"version":3,"file":"donutUtils.d.ts","sourceRoot":"","sources":["../../../../src/donut/donutUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAM3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,SAAU,MAAM,KAAG,MAC2B,CAAC;AAElF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,qBAAsB,gBAAgB,KAAG,UAW9D,CAAC;AAEH,eAAO,MAAM,UAAU,YAAa,gBAAgB,KAAG,OA4BtD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,YAAa,gBAAgB,KAAG,OAsBhE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=donutUtils.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"donutUtils.test.d.ts","sourceRoot":"","sources":["../../../../src/donut/donutUtils.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"segmentLabelUtils.d.ts","sourceRoot":"","sources":["../../../../src/donut/segmentLabelUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAmB,cAAc,EAAmB,QAAQ,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAM3G,OAAO,EAAE,gBAAgB,EAAuB,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAgC1F;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,iBAAkB,gBAAgB,KAAG,SAAS,EAgB9E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,gDAKjC,uBAAuB,KAAG,QAqB5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,YAAa,uBAAuB,KAAG,QAAQ,EAwBvF,CAAC;AA4BF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,kEAMlC,uBAAuB,KAAG,eAAe,YAAY,CAAC,GAAG,SAkB3D,CAAC"}
1
+ {"version":3,"file":"segmentLabelUtils.d.ts","sourceRoot":"","sources":["../../../../src/donut/segmentLabelUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAmB,cAAc,EAAmB,QAAQ,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAM3G,OAAO,EAAE,gBAAgB,EAAuB,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAiC1F;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,iBAAkB,gBAAgB,KAAG,SAAS,EAgB9E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,gDAKjC,uBAAuB,KAAG,QAsB5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,YAAa,uBAAuB,KAAG,QAAQ,EA2BvF,CAAC;AA4BF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,kEAMlC,uBAAuB,KAAG,eAAe,YAAY,CAAC,GAAG,SAkB3D,CAAC"}
@@ -1,8 +1,23 @@
1
- import { Mark, NumericValueRef, ProductionRule } from 'vega';
1
+ import { Data, Mark, NumericValueRef, ProductionRule } from 'vega';
2
+ import { LegendOptions } from '../types';
3
+ export declare const getLegendHighlightSignals: (legends: LegendOptions[]) => string[];
2
4
  /**
3
- * Adds opacity tests for the fill and stroke of marks that use the color scale to set the fill or stroke value.
5
+ * Injects a legend hover rule into the hover target data for the chart.
6
+ */
7
+ export declare const injectLegendHoverIntoData: (legendName: string, data: Data[], keys?: string[]) => void;
8
+ /**
9
+ * Adds opacity tests for marks whose fill/stroke is driven by the color scale, and for marks
10
+ * that are already per-series (e.g. trendlines, which facet by series regardless of their own
11
+ * color encoding — a trendline with an overridden literal color still needs to fade on legend hover).
4
12
  */
5
13
  export declare const setHoverOpacityForMarks: (legendName: string, marks: Mark[], keys?: string[], controlled?: boolean) => void;
14
+ /**
15
+ * Injects a strokeWidth rule into marks that use the color scale so legend hover thickens the hovered series.
16
+ */
17
+ export declare const setHoverStrokeWidthForMarks: (legendName: string, marks: Mark[], keys?: string[], controlled?: boolean) => void;
18
+ export declare const getHighlightStrokeWidthRule: (legendName: string, controlled: boolean, keys?: string[]) => {
19
+ test?: string;
20
+ } & NumericValueRef;
6
21
  export declare const getHighlightOpacityRule: (legendName: string, controlled: boolean, keys?: string[]) => {
7
22
  test?: string;
8
23
  } & NumericValueRef;
@@ -13,6 +28,13 @@ export declare const getHighlightOpacityRule: (legendName: string, controlled: b
13
28
  * @returns boolean
14
29
  */
15
30
  export declare const markUsesSeriesColorScale: (mark: Mark) => boolean;
31
+ /**
32
+ * Determines if a mark should receive a legend-hover opacity rule — either because its own
33
+ * fill/stroke uses the color scale, or because it's a trendline/metric range mark.
34
+ * @param mark
35
+ * @returns boolean
36
+ */
37
+ export declare const markIsSeriesAware: (mark: Mark) => boolean;
16
38
  /**
17
39
  * Determines if the supplied encoding uses a scale to set the value
18
40
  * @param encoding
@@ -1 +1 @@
1
- {"version":3,"file":"legendHighlightUtils.d.ts","sourceRoot":"","sources":["../../../../src/legend/legendHighlightUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAa,IAAI,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAWxE;;GAEG;AACH,eAAO,MAAM,uBAAuB,eAAgB,MAAM,SAAS,IAAI,EAAE,SAAS,MAAM,EAAE,+BA2BzF,CAAC;AAEF,eAAO,MAAM,uBAAuB,eACtB,MAAM,cACN,OAAO,SACZ,MAAM,EAAE,KACd;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,eAiBtB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,SAAU,IAAI,KAAG,OAarD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,iBAAkB,eAAe,CAAC,CAAC,KAAG,OAOnE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY,UAAW,IAAI,EAAE,KAAG,IAAI,EAQhD,CAAC"}
1
+ {"version":3,"file":"legendHighlightUtils.d.ts","sourceRoot":"","sources":["../../../../src/legend/legendHighlightUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAsB,IAAI,EAA+B,IAAI,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAapH,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,eAAO,MAAM,yBAAyB,YAAa,aAAa,EAAE,KAAG,MAAM,EAInB,CAAC;AA+EzD;;GAEG;AACH,eAAO,MAAM,yBAAyB,eAAgB,MAAM,QAAQ,IAAI,EAAE,SAAS,MAAM,EAAE,KAAG,IAgB7F,CAAC;AAcF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,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AC9B,UAAU,GAAG,SAAS,YACnB,aAAa,GAAG,SAAS,aACxB,cAAc,GAAG,SAAS,eACxB,gBAAgB,GAAG,SAAS,eAC5B,WAAW;;;;;CA8BzB,CAAC;AAuBF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,UAAW,KAAK,WAAW,iBAAiB,KAAG,MAe9E,CAAC;AA8BF;;;;GAIG;AACH,eAAO,MAAM,OAAO;YAAkD,MAAM,EAAE;YAyC7E,CAAC;AAEF,eAAO,MAAM,UAAU,0DAUtB,CAAC"}
1
+ {"version":3,"file":"legendSpecBuilder.d.ts","sourceRoot":"","sources":["../../../../src/legend/legendSpecBuilder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,EAAE,MAAM,MAAM,CAAC;AAoBzD,OAAO,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,MAAM,EACN,gBAAgB,EAEjB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,KAAK,EAAmE,MAAM,eAAe,CAAC;AAEvG,eAAO,MAAM,SAAS;;;;;;YA+GrB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,UAC9B,UAAU,GAAG,SAAS,YACnB,aAAa,GAAG,SAAS,aACxB,cAAc,GAAG,SAAS,eACxB,gBAAgB,GAAG,SAAS,eAC5B,WAAW;;;;;CA8BzB,CAAC;AAuBF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,UAAW,KAAK,WAAW,iBAAiB,KAAG,MAe9E,CAAC;AA+BF;;;;GAIG;AACH,eAAO,MAAM,OAAO;YAAkD,MAAM,EAAE;YAsE7E,CAAC;AAEF,eAAO,MAAM,UAAU,0DAUtB,CAAC"}
@@ -5,12 +5,11 @@ export interface Facet {
5
5
  field: string;
6
6
  }
7
7
  /**
8
- * Get the number of columns for the legend
9
- * @param position
10
- * @param labelLimit
11
- * @returns
8
+ * Get the number of columns for the legend.
9
+ * Uses actual measured label widths (via the ${name}_maxLabelWidth data source) capped at labelLimit
10
+ * so columns are based on real content rather than a fixed estimate.
12
11
  */
13
- export declare const getColumns: (position: Position, labelLimit?: number) => SignalRef | undefined;
12
+ export declare const getColumns: (position: Position, name: string, labelLimit?: number) => SignalRef | undefined;
14
13
  /**
15
14
  * Gets the filter transform for hidden entries
16
15
  * @param hiddenEntries
@@ -24,6 +23,7 @@ export declare const getHiddenEntriesFilter: (hiddenEntries: string[], name: str
24
23
  * @returns
25
24
  */
26
25
  export declare const getEncodings: (facets: Facet[], legendOptions: LegendSpecOptions, userMeta: UserMeta) => LegendEncode;
26
+ export declare const getLegendOpacity: (options: LegendSpecOptions, userMeta: UserMeta) => ProductionRule<NumericValueRef> | undefined;
27
27
  /**
28
28
  * simple opacity encoding for legend labels and the symbol stroke opacity
29
29
  * @param legendOptions
@@ -1 +1 @@
1
- {"version":3,"file":"legendUtils.d.ts","sourceRoot":"","sources":["../../../../src/legend/legendUtils.ts"],"names":[],"mappings":"AAYA,OAAO,EAGL,aAAa,EACb,eAAe,EAEf,YAAY,EACZ,eAAe,EACf,cAAc,EACd,SAAS,EAEV,MAAM,MAAM,CAAC;AA4Bd,OAAO,EACL,YAAY,EACZ,QAAQ,EACR,SAAS,EAGT,iBAAiB,EACjB,QAAQ,EACR,kBAAkB,EAClB,QAAQ,EACT,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,KAAK;IACpB,SAAS,EAAE,SAAS,GAAG,kBAAkB,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,aAAc,QAAQ,eAAe,MAAM,KAAG,SAAS,GAAG,SAYhF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,kBAAmB,MAAM,EAAE,QAAQ,MAAM,KAAG,eAAe,EAQ7F,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YA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G,SAAS,GAAG,SAO9F,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,kBAAmB,MAAM,EAAE,QAAQ,MAAM,KAAG,eAAe,EAQ7F,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,WAAY,KAAK,EAAE,iBAAiB,iBAAiB,YAAY,QAAQ,KAAG,YAcpG,CAAC;AA8DF,eAAO,MAAM,gBAAgB,YAAa,iBAAiB,YAAY,QAAQ,KAAG,eAAe,eAAe,CAAC,GAAG,SAwBnH,CAAA;AASD;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,6FAC6D,iBAAiB,YACjG,QAAQ,KACjB,eAAe,eAAe,CAAC,GAAG,SAyCpC,CAAC;AAEF,eAAO,MAAM,kBAAkB,WAAY,KAAK,EAAE,WAAW,iBAAiB,KAAG,YAoDhF,CAAC;AA8CF,eAAO,MAAM,wBAAwB,4DACsB,iBAAiB,cAC9D,YAAY,KACvB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,aAAa,CAAC,EAWjB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,YAAa,iBAAiB,KAAG,YAcjE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,YAAa,iBAAiB,KAAG,YAiB9D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,cAAe,YAAY,EAAE,KAAG,YAMhE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,aAAa,gBAAiB,SAAS,MAAM,CAAC,GAAG,SAAS,KAAG,MAIzE,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { NumericValueRef, ProductionRule, TextMark, Transforms } from 'vega';
2
+ import { ColorScheme } from '../types';
3
+ type PositionRef = NumericValueRef | ProductionRule<NumericValueRef>;
4
+ type FillOverride = {
5
+ field: string;
6
+ } | {
7
+ value: string;
8
+ } | {
9
+ signal: string;
10
+ };
11
+ export interface DirectLabelUpdateEncode {
12
+ x: PositionRef;
13
+ y: PositionRef;
14
+ additional?: Record<string, unknown>;
15
+ }
16
+ export declare const MIN_LABEL_GAP = "rscChartSizeLabelGap";
17
+ /**
18
+ * Builds the five Vega transforms that compute collision-aware vertical positions for a set of
19
+ * co-located labels. Shared by direct labels (namespace='') and hover labels (namespace='hover').
20
+ *
21
+ * With namespace='': produces fields _seriesCount, _metricRank, _scaledY, _adjustedY, _cumMaxAdjusted
22
+ * With namespace='hover': produces fields _hover_seriesCount, _hover_metricRank, etc.
23
+ */
24
+ export declare const getCascadeTransforms: (yScaleName: string, metric: string, namespace: string) => Transforms[];
25
+ /**
26
+ * Builds the two-mark (background halo + foreground text) pattern for hover-style labels
27
+ * where position is encoded directly from data (no label transform).
28
+ * Both marks read from the same dataSource.
29
+ */
30
+ export declare const getDirectLabelTextMarks: (backgroundMarkName: string, foregroundMarkName: string, dataSource: string, textSignal: string, updateEncode: DirectLabelUpdateEncode, colorScheme: ColorScheme, foregroundFillOverride?: FillOverride) => TextMark[];
31
+ /**
32
+ * Builds the two-mark (background halo + foreground text) pattern for annotation-style labels
33
+ * that use Vega's label transform for collision-aware placement.
34
+ * The background mark runs the label transform; the foreground reads its computed positions
35
+ * (x, y, align, baseline, opacity) from the background mark.
36
+ */
37
+ export declare const getLabelTransformTextMarks: (backgroundMarkName: string, foregroundMarkName: string, dataSource: string, textSignal: string, colorScheme: ColorScheme, labelTransform: Transforms, foregroundFillOverride?: FillOverride) => TextMark[];
38
+ export {};
39
+ //# sourceMappingURL=directLabelUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directLabelUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/directLabelUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAK7E,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,KAAK,WAAW,GAAG,eAAe,GAAG,cAAc,CAAC,eAAe,CAAC,CAAC;AACrE,KAAK,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/E,MAAM,WAAW,uBAAuB;IACtC,CAAC,EAAE,WAAW,CAAC;IACf,CAAC,EAAE,WAAW,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,eAAO,MAAM,aAAa,yBAAuB,CAAC;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,eAAgB,MAAM,UAAU,MAAM,aAAa,MAAM,KAAG,UAAU,EA8BtG,CAAC;AAeF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,uBACd,MAAM,sBACN,MAAM,cACd,MAAM,cACN,MAAM,gBACJ,uBAAuB,eACxB,WAAW,2BACC,YAAY,KACpC,QAAQ,EA6BV,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,uBACjB,MAAM,sBACN,MAAM,cACd,MAAM,cACN,MAAM,eACL,WAAW,kBACR,UAAU,2BACD,YAAY,KACpC,QAAQ,EAiCV,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { SourceData } from 'vega';
2
+ import { HoverMatchRule } from '../marks/hoverAnimationUtils';
2
3
  import { LineSpecOptions } from '../types';
3
4
  /**
4
5
  * gets the data used for highlighting hovered data points
@@ -7,6 +8,22 @@ import { LineSpecOptions } from '../types';
7
8
  * @returns
8
9
  */
9
10
  export declare const getLineHighlightedData: (options: LineSpecOptions) => SourceData;
11
+ /**
12
+ * Builds a Vega expression that evaluates to true for series NOT in the primary set.
13
+ * - number: first N series by color scale order
14
+ * - string[]: explicitly named series
15
+ */
16
+ export declare const getPrimarySeriesOtherExpr: (primarySeries: number | string[], datumPath: string) => string;
17
+ /**
18
+ * Gets a derived data source sorted so "other" series appear first,
19
+ * causing Vega to draw them first (behind the primary series).
20
+ */
21
+ export declare const getPrimarySeriesFacetData: (name: string, primarySeries: number | string[]) => SourceData;
22
+ /**
23
+ * Derives from highlightedData and adds cascade transforms so labels for multiple series
24
+ * at the same hovered dimension are spread apart rather than overlapping.
25
+ */
26
+ export declare const getHoverLabelData: (options: LineSpecOptions) => SourceData;
10
27
  /**
11
28
  * gets the data used for displaying points
12
29
  * @param name
@@ -17,4 +34,10 @@ export declare const getLineHighlightedData: (options: LineSpecOptions) => Sourc
17
34
  * @returns
18
35
  */
19
36
  export declare const getLineStaticPointData: (name: string, staticPoint: string | undefined, source: string, isSparkline: boolean | undefined, isMethodLast: boolean | undefined) => SourceData;
37
+ /**
38
+ * Constructs the conditions for the hover interaction rules, storing the hover state as target values for each hoverable item
39
+ * @param lineOptions - the line spec options containing the interactive mark name, popover mark name, combo sibling names, and whether the series is highlighted by group
40
+ * @returns HoverMatchRule[] - the hover interaction rules
41
+ */
42
+ export declare const getLineHoverRules: ({ interactiveMarkName, popoverMarkName, comboSiblingNames, isHighlightedByGroup }: LineSpecOptions) => HoverMatchRule[];
20
43
  //# sourceMappingURL=lineDataUtils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lineDataUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/lineDataUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAYlC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,YAAa,eAAe,KAAG,UA4BjE,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,SAC3B,MAAM,eACC,MAAM,GAAG,SAAS,UACvB,MAAM,eACD,OAAO,GAAG,SAAS,gBAClB,OAAO,GAAG,SAAS,KAChC,UAaF,CAAC"}
1
+ {"version":3,"file":"lineDataUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/lineDataUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAKlC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3C;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,YAAa,eAAe,KAAG,UA4BjE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,kBAAmB,MAAM,GAAG,MAAM,EAAE,aAAa,MAAM,KAAG,MAK/F,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,SAAU,MAAM,iBAAiB,MAAM,GAAG,MAAM,EAAE,KAAG,UAWzF,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,YAAa,eAAe,KAAG,UAS5D,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,SAC3B,MAAM,eACC,MAAM,GAAG,SAAS,UACvB,MAAM,eACD,OAAO,GAAG,SAAS,gBAClB,OAAO,GAAG,SAAS,KAChC,UAaF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,sFACuD,eAAe,KACjG,cAAc,EAyBhB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { LineMark, Mark, NumericValueRef, ProductionRule } from 'vega';
1
+ import { ArrayValueRef, LineMark, Mark, NumericValueRef, ProductionRule } from 'vega';
2
2
  import { LineMarkOptions } from './lineUtils';
3
3
  /**
4
4
  * Gets the Y encoding for line marks with dual metric axis support
@@ -11,6 +11,7 @@ export declare const getLineYEncoding: (lineMarkOptions: LineMarkOptions, metric
11
11
  * Generates an area mark with a gradient fill beneath the line, fading from the line's color to transparent.
12
12
  */
13
13
  export declare const getLineGradientMark: (lineMarkOptions: LineMarkOptions, dataSource: string) => Mark;
14
+ export declare const getAlternateSegmentStrokeDash: (name: string, lineType: LineMarkOptions['lineType'], alternateSegmentLineType: LineMarkOptions['alternateSegmentLineType']) => ArrayValueRef | undefined;
14
15
  /**
15
16
  * generates a line mark
16
17
  * @param lineOptions
@@ -18,7 +19,13 @@ export declare const getLineGradientMark: (lineMarkOptions: LineMarkOptions, dat
18
19
  * @returns LineMark
19
20
  */
20
21
  export declare const getLineMark: (lineMarkOptions: LineMarkOptions, dataSource: string) => LineMark;
21
- export declare const getLineOpacity: ({ displayOnHover, comboSiblingNames, interactiveMarkName, popoverMarkName, isHighlightedByGroup, highlightedItem, }: LineMarkOptions) => ProductionRule<NumericValueRef>;
22
+ export declare const getLineDeemphasisOpacitySignal: (name: string) => ProductionRule<NumericValueRef>;
23
+ export declare const getLineOpacity: (lineMarkOptions: LineMarkOptions) => ProductionRule<NumericValueRef>;
24
+ export declare const getLineOpacityRules: ({ comboSiblingNames, interactiveMarkName, popoverMarkName, isHighlightedByGroup, highlightedItem, }: LineMarkOptions) => ProductionRule<NumericValueRef>;
25
+ /**
26
+ * Gets the production rules for strokeWidth
27
+ */
28
+ export declare const getLineStrokeWidth: ({ displayOnHover, comboSiblingNames, interactiveMarkName, popoverMarkName, isHighlightedByGroup, highlightedItem, }: LineMarkOptions) => ProductionRule<NumericValueRef>;
22
29
  /**
23
30
  * All the marks that get displayed when hovering or selecting a point on a line
24
31
  * @param lineMarkOptions
@@ -27,4 +34,20 @@ export declare const getLineOpacity: ({ displayOnHover, comboSiblingNames, inter
27
34
  * @returns
28
35
  */
29
36
  export declare const getLineHoverMarks: (lineOptions: LineMarkOptions, dataSource: string, secondaryHighlightedMetric?: string) => Mark[];
37
+ /**
38
+ * Returns show/hide opacity rules for marks that should be visible only when `datum` belongs
39
+ * to the currently hovered or externally highlighted series. Follows the same production-rule
40
+ * array pattern as `getLineOpacity`, but uses `value: 1` (show) per matching condition and
41
+ * `value: 0` (hide) as the fallback — in contrast to the fade pattern used for regular marks.
42
+ */
43
+ export declare const getHighlightedSeriesOpacityRules: (markOptions: {
44
+ interactiveMarkName?: string;
45
+ isHighlightedByGroup?: boolean;
46
+ legendHighlightSignals?: string[];
47
+ }) => ProductionRule<NumericValueRef>;
48
+ /**
49
+ * A duplicate line group rendered after direct labels so the highlighted series always appears
50
+ * in the foreground. Only the hovered/highlighted series is visible (others have opacity 0).
51
+ */
52
+ export declare const getLineHighlightOverlayGroup: (markOptions: LineMarkOptions, facetData: string, facetGroupby: string[]) => Mark;
30
53
  //# sourceMappingURL=lineMarkUtils.d.ts.map
@@ -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;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
+ {"version":3,"file":"lineMarkUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/lineMarkUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,aAAa,EAEb,QAAQ,EACR,IAAI,EACJ,eAAe,EACf,cAAc,EAGf,MAAM,MAAM,CAAC;AA0Cd,OAAO,EAAE,eAAe,EAAoB,MAAM,aAAa,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,oBAAqB,eAAe,UAAU,MAAM,KAAG,eAAe,eAAe,CAqBjH,CAAC;AA2BF;;GAEG;AACH,eAAO,MAAM,mBAAmB,oBAAqB,eAAe,cAAc,MAAM,KAAG,IA6B1F,CAAC;AAoDF,eAAO,MAAM,6BAA6B,SAClC,MAAM,YACF,eAAe,CAAC,UAAU,CAAC,4BACX,eAAe,CAAC,0BAA0B,CAAC,KACpE,aAAa,GAAG,SAKlB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,oBAAqB,eAAe,cAAc,MAAM,KAAG,QAgDlF,CAAC;AAEF,eAAO,MAAM,8BAA8B,SAAU,MAAM,KAAG,eAAe,eAAe,CAK3F,CAAC;AAEF,eAAO,MAAM,cAAc,oBAAqB,eAAe,KAAG,eAAe,eAAe,CAY/F,CAAC;AAEF,eAAO,MAAM,mBAAmB,wGAM7B,eAAe,KAAG,eAAe,eAAe,CA+ClD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,wHAO5B,eAAe,KAAG,eAAe,eAAe,CAgDlD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,gBACf,eAAe,cAChB,MAAM,+BACW,MAAM,KAClC,IAAI,EAgBN,CAAC;AAmIF;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,gBAAiB;IAC5D,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;CACnC,KAAG,eAAe,eAAe,CA8BjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,gBAC1B,eAAe,aACjB,MAAM,gBACH,MAAM,EAAE,KACrB,IAiCF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './linePointAnnotationUtils';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/line/linePointAnnotation/index.ts"],"names":[],"mappings":"AAWA,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { NumericValueRef, ProductionRule, TextMark } from 'vega';
2
+ import { LinePointAnnotationOptions, LinePointAnnotationSpecOptions, LineSpecOptions } from '../../types';
3
+ export declare const getLinePointAnnotationSpecOptions: ({ anchor, matchLineColor, textKey }: LinePointAnnotationOptions, index: number, lineOptions: LineSpecOptions) => LinePointAnnotationSpecOptions;
4
+ export declare const getLinePointAnnotations: (lineOptions: LineSpecOptions) => LinePointAnnotationSpecOptions[];
5
+ /**
6
+ * Fades non-hovered/non-highlighted series by multiplying against the collision-computed `datum.opacity`.
7
+ * @param lineOptions
8
+ * @returns ProductionRule<NumericValueRef>
9
+ */
10
+ export declare const getLinePointAnnotationOpacity: ({ interactiveMarkName, isHighlightedByGroup, legendHighlightSignals, popoverMarkName, }: Pick<LineSpecOptions, 'interactiveMarkName' | 'isHighlightedByGroup' | 'legendHighlightSignals' | 'popoverMarkName'>) => ProductionRule<NumericValueRef>;
11
+ export declare const getLinePointAnnotationMarks: (lineOptions: LineSpecOptions) => TextMark[];
12
+ //# sourceMappingURL=linePointAnnotationUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linePointAnnotationUtils.d.ts","sourceRoot":"","sources":["../../../../../src/line/linePointAnnotation/linePointAnnotationUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAYjE,OAAO,EAAE,0BAA0B,EAAE,8BAA8B,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG1G,eAAO,MAAM,iCAAiC,wCACqC,0BAA0B,SACrG,MAAM,eACA,eAAe,KAC1B,8BASF,CAAC;AAEF,eAAO,MAAM,uBAAuB,gBAAiB,eAAe,KAAG,8BAA8B,EAIpG,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,4FAKvC,KACF,eAAe,EACf,qBAAqB,GAAG,sBAAsB,GAAG,wBAAwB,GAAG,iBAAiB,CAC7F,KAAG,eAAe,eAAe,CAkDjC,CAAC;AAEF,eAAO,MAAM,2BAA2B,gBAAiB,eAAe,KAAG,QAAQ,EAiClF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=linePointAnnotationUtils.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linePointAnnotationUtils.test.d.ts","sourceRoot":"","sources":["../../../../../src/line/linePointAnnotation/linePointAnnotationUtils.test.ts"],"names":[],"mappings":""}
@@ -2,11 +2,18 @@ import { SymbolMark } from 'vega';
2
2
  import { LineSpecOptions } from '../types';
3
3
  import { LineMarkOptions } from './lineUtils';
4
4
  /**
5
- * Gets the point mark for static points on a line chart.
6
- * @param lineMarkOptions
5
+ * Gets the filled dot mark for static points on a line chart.
6
+ * @param lineOptions
7
7
  * @returns SymbolMark
8
8
  */
9
9
  export declare const getLineStaticPoint: (lineOptions: LineSpecOptions) => SymbolMark;
10
+ /**
11
+ * Gets a background mark for static points to prevent opacity from revealing the line behind the point.
12
+ * This mark stays fully opaque (no opacity rules) so it always covers the line underneath.
13
+ * @param lineOptions
14
+ * @returns SymbolMark
15
+ */
16
+ export declare const getLineStaticPointBackground: (lineOptions: LineSpecOptions) => SymbolMark;
10
17
  /**
11
18
  * Gets a background to points to prevent opacity from displaying elements behind the point.
12
19
  * @param lineMarkOptions
@@ -1 +1 @@
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
+ {"version":3,"file":"linePointUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/linePointUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAmC,UAAU,EAAE,MAAM,MAAM,CAAC;AAgBnE,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAK9C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,gBAAiB,eAAe,KAAG,UA6BjE,CAAC;AAgCF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,gBAAiB,eAAe,KAAG,UAoB3E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,gBAAiB,eAAe,KAAG,UAoB1E,CAAC;AAyBF;;;;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,11 +1,14 @@
1
1
  import { Data, Mark, Scale, Signal } from 'vega';
2
- import { ColorScheme, HighlightedItem, LineOptions, LineSpecOptions, ScSpec } from '../types';
2
+ import { ChartData, ColorScheme, HighlightedItem, LineOptions, LineSpecOptions, ScSpec } from '../types';
3
3
  export declare const addLine: (state: ScSpec, args_0: LineOptions & {
4
+ animations?: boolean | undefined;
4
5
  colorScheme?: ColorScheme | undefined;
5
6
  highlightedItem?: HighlightedItem | undefined;
7
+ highlightedSeries?: string | number | undefined;
6
8
  index?: number | undefined;
7
9
  idKey: string;
8
10
  comboSiblingNames?: string[] | undefined;
11
+ data?: ChartData[] | undefined;
9
12
  }) => ScSpec;
10
13
  export declare const addData: (state: Data[], args_0: LineSpecOptions) => Data[];
11
14
  /**
@@ -16,4 +19,5 @@ export declare const addDualMetricAxisData: (data: Data[], options: LineSpecOpti
16
19
  export declare const addSignals: (state: Signal[], args_0: LineSpecOptions) => Signal[];
17
20
  export declare const setScales: (state: Scale[], args_0: LineSpecOptions) => Scale[];
18
21
  export declare const addLineMarks: (state: Mark[], args_0: LineSpecOptions) => Mark[];
22
+ export declare const getAlternateSegmentData: (name: string, dimSortField: string) => Data[];
19
23
  //# sourceMappingURL=lineSpecBuilder.d.ts.map
@@ -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;AA2BjD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAM9F,eAAO,MAAM,OAAO;;;;WAOP,MAAM;;YA+ElB,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
+ {"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;AA+CjD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAoBzG,eAAO,MAAM,OAAO;;;;;;WASP,MAAM;;;YA6GlB,CAAC;AA6BF,eAAO,MAAM,OAAO,oDAuBlB,CAAC;AAgEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB,SAAU,IAAI,EAAE,WAAW,eAAe,SAqB3E,CAAC;AAEF,eAAO,MAAM,UAAU,wDAyBrB,CAAC;AAEH,eAAO,MAAM,SAAS,sDA0BpB,CAAC;AAGH,eAAO,MAAM,YAAY,oDAuGvB,CAAC;AAcH,eAAO,MAAM,uBAAuB,SAAU,MAAM,gBAAgB,MAAM,KAAG,IAAI,EA6ChF,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,eAuBhC,CAAC"}
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,eAapC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,eA6BhC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { BarAnnotationOptions, ChartPopoverOptions, ChartTooltipOptions, ColorFacet, ColorScheme, DonutSummaryOptions, HighlightedItem, InteractionMode, LineTypeFacet, LineWidthFacet, MetricRangeOptions, OpacityFacet, ScaleType, ScatterPathOptions, SegmentLabelOptions, TrendlineOptions, InterpolationType } from '../types';
1
+ import { BarAnnotationOptions, ChartPopoverOptions, ChartInspectOptions, ColorFacet, ColorScheme, DonutSummaryOptions, HighlightedItem, InteractionMode, LineType, LineTypeFacet, LineWidthFacet, MetricRangeOptions, OpacityFacet, ScaleType, ScatterPathOptions, SegmentLabelOptions, TrendlineOptions, InterpolationType, LineCap } 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
@@ -11,7 +11,7 @@ export declare const isDualMetricAxis: (options: {
11
11
  export interface LineMarkOptions {
12
12
  barAnnotations?: BarAnnotationOptions[];
13
13
  chartPopovers?: ChartPopoverOptions[];
14
- chartTooltips?: ChartTooltipOptions[];
14
+ chartInspects?: ChartInspectOptions[];
15
15
  color: ColorFacet;
16
16
  colorScheme: ColorScheme;
17
17
  comboSiblingNames?: string[];
@@ -27,6 +27,7 @@ export interface LineMarkOptions {
27
27
  interactionMode?: InteractionMode;
28
28
  isHighlightedByDimension?: boolean;
29
29
  isHighlightedByGroup?: boolean;
30
+ lineCap?: LineCap;
30
31
  lineType: LineTypeFacet;
31
32
  lineWidth?: LineWidthFacet;
32
33
  metric: string;
@@ -39,8 +40,17 @@ export interface LineMarkOptions {
39
40
  scaleType: ScaleType;
40
41
  scatterPaths?: ScatterPathOptions[];
41
42
  segmentLabels?: SegmentLabelOptions[];
43
+ dimensionHover?: boolean;
44
+ hoverLabelKey?: string;
45
+ showHoverLabel?: boolean;
42
46
  staticPoint?: string;
43
47
  trendlines?: TrendlineOptions[];
44
48
  interpolate?: InterpolationType;
49
+ alternateSegmentKey?: string;
50
+ alternateSegmentLineType?: LineType;
51
+ alternateSegmentLabel?: string;
52
+ primarySeries?: number | string[];
53
+ otherSeriesColor?: string;
54
+ isAnimate?: boolean;
45
55
  }
46
56
  //# 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,EAChB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,kBAAkB,kBAAmB,mBAAmB,EAAE,YAAY,MAAM,KAAG,MAAM,GAAG,SAKpG,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,YAAa;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAE,KAAG,OAExE,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACxC,aAAa,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACtC,aAAa,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACtC,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,WAAW,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,wBAAwB,C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AAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wBAAwB,CAAC,EAAE,QAAQ,CAAC;IACpC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAClC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB"}
@@ -1,4 +1,4 @@
1
- import { Data, Mark } from 'vega';
1
+ import { Data, Mark, NumericValueRef, ProductionRule } from 'vega';
2
2
  import { LineDirectLabelOptions, LineDirectLabelSpecOptions, LineSpecOptions } from '../types';
3
3
  /**
4
4
  * Derived dataset: one row per series at the last (max-dimension) data point.
@@ -7,7 +7,7 @@ export declare const getLineDirectLabelData: (lineName: string, labelOptions: Li
7
7
  /**
8
8
  * Text marks: background stroke halo + foreground fill, placed at the end of each line series.
9
9
  */
10
- export declare const getLineDirectLabelMarks: (lineName: string, labelOptions: LineDirectLabelSpecOptions, lineOptions: LineSpecOptions, backgroundColor: string | undefined, colorScheme: 'light' | 'dark') => Mark[];
10
+ export declare const getLineDirectLabelMarks: (lineName: string, labelOptions: LineDirectLabelSpecOptions, lineOptions: LineSpecOptions, backgroundColor: string | undefined, colorScheme: 'light' | 'dark', fgOpacityRules?: ProductionRule<NumericValueRef>) => Mark[];
11
11
  /**
12
12
  * Applies defaults to direct label options, inheriting context from the parent line.
13
13
  */
@@ -1 +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"}
1
+ {"version":3,"file":"lineDirectLabelUtils.d.ts","sourceRoot":"","sources":["../../../../src/lineDirectLabel/lineDirectLabelUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,cAAc,EAAwB,MAAM,MAAM,CAAC;AAazF,OAAO,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,eAAe,EAAc,MAAM,UAAU,CAAC;AAE3G;;GAEG;AACH,eAAO,MAAM,sBAAsB,aACxB,MAAM,gBACF,0BAA0B,eAC3B,eAAe,KAC1B,IA8DF,CAAC;AAqBF;;GAEG;AACH,eAAO,MAAM,uBAAuB,aACzB,MAAM,gBACF,0BAA0B,eAC3B,eAAe,mBACX,MAAM,GAAG,SAAS,eACtB,OAAO,GAAG,MAAM,mBACZ,eAAe,eAAe,CAAC,KAC9C,IAAI,EA0FN,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B,iBAC3B,sBAAsB,SAC7B,MAAM,eACA,eAAe,KAC1B,0BAcD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { getEffectiveMetricField, getForecastAlternateFlagTransform, getForecastEffectiveValueTransform, getLineForecastBoundaryMark, getLineForecastLabelMarks, getLineForecastSpecOptions } from './lineForecastUtils';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lineForecast/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,uBAAuB,EAAE,iCAAiC,EAAE,kCAAkC,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { FormulaTransform, Mark } from 'vega';
2
+ import { LineForecastOptions, LineForecastSpecOptions, LineSpecOptions } from '../types';
3
+ export declare const getForecastAlternateFlagTransform: (name: string, dimension: string, start: LineForecastOptions['start']) => FormulaTransform;
4
+ export declare const getForecastEffectiveValueTransform: (name: string, metric: string, forecastMetric: string) => FormulaTransform;
5
+ /**
6
+ * Resolves the metric field to plot, using the forecast-aware effective value when a forecast is active.
7
+ * @param options
8
+ * @returns string
9
+ */
10
+ export declare const getEffectiveMetricField: ({ alternateSegmentKey, forecasts, metric, name, }: Pick<LineSpecOptions, 'alternateSegmentKey' | 'forecasts' | 'metric' | 'name'>) => string;
11
+ export declare const getLineForecastSpecOptions: (forecast: LineForecastOptions, index: number, lineOptions: LineSpecOptions) => LineForecastSpecOptions;
12
+ export declare const getLineForecastBoundaryMark: (specOpts: LineForecastSpecOptions) => Mark;
13
+ export declare const getLineForecastLabelMarks: (specOpts: LineForecastSpecOptions) => Mark[];
14
+ //# sourceMappingURL=lineForecastUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lineForecastUtils.d.ts","sourceRoot":"","sources":["../../../../src/lineForecast/lineForecastUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAK9C,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEzF,eAAO,MAAM,iCAAiC,SAAU,MAAM,aAAa,MAAM,SAAS,mBAAmB,CAAC,OAAO,CAAC,KAAG,gBAIvH,CAAC;AAEH,eAAO,MAAM,kCAAkC,SAAU,MAAM,UAAU,MAAM,kBAAkB,MAAM,KAAG,gBAIxG,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,sDAKjC,KAAK,eAAe,EAAE,qBAAqB,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC,KAAG,MACF,CAAC;AAEnF,eAAO,MAAM,0BAA0B,aAC3B,mBAAmB,SACtB,MAAM,eACA,eAAe,KAC3B,uBAWD,CAAC;AAEH,eAAO,MAAM,2BAA2B,aAAc,uBAAuB,KAAG,IAqB/E,CAAC;AAEF,eAAO,MAAM,yBAAyB,aAAc,uBAAuB,KAAG,IAAI,EAoDjF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=lineForecastUtils.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lineForecastUtils.test.d.ts","sourceRoot":"","sources":["../../../../src/lineForecast/lineForecastUtils.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,83 @@
1
+ import { Data, NumericValueRef, ProductionRule, Signal, SourceData, Transforms } from 'vega';
2
+ import { LineMarkOptions } from '../line/lineUtils';
3
+ import { LineSpecOptions, ScaleType } from '../types';
4
+ /**
5
+ * The field used to compare rows against the animation cutoff. Time scales need a numeric-ms field
6
+ * (`addLineDrawInTimeMsTransform`) since Vega's time domain is Date-typed; point scales need an
7
+ * ordinal index (`getLineDrawInPointIndexData`) since category values aren't orderable; linear
8
+ * scales use the dimension field directly.
9
+ */
10
+ export declare const getLineDrawInSortField: (scaleType: ScaleType, dimension: string, name: string) => string;
11
+ /**
12
+ * The data source draw-in should read from for a given line: the derived per-name indexed source
13
+ * for point scales (`getLineDrawInPointIndexData`), or `filteredTable` for everything else.
14
+ */
15
+ export declare const getLineDrawInDataSourceName: ({ name, scaleType }: LineSpecOptions) => string;
16
+ /**
17
+ * Point-scale-only: derived source adding each row's ordinal index within the x scale's domain.
18
+ * Point-scale category values aren't numerically orderable, so this index is the numeric proxy
19
+ * draw-in's cutoff/tween math compares against.
20
+ */
21
+ export declare const getLineDrawInPointIndexData: (options: LineSpecOptions) => SourceData;
22
+ /**
23
+ * Adds the numeric-ms field time-scale draw-in compares against, since Vega's time domain is
24
+ * Date-typed and cutoff/tween math needs raw numbers. Only relevant for 'time' scales.
25
+ */
26
+ export declare const addLineDrawInTimeMsTransform: (state: Transforms[], args_0: string) => Transforms[];
27
+ /**
28
+ * Adds a lead-window transform giving each row a pointer to its next point's sort/metric value —
29
+ * used to find and animate the row currently being drawn toward (`getLineDrawInData`). Point scales
30
+ * also get the next point's real category value, since their sort field is an ordinal index that
31
+ * isn't valid for an x-scale lookup.
32
+ */
33
+ export declare const addLineDrawInLeadTransform: (sourceData: Data, options: LineSpecOptions) => void;
34
+ /**
35
+ * Builds the derived data sources that drive the line-draw-in animation:
36
+ * - `${name}_drawInPrev` — the portion of the line already fully drawn
37
+ * - `${name}_drawInTip` — each series' currently-active bracketing point, flagged `isDrawInTip`
38
+ * - `${name}_drawInLerp` — the merged source the line mark actually renders from
39
+ *
40
+ * Tip membership is decided per-row from its own lead field, so no cross-series ordering is needed.
41
+ * Assumes the sort field, `${name}_drawInNextDimValue` (`addLineDrawInLeadTransform`), and
42
+ * `${name}_drawInAnimCutoff` (`addLineDrawInAnimationSignals`) already exist on the source.
43
+ */
44
+ export declare const getLineDrawInData: (options: LineSpecOptions) => Data[];
45
+ /**
46
+ * Adds the shared mount-timer chain (`drawInStart` -> `drawInAnimT` -> `drawInAnimTEased`) every
47
+ * draw-in animated mark reads from.
48
+ * `drawInStart` - captures the wall clock time once at the start of the animation
49
+ * `drawInAnimT` - the animation progess (t) from 0-1
50
+ * `drawInAnimTEased` - the animation progress with easing applied. Current easing formula is in-out quadratic
51
+ */
52
+ export declare const addDrawInClockSignals: (signals: Signal[]) => void;
53
+ /**
54
+ * Adds the signal chain driving this mark's cutoff sweep: the shared mount-timer chain plus a
55
+ * domain-min/max/cutoff triplet scoped to this line's own x scale, so each animated line sweeps its
56
+ * own domain independently.
57
+ *
58
+ * Point scales sweep an ordinal index range instead of the domain's actual values, matching the
59
+ * sort field `getLineDrawInSortField` uses for that scale type.
60
+ */
61
+ export declare const addLineDrawInAnimationSignals: (signals: Signal[], options: LineSpecOptions) => void;
62
+ /**
63
+ * Turns a per-scale lerp-expression builder into the shared dual-metric-axis production rule —
64
+ * the same primary/secondary branch split (via `getDualAxisScaleNames`) every mark's static
65
+ * dual-axis encoding already uses, so bar/line/future marks don't each re-derive it.
66
+ */
67
+ export declare const getDualAxisDrawInRule: (baseScaleName: string, buildExpr: (scaleName: string) => string) => ProductionRule<NumericValueRef>;
68
+ /**
69
+ * X encoding for draw-in animated lines: normal scaled position, except the flagged tip point
70
+ * (`isDrawInTip`) which lerps toward its lead point's position using the per-row tween fraction.
71
+ *
72
+ * Point scales look up the lead position via the next point's real category value
73
+ * (`DRAW_IN_NEXT_CATEGORY_FIELD`) rather than the sort field's ordinal index, which isn't valid
74
+ * scale input. Time/linear scales don't need this — their sort field already is a valid lookup value.
75
+ */
76
+ export declare const getLineDrawInXEncoding: ({ dimension, name, scaleType }: LineMarkOptions) => NumericValueRef;
77
+ /**
78
+ * Y encoding for draw-in animated lines, mirroring {@link getLineDrawInXEncoding}. Dual-metric-axis
79
+ * lines branch onto the primary/secondary scale per series via `getDualAxisDrawInRule`. No
80
+ * `nextLookupField`-style branch is needed here since the metric axis is always numeric.
81
+ */
82
+ export declare const getLineDrawInYEncoding: (lineMarkOptions: LineMarkOptions) => ProductionRule<NumericValueRef>;
83
+ //# sourceMappingURL=drawInAnimationUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawInAnimationUtils.d.ts","sourceRoot":"","sources":["../../../../src/marks/drawInAnimationUtils.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AA4B7F,OAAO,EAAoB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAItE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,cAAe,SAAS,aAAa,MAAM,QAAQ,MAAM,KAAG,MAI9F,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,wBAAyB,eAAe,KAAG,MACH,CAAC;AAEjF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,YAAa,eAAe,KAAG,UActE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,uDAOvC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,eAAgB,IAAI,WAAW,eAAe,KAAG,IA0BvF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,YAAa,eAAe,KAAG,IAAI,EAiChE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,YAAa,MAAM,EAAE,KAAG,IAsBzD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B,YAAa,MAAM,EAAE,WAAW,eAAe,KAAG,IAyB3F,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,kBACjB,MAAM,aACV,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,KACvC,eAAe,eAAe,CAMhC,CAAC;AAaF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,mCAAoC,eAAe,KAAG,eASxF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,oBAAqB,eAAe,KAAG,eAAe,eAAe,CAevG,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=drawInAnimationUtils.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawInAnimationUtils.test.d.ts","sourceRoot":"","sources":["../../../../src/marks/drawInAnimationUtils.test.ts"],"names":[],"mappings":""}