@fundar/data-chart-telling 1.17.0 → 1.18.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.
Files changed (205) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/configuration/config.svelte.js +3 -2
  3. package/dist/index.d.ts +7 -2
  4. package/dist/index.js +2 -0
  5. package/dist/layout/geometry/GeometryLayout.svelte +188 -54
  6. package/dist/layout/hover/HoverDefaults.d.ts +52 -0
  7. package/dist/layout/hover/HoverDefaults.js +96 -0
  8. package/dist/layout/hover/HoverLayers.d.ts +35 -0
  9. package/dist/layout/hover/HoverLayers.js +122 -0
  10. package/dist/layout/hover/HoverSettings.d.ts +1 -3
  11. package/dist/layout/hover/HoverSettings.js +3 -2
  12. package/dist/layout/hover/HoverShapes.d.ts +44 -0
  13. package/dist/layout/hover/HoverShapes.js +103 -0
  14. package/dist/layout/hover/PlotHover.svelte.d.ts +18 -0
  15. package/dist/layout/hover/PlotHover.svelte.js +54 -1
  16. package/dist/layout/legend/LegendState.svelte.d.ts +2 -0
  17. package/dist/layout/legend/LegendState.svelte.js +5 -0
  18. package/dist/layout/plot/Core.svelte +2 -2
  19. package/dist/layout/plot/PublicPlotContext.d.ts +6 -0
  20. package/dist/layout/plot/PublicPlotContext.js +8 -0
  21. package/dist/layout/styles/ValueLabels.d.ts +12 -4
  22. package/dist/layout/styles/ValueLabels.js +22 -13
  23. package/dist/layout/tooltip/TooltipState.svelte.d.ts +8 -9
  24. package/dist/layout/tooltip/TooltipState.svelte.js +28 -29
  25. package/dist/markers/MarkerKinds.d.ts +5 -0
  26. package/dist/markers/MarkerKinds.js +1 -0
  27. package/dist/markers/band/BandMarker.svelte +74 -0
  28. package/dist/markers/band/BandMarker.svelte.d.ts +7 -0
  29. package/dist/markers/band/Bands.d.ts +16 -0
  30. package/dist/markers/band/Bands.js +48 -0
  31. package/dist/markers/bar/BarMarker.svelte +23 -66
  32. package/dist/markers/hover/HoverMarker.svelte +7 -265
  33. package/dist/markers/hover/HoverMarker.svelte.d.ts +4 -27
  34. package/dist/markers/utils/PointPixel.d.ts +37 -0
  35. package/dist/markers/utils/PointPixel.js +44 -0
  36. package/dist/phases/Pipeline.d.ts +7 -7
  37. package/dist/phases/Pipeline.js +12 -9
  38. package/dist/phases/context/ContextPhase.d.ts +22 -0
  39. package/dist/phases/context/ContextPhase.js +23 -0
  40. package/dist/phases/context/RowContext.d.ts +35 -0
  41. package/dist/phases/context/RowContext.js +95 -0
  42. package/dist/phases/data/DataPhase.d.ts +4 -4
  43. package/dist/phases/data/DataPhase.js +7 -7
  44. package/dist/phases/hover/HoverPhase.d.ts +6 -7
  45. package/dist/phases/hover/HoverPhase.js +28 -23
  46. package/dist/phases/mapping/MappingPhase.d.ts +4 -4
  47. package/dist/phases/mapping/MappingPhase.js +2 -2
  48. package/dist/phases/markers/MarkerStyles.d.ts +8 -0
  49. package/dist/phases/markers/MarkerStyles.js +15 -0
  50. package/dist/phases/markers/MarkersPhase.d.ts +4 -4
  51. package/dist/phases/markers/MarkersPhase.js +4 -4
  52. package/dist/phases/scales/ScalesPhase.d.ts +4 -4
  53. package/dist/phases/scales/ScalesPhase.js +4 -4
  54. package/dist/phases/sharedScales/SharedScalesPhase.d.ts +2 -2
  55. package/dist/phases/sharedScales/SharedScalesPhase.js +2 -2
  56. package/dist/phases/statistics/MarkerGrouping.d.ts +0 -9
  57. package/dist/phases/statistics/MarkerGrouping.js +0 -16
  58. package/dist/phases/styles/StylesPhase.d.ts +3 -3
  59. package/dist/phases/styles/StylesPhase.js +2 -2
  60. package/dist/phases/tooltip/TooltipPhase.d.ts +4 -4
  61. package/dist/phases/tooltip/TooltipPhase.js +10 -7
  62. package/dist/phases/transforms/TransformsPhase.d.ts +3 -3
  63. package/dist/phases/transforms/TransformsPhase.js +2 -2
  64. package/dist/plots/correlation/heatmap/defaults.d.ts +2 -2
  65. package/dist/plots/correlation/heatmap/defaults.js +21 -6
  66. package/dist/plots/correlation/heatmap/markers.d.ts +2 -2
  67. package/dist/plots/correlation/heatmap/markers.js +4 -3
  68. package/dist/plots/correlation/scatter/defaults.d.ts +2 -2
  69. package/dist/plots/correlation/scatter/defaults.js +9 -3
  70. package/dist/plots/correlation/scatter/markers.d.ts +2 -2
  71. package/dist/plots/correlation/scatter/markers.js +4 -3
  72. package/dist/plots/distribution/box/BoxSummaries.d.ts +17 -8
  73. package/dist/plots/distribution/box/BoxSummaries.js +90 -40
  74. package/dist/plots/distribution/box/defaults.d.ts +2 -2
  75. package/dist/plots/distribution/box/defaults.js +9 -6
  76. package/dist/plots/distribution/box/markers.d.ts +2 -2
  77. package/dist/plots/distribution/box/markers.js +3 -3
  78. package/dist/plots/distribution/density/defaults.d.ts +2 -2
  79. package/dist/plots/distribution/density/defaults.js +17 -1
  80. package/dist/plots/distribution/density/markers.d.ts +2 -2
  81. package/dist/plots/distribution/density/markers.js +4 -4
  82. package/dist/plots/distribution/histogram/defaults.d.ts +2 -2
  83. package/dist/plots/distribution/histogram/defaults.js +20 -25
  84. package/dist/plots/distribution/histogram/markers.d.ts +2 -2
  85. package/dist/plots/distribution/histogram/markers.js +5 -4
  86. package/dist/plots/distribution/pyramid/defaults.d.ts +2 -2
  87. package/dist/plots/distribution/pyramid/defaults.js +4 -1
  88. package/dist/plots/distribution/pyramid/markers.d.ts +2 -2
  89. package/dist/plots/distribution/pyramid/markers.js +4 -3
  90. package/dist/plots/distribution/violin/defaults.d.ts +2 -2
  91. package/dist/plots/distribution/violin/defaults.js +9 -7
  92. package/dist/plots/distribution/violin/markers.d.ts +2 -2
  93. package/dist/plots/distribution/violin/markers.js +3 -3
  94. package/dist/plots/evolution/area/defaults.d.ts +2 -2
  95. package/dist/plots/evolution/area/defaults.js +1 -1
  96. package/dist/plots/evolution/area/markers.d.ts +2 -2
  97. package/dist/plots/evolution/area/markers.js +4 -4
  98. package/dist/plots/evolution/line/defaults.d.ts +2 -2
  99. package/dist/plots/evolution/line/defaults.js +1 -1
  100. package/dist/plots/evolution/line/markers.d.ts +2 -2
  101. package/dist/plots/evolution/line/markers.js +3 -3
  102. package/dist/plots/evolution/slope/defaults.d.ts +2 -2
  103. package/dist/plots/evolution/slope/defaults.js +8 -4
  104. package/dist/plots/evolution/slope/markers.d.ts +2 -2
  105. package/dist/plots/evolution/slope/markers.js +3 -3
  106. package/dist/plots/evolution/sparkline/defaults.d.ts +2 -2
  107. package/dist/plots/evolution/sparkline/defaults.js +5 -2
  108. package/dist/plots/evolution/sparkline/markers.d.ts +2 -2
  109. package/dist/plots/evolution/sparkline/markers.js +3 -3
  110. package/dist/plots/map/geo/Core.svelte +3 -3
  111. package/dist/plots/map/geo/defaults.d.ts +2 -2
  112. package/dist/plots/map/geo/phases/data.d.ts +1 -1
  113. package/dist/plots/map/geo/phases/data.js +1 -1
  114. package/dist/plots/map/geo/phases/hover.d.ts +2 -2
  115. package/dist/plots/map/geo/phases/hover.js +3 -3
  116. package/dist/plots/map/geo/phases/markers.d.ts +2 -2
  117. package/dist/plots/map/geo/phases/markers.js +3 -3
  118. package/dist/plots/map/geo/phases/scales.d.ts +2 -2
  119. package/dist/plots/map/geo/phases/scales.js +2 -2
  120. package/dist/plots/part-of-a-whole/treemap/defaults.d.ts +2 -2
  121. package/dist/plots/part-of-a-whole/treemap/defaults.js +37 -21
  122. package/dist/plots/ranking/bar/defaults.d.ts +2 -2
  123. package/dist/plots/ranking/bar/defaults.js +13 -7
  124. package/dist/plots/ranking/bar/markers.d.ts +3 -3
  125. package/dist/plots/ranking/bar/markers.js +8 -7
  126. package/dist/plots/ranking/bullet/defaults.d.ts +2 -2
  127. package/dist/plots/ranking/bullet/defaults.js +4 -4
  128. package/dist/plots/ranking/bullet/markers.d.ts +3 -3
  129. package/dist/plots/ranking/bullet/markers.js +9 -9
  130. package/dist/plots/ranking/cleveland/ClevelandMarkers.d.ts +3 -3
  131. package/dist/plots/ranking/cleveland/ClevelandMarkers.js +11 -10
  132. package/dist/plots/ranking/cleveland/defaults.d.ts +2 -2
  133. package/dist/plots/ranking/cleveland/defaults.js +7 -4
  134. package/dist/plots/ranking/dumbbell/defaults.d.ts +2 -2
  135. package/dist/plots/ranking/forest/defaults.d.ts +2 -2
  136. package/dist/plots/ranking/lollipop/defaults.d.ts +2 -2
  137. package/dist/types/configuration/styling.d.ts +4 -0
  138. package/dist/types/layout/context.d.ts +21 -0
  139. package/dist/types/layout/context.js +1 -0
  140. package/dist/types/layout/hover.d.ts +3 -0
  141. package/dist/types/layout/styles/values.d.ts +8 -2
  142. package/dist/types/layout/tooltip.d.ts +5 -10
  143. package/dist/types/markers/axis/axisBasedMarkersConfig.d.ts +2 -1
  144. package/dist/types/markers/axis/band.d.ts +24 -0
  145. package/dist/types/markers/axis/band.js +1 -0
  146. package/dist/types/markers/axis/bar.d.ts +2 -2
  147. package/dist/types/markers/axis/hover.d.ts +60 -15
  148. package/dist/types/markers/channels/commonMarkerConfig.d.ts +6 -2
  149. package/dist/types/markers/common.d.ts +1 -0
  150. package/dist/types/markers/common.js +1 -0
  151. package/dist/types/phases/context/phase.d.ts +7 -0
  152. package/dist/types/phases/context/phase.js +1 -0
  153. package/dist/types/phases/data/phase.d.ts +2 -2
  154. package/dist/types/phases/hover/phase.d.ts +10 -7
  155. package/dist/types/phases/index.d.ts +2 -1
  156. package/dist/types/phases/kind.d.ts +11 -8
  157. package/dist/types/phases/mapping/phase.d.ts +2 -2
  158. package/dist/types/phases/markers/phase.d.ts +3 -3
  159. package/dist/types/phases/scales/phase.d.ts +4 -4
  160. package/dist/types/phases/stage.d.ts +3 -3
  161. package/dist/types/phases/state.d.ts +1 -1
  162. package/dist/types/phases/styles/phase.d.ts +3 -2
  163. package/dist/types/phases/transforms/phase.d.ts +2 -2
  164. package/dist/types/plots/constants.d.ts +3 -5
  165. package/dist/types/plots/correlation/heatmap/state.d.ts +2 -2
  166. package/dist/types/plots/correlation/scatter/state.d.ts +2 -2
  167. package/dist/types/plots/distribution/box/props.d.ts +23 -1
  168. package/dist/types/plots/distribution/box/state.d.ts +6 -17
  169. package/dist/types/plots/distribution/density/state.d.ts +2 -2
  170. package/dist/types/plots/distribution/histogram/props.d.ts +14 -1
  171. package/dist/types/plots/distribution/histogram/state.d.ts +2 -2
  172. package/dist/types/plots/distribution/pyramid/state.d.ts +2 -2
  173. package/dist/types/plots/distribution/violin/props.d.ts +2 -1
  174. package/dist/types/plots/distribution/violin/state.d.ts +2 -2
  175. package/dist/types/plots/evolution/area/state.d.ts +2 -2
  176. package/dist/types/plots/evolution/line/state.d.ts +2 -2
  177. package/dist/types/plots/evolution/slope/state.d.ts +2 -2
  178. package/dist/types/plots/evolution/sparkline/state.d.ts +2 -2
  179. package/dist/types/plots/map/geo/state.d.ts +1 -1
  180. package/dist/types/plots/part-of-a-whole/treemap/props.d.ts +14 -4
  181. package/dist/types/plots/part-of-a-whole/treemap/state.d.ts +2 -2
  182. package/dist/types/plots/props.d.ts +3 -0
  183. package/dist/types/plots/ranking/bar/state.d.ts +2 -2
  184. package/dist/types/plots/ranking/bullet/state.d.ts +2 -2
  185. package/dist/types/plots/ranking/cleveland/state.d.ts +2 -2
  186. package/dist/types/plots/ranking/dumbbell/state.d.ts +2 -2
  187. package/dist/types/plots/ranking/forest/state.d.ts +2 -2
  188. package/dist/types/plots/ranking/lollipop/state.d.ts +2 -2
  189. package/docs/markers.md +34 -2
  190. package/docs/plots/evolution/line.md +1 -1
  191. package/docs/plots/evolution/slope.md +1 -1
  192. package/docs/plots/part-of-a-whole/treemap.md +36 -2
  193. package/docs/plots/ranking/bar.md +1 -0
  194. package/docs/plots/ranking/cleveland.md +1 -1
  195. package/docs/state.md +33 -0
  196. package/docs/styles-and-segments.md +2 -2
  197. package/docs/theming.md +2 -1
  198. package/docs/tooltip-and-hover.md +81 -3
  199. package/examples/LineDates.svelte +1 -1
  200. package/examples/ResponsiveLine.svelte +3 -1
  201. package/examples/TreemapHover.svelte +25 -0
  202. package/examples/ValueLabels.svelte +1 -1
  203. package/llms-full.txt +8 -6
  204. package/llms.txt +2 -1
  205. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import type { GeoPlotState, GeoPlotCtx } from '../../../types/plots/map/geo/state';
1
+ import type { GeoPlotState, GeoPlotEnv } from '../../../types/plots/map/geo/state';
2
2
  import { Pipeline } from '../../../phases/Pipeline';
3
3
  /** GeoPlot's own pipeline (data, scales, markers, tooltip, hover), run over the state its core seeds, hovering one feature at a time. */
4
- export declare function buildGeoDefaults<TProps extends Record<string, unknown>>(): Pipeline<GeoPlotState<TProps>, GeoPlotCtx<TProps>>;
4
+ export declare function buildGeoDefaults<TProps extends Record<string, unknown>>(): Pipeline<GeoPlotState<TProps>, GeoPlotEnv<TProps>>;
@@ -1,6 +1,6 @@
1
1
  import type { GeoPlotState } from '../../../../types/plots/map/geo/state';
2
2
  /**
3
3
  * GeoPlot's "data" phase: every feature tagged with its resolved id/centroid,
4
- * then reduced by `excludeParts`. Reads no ctx.
4
+ * then reduced by `excludeParts`. Reads no env.
5
5
  */
6
6
  export declare function buildData<TProps extends Record<string, unknown>>(state: GeoPlotState<TProps>): GeoPlotState<TProps>;
@@ -3,7 +3,7 @@ import { GeoGeometry } from '../GeoGeometry';
3
3
  import { GeoFeatures } from '../GeoFeatures.svelte';
4
4
  /**
5
5
  * GeoPlot's "data" phase: every feature tagged with its resolved id/centroid,
6
- * then reduced by `excludeParts`. Reads no ctx.
6
+ * then reduced by `excludeParts`. Reads no env.
7
7
  */
8
8
  export function buildData(state) {
9
9
  const { rawFeatures, featureId, excludeParts } = state;
@@ -1,4 +1,4 @@
1
- import type { GeoPlotState, GeoPlotCtx } from '../../../../types/plots/map/geo/state';
1
+ import type { GeoPlotState, GeoPlotEnv } from '../../../../types/plots/map/geo/state';
2
2
  /** Whether a pointer event is over an `inset` marker's panel, which has its own hover. */
3
3
  export declare function isOverInset(e: PointerEvent): boolean;
4
4
  /**
@@ -6,4 +6,4 @@ export declare function isOverInset(e: PointerEvent): boolean;
6
6
  * feature under the cursor and read as its id. A feature outside the active
7
7
  * legend range stays drawn, dimmed, but is never a candidate.
8
8
  */
9
- export declare function buildHover<TProps extends Record<string, unknown>>(state: GeoPlotState<TProps>, ctx: GeoPlotCtx<TProps>): GeoPlotState<TProps>;
9
+ export declare function buildHover<TProps extends Record<string, unknown>>(state: GeoPlotState<TProps>, env: GeoPlotEnv<TProps>): GeoPlotState<TProps>;
@@ -10,9 +10,9 @@ export function isOverInset(e) {
10
10
  * feature under the cursor and read as its id. A feature outside the active
11
11
  * legend range stays drawn, dimmed, but is never a candidate.
12
12
  */
13
- export function buildHover(state, ctx) {
13
+ export function buildHover(state, env) {
14
14
  const { color, tooltip, authoredMarkers } = state;
15
- const { range } = ctx;
15
+ const { range } = env;
16
16
  const features = state.features;
17
17
  const label = (f) => f.__id;
18
18
  const points = features
@@ -28,7 +28,7 @@ export function buildHover(state, ctx) {
28
28
  defaultStrategy: 'punctual',
29
29
  // Match the feature under the cursor, not the nearest centroid.
30
30
  pointMatching: 'contains',
31
- number: NumberFormat.of(NumberFormat.displayOf(tooltip), ctx.cfg)
31
+ number: NumberFormat.of(NumberFormat.displayOf(tooltip), env.cfg)
32
32
  }),
33
33
  // A map has no axes for a crosshair: 'punctual' only means an exact match.
34
34
  strategy: 'punctual',
@@ -1,4 +1,4 @@
1
- import type { GeoPlotState, GeoPlotCtx } from '../../../../types/plots/map/geo/state';
1
+ import type { GeoPlotState, GeoPlotEnv } from '../../../../types/plots/map/geo/state';
2
2
  /**
3
3
  * GeoPlot's "markers" phase: per-feature style resolution/grouping, the base
4
4
  * `'geo'` marker(s), and the full draw order - any authored marker with
@@ -6,4 +6,4 @@ import type { GeoPlotState, GeoPlotCtx } from '../../../../types/plots/map/geo/s
6
6
  * with any `hover` marker moved last. The base marker(s) match the pointer
7
7
  * themselves, over the features inside the legend's range.
8
8
  */
9
- export declare function buildMarkers<TProps extends Record<string, unknown>>(state: GeoPlotState<TProps>, ctx: GeoPlotCtx<TProps>): GeoPlotState<TProps>;
9
+ export declare function buildMarkers<TProps extends Record<string, unknown>>(state: GeoPlotState<TProps>, env: GeoPlotEnv<TProps>): GeoPlotState<TProps>;
@@ -19,9 +19,9 @@ function isBehindMarker(marker) {
19
19
  * with any `hover` marker moved last. The base marker(s) match the pointer
20
20
  * themselves, over the features inside the legend's range.
21
21
  */
22
- export function buildMarkers(state, ctx) {
22
+ export function buildMarkers(state, env) {
23
23
  const { features, segments, authoredMarkers, color, grouping, resolveColor, resolveOpacity } = state;
24
- const { range, fill, fillOpacity, stroke, strokeWidth, cfg, onFeatureClick } = ctx;
24
+ const { range, fill, fillOpacity, stroke, strokeWidth, cfg, onFeatureClick } = env;
25
25
  const OPACITY_STEPS = 32;
26
26
  function rangeFilteredStyle(base, f) {
27
27
  if (range == null || !color)
@@ -67,6 +67,6 @@ export function buildMarkers(state, ctx) {
67
67
  const behindMarkers = authoredMarkers.filter(isBehindMarker);
68
68
  const frontMarkers = authoredMarkers.filter((m) => !isBehindMarker(m) && m.type !== 'geo-hover');
69
69
  const hoverMarker = authoredMarkers.find((m) => m.type === 'geo-hover');
70
- const markers = MarkerStyles.resolveAll(MarkerChannels.inheritAll([...behindMarkers, ...featureMarkers, ...frontMarkers, ...(hoverMarker ? [hoverMarker] : [])], state.scales), { cfg: ctx.cfg });
70
+ const markers = MarkerStyles.resolveAll(MarkerChannels.inheritAll([...behindMarkers, ...featureMarkers, ...frontMarkers, ...(hoverMarker ? [hoverMarker] : [])], state.scales), { cfg: env.cfg });
71
71
  return { ...state, markers, styleGroups };
72
72
  }
@@ -1,4 +1,4 @@
1
- import type { GeoPlotState, GeoPlotCtx } from '../../../../types/plots/map/geo/state';
1
+ import type { GeoPlotState, GeoPlotEnv } from '../../../../types/plots/map/geo/state';
2
2
  /**
3
3
  * GeoPlot's "scales" phase: each feature's own resolved color (mirrors
4
4
  * HeatmapPlot's own), with a per-feature override for whichever segment
@@ -7,4 +7,4 @@ import type { GeoPlotState, GeoPlotCtx } from '../../../../types/plots/map/geo/s
7
7
  * the features that share its own key, so e.g. two grouping buckets each
8
8
  * get a ramp scaled to their own value range, not the whole dataset's.
9
9
  */
10
- export declare function buildScales<TProps extends Record<string, unknown>>(state: GeoPlotState<TProps>, ctx: GeoPlotCtx<TProps>): GeoPlotState<TProps>;
10
+ export declare function buildScales<TProps extends Record<string, unknown>>(state: GeoPlotState<TProps>, env: GeoPlotEnv<TProps>): GeoPlotState<TProps>;
@@ -10,9 +10,9 @@ import { GeoSegments } from '../GeoSegments';
10
10
  * the features that share its own key, so e.g. two grouping buckets each
11
11
  * get a ramp scaled to their own value range, not the whole dataset's.
12
12
  */
13
- export function buildScales(state, ctx) {
13
+ export function buildScales(state, env) {
14
14
  const { scales, features, color, grouping, opacity, segments } = state;
15
- const { range, cfg } = ctx;
15
+ const { range, cfg } = env;
16
16
  const colorValues = color
17
17
  ? features.map((f) => color(f)).filter((v) => v != null)
18
18
  : [];
@@ -1,5 +1,5 @@
1
1
  import type { AxisPlotDefaults } from '../../../types/phases';
2
- import type { TreemapPlotState, TreemapPlotCtx } from '../../../types/plots/part-of-a-whole/treemap/state';
2
+ import type { TreemapPlotState, TreemapPlotEnv } from '../../../types/plots/part-of-a-whole/treemap/state';
3
3
  /**
4
4
  * TreemapPlot on the shared pipeline: its rows are the tiles of the `treemap` transform, laid out in a unit square
5
5
  * the plot's two continuous axes span (hidden). Its series are the outermost level of its `grouping`, which colors
@@ -7,4 +7,4 @@ import type { TreemapPlotState, TreemapPlotCtx } from '../../../types/plots/part
7
7
  * hovering its row: an invisible `rect` over each one drives the plot's hover, and its tooltip names the tile and
8
8
  * gives its share.
9
9
  */
10
- export declare function buildTreemapDefaults<TData extends Record<string, unknown>>(): AxisPlotDefaults<TreemapPlotState<TData>, TreemapPlotCtx>;
10
+ export declare function buildTreemapDefaults<TData extends Record<string, unknown>>(): AxisPlotDefaults<TreemapPlotState<TData>, TreemapPlotEnv>;
@@ -1,4 +1,6 @@
1
1
  import { TREEMAP_ROW } from '../../../phases/transforms/methods/TreemapTransform';
2
+ import { HoverDefaults } from '../../../layout/hover/HoverDefaults';
3
+ import { RowContext } from '../../../phases/context/RowContext';
2
4
  import { NumberFormat } from '../../../utils/NumberFormat';
3
5
  import { Grouping } from '../../../utils/grouping';
4
6
  import { getConfiguration } from '../../../configuration/config.svelte';
@@ -13,14 +15,22 @@ const DEFAULT_ASPECT = 1.6;
13
15
  function shareDisplay(values) {
14
16
  return { ...NumberFormat.displayOf(values), suffix: values?.suffix ?? '%' };
15
17
  }
16
- /** A tile's name, path and share (from `0` to `100`), as the transform left them on its row. */
18
+ /**
19
+ * What a treemap knows of a tile, as the transform left it on its row: its name, path, summed value and share
20
+ * (from `0` to `100`). The tiles sit in a unit square, so they have no `x` or `y` to read.
21
+ */
17
22
  function tileOf(row) {
18
23
  return {
19
24
  name: String(row[TREEMAP_ROW.name] ?? ''),
20
25
  path: row[TREEMAP_ROW.path] ?? [],
21
- share: Number(row[TREEMAP_ROW.share]) * 100
26
+ value: Number(row[TREEMAP_ROW.value]),
27
+ share: Number(row[TREEMAP_ROW.share]) * 100,
28
+ x: undefined,
29
+ y: undefined
22
30
  };
23
31
  }
32
+ /** A tile's context, as the "context" phase left it on its row. */
33
+ const contextOf = (row) => RowContext.of(row);
24
34
  /**
25
35
  * The plot's tiles: a `treemap` of its `value`, nested by the levels of its `grouping` (its `color` when unset,
26
36
  * as every plot groups by it then) and shaped for its box,
@@ -50,7 +60,7 @@ function edgesOf(state) {
50
60
  * (`'Tertiary.Finance'`), outermost first, so the more specific wins. The series' own are in its style already.
51
61
  */
52
62
  function pathKeysOf(state, row) {
53
- const { path } = tileOf(row);
63
+ const { path } = contextOf(row);
54
64
  return path
55
65
  .slice(1)
56
66
  .map((_, i) => path.slice(0, i + 2).join(Grouping.SEPARATOR))
@@ -60,35 +70,37 @@ function pathKeysOf(state, row) {
60
70
  * The tiles as `rect` markers, each with a `label`: the name of the tile over its share, fitted to it. A series'
61
71
  * tiles take its style - its color, under `styles.area` and the segments keyed by it (and `default`) - and the
62
72
  * segments keyed by a tile's path restyle it, so the tiles split into one marker per style. The legend's dimming
63
- * goes over all of them.
73
+ * goes over all of them, and the hover marker's `active` and `others` over the tiles it reaches.
64
74
  */
65
- function buildMarks(state, ctx) {
75
+ function buildMarks(state, env) {
66
76
  if (!state.processedData?.data.length)
67
77
  return [];
68
- const look = ctx.cfg.treemap;
78
+ const look = env.cfg.treemap;
69
79
  const edges = edgesOf(state);
70
80
  const labels = state.valueLabels?.show ? state.valueLabels : undefined;
71
- const number = NumberFormat.of(shareDisplay(state.values), ctx.cfg, SHARE_DECIMALS);
72
- const shareText = (row, series) => {
73
- const { share } = tileOf(row);
74
- return state.values?.format ? state.values.format(share, series, row, number) : number(share);
81
+ const number = NumberFormat.of(shareDisplay(state.values), env.cfg, SHARE_DECIMALS);
82
+ const shareText = (row) => {
83
+ const context = contextOf(row);
84
+ return state.values?.format
85
+ ? state.values.format(context.share, number, context)
86
+ : number(context.share);
75
87
  };
76
88
  /** The label of a series' tiles: the name over the share, fitted - or the share alone where the name does not fit. */
77
- const labelOf = (labels, series) => {
78
- const shape = labels.shapeLabel(ctx, (row) => `${tileOf(row).name}
79
- ${shareText(row, series)}`, { fontSize: look.fontSize });
89
+ const labelOf = (labels) => {
90
+ const shape = labels.shapeLabel(env, (row) => `${contextOf(row).name}
91
+ ${shareText(row)}`, { fontSize: look.fontSize });
80
92
  return {
81
93
  ...shape,
82
94
  styles: { lineHeight: look.lineHeight, ...shape.styles },
83
- fit: { padding: look.padding, fallback: (row) => shareText(row, series) }
95
+ fit: { padding: look.padding, fallback: (row) => shareText(row) }
84
96
  };
85
97
  };
86
98
  return (state.processedGroups ?? []).flatMap((group) => {
87
99
  const series = group.series.name;
88
- const dimmed = ctx.interaction?.fillFor(series);
100
+ const dimmed = env.interaction?.fillFor(series);
89
101
  const seriesColor = state.colorForSeries(series);
90
102
  /** A tile's color: its series', or a tone of it by its path while `scales.color.depth` asks for one. */
91
- const colorOf = (row) => state.colorForPath ? state.colorForPath(tileOf(row).path) : seriesColor;
103
+ const colorOf = (row) => state.colorForPath ? state.colorForPath(contextOf(row).path) : seriesColor;
92
104
  return group.visualSegments.flatMap((segment) => {
93
105
  const styled = new Map();
94
106
  for (const row of segment.data) {
@@ -111,7 +123,8 @@ ${shareText(row, series)}`, { fontSize: look.fontSize });
111
123
  stroke: style.stroke ?? look.stroke,
112
124
  strokeWidth: style.strokeWidth ?? look.strokeWidth
113
125
  },
114
- label: labels && labelOf(labels, series)
126
+ label: labels && labelOf(labels),
127
+ hover: 'style'
115
128
  };
116
129
  });
117
130
  });
@@ -133,6 +146,8 @@ export function buildTreemapDefaults() {
133
146
  },
134
147
  // An omitted sector keeps its tiles' room, and every other tile its share; a rescaled one does not.
135
148
  transforms: { transforms: buildTransforms, keepsOmitted: true },
149
+ // A tile's name, path, value and share, for its label, its tooltip and its hover.
150
+ context: () => tileOf,
136
151
  scales: {
137
152
  defaults: () => ({
138
153
  x: { axisDisplay: 'none', grid: false },
@@ -146,22 +161,23 @@ export function buildTreemapDefaults() {
146
161
  strategy: 'punctual',
147
162
  // A tile is hovered through its own hit area, not through whichever point the pointer is nearest.
148
163
  pointMatching: 'contains',
164
+ // A tile has no axes for a crosshair, and writes its own label: its hover only restyles the tiles.
165
+ marker: (_state, env) => HoverDefaults.shapes(env.cfg),
149
166
  hitAreas: (state, hover) => hover.points.map(({ row }) => ({
150
167
  type: 'rect',
151
168
  data: [row],
152
169
  ...edgesOf(state),
153
170
  styles: { fill: 'transparent' },
154
- hover: hover.active
171
+ hover: hover.active && 'trigger'
155
172
  })),
156
173
  format: (state) => {
157
174
  const number = NumberFormat.of(shareDisplay(state.values), getConfiguration(), SHARE_DECIMALS);
158
175
  return ((row) => {
159
- const tile = tileOf(row);
176
+ const tile = contextOf(row);
160
177
  return `${tile.name}: ${number(tile.share)}`;
161
178
  });
162
179
  },
163
- label: () => ((row) => tileOf(row).name),
164
- context: () => ((row) => ({ share: tileOf(row).share }))
180
+ label: () => ((row) => contextOf(row).name)
165
181
  }
166
182
  };
167
183
  }
@@ -1,6 +1,6 @@
1
1
  import type { AxisPlotDefaults } from '../../../types/phases';
2
2
  import type { AxisScale } from '../../../types/layout/scales';
3
- import type { BarPlotState, BarPlotCtx } from '../../../types/plots/ranking/bar/state';
3
+ import type { BarPlotState, BarPlotEnv } from '../../../types/plots/ranking/bar/state';
4
4
  /**
5
5
  * The domain a bar plot fits to its own bars on its value axis: from zero to
6
6
  * the tallest span (and the `extra` values a plot draws beyond its bars), niced to as many ticks as fit the plot. Left out when the
@@ -13,4 +13,4 @@ export declare function fitValueDomain<TData extends Record<string, unknown>>(st
13
13
  * it off the values - its own scales (padding, bar layout) and markers.
14
14
  * Its plot defaults to: hover along the category axis, timeline tweens matched per category and group.
15
15
  */
16
- export declare function buildBarDefaults<TData extends Record<string, unknown>>(): AxisPlotDefaults<BarPlotState<TData>, BarPlotCtx>;
16
+ export declare function buildBarDefaults<TData extends Record<string, unknown>>(): AxisPlotDefaults<BarPlotState<TData>, BarPlotEnv>;
@@ -3,6 +3,7 @@ import { buildMarks, buildHitAreas, buildBarGeometry } from './markers';
3
3
  import { NiceTicks } from '../../../layout/scales/NiceTicks';
4
4
  import { SERIES_KEY } from '../../../phases/transforms/TransformsPhase';
5
5
  import { PlotAxes } from '../../../phases/data/PlotAxes';
6
+ import { HoverDefaults } from '../../../layout/hover/HoverDefaults';
6
7
  /**
7
8
  * The domain a bar plot fits to its own bars on its value axis: from zero to
8
9
  * the tallest span (and the `extra` values a plot draws beyond its bars), niced to as many ticks as fit the plot. Left out when the
@@ -53,8 +54,8 @@ export function buildBarDefaults() {
53
54
  },
54
55
  scales: {
55
56
  zero: ['value'],
56
- defaults: (_state, ctx) => ({
57
- category: { paddingInner: ctx.cfg.bar.paddingInner, paddingOuter: ctx.cfg.bar.paddingOuter }
57
+ defaults: (_state, env) => ({
58
+ category: { paddingInner: env.cfg.bar.paddingInner, paddingOuter: env.cfg.bar.paddingOuter }
58
59
  }),
59
60
  fit: (state) => fitValueDomain(state)
60
61
  },
@@ -85,8 +86,8 @@ export function buildBarDefaults() {
85
86
  return labels
86
87
  .extremes(state.resolvedSeries ?? [], PlotAxes.valueOf(state), 'both')
87
88
  .map(({ series, value }) => value < 0
88
- ? labels.edgeBox(labels.format(value, series.name), { x: 'before', y: 'middle' }, { x: -offset }, ['left'])
89
- : labels.edgeBox(labels.format(value, series.name), { x: 'after', y: 'middle' }, { x: offset }, ['right']));
89
+ ? labels.edgeBox(labels.format(value, undefined, series.name), { x: 'before', y: 'middle' }, { x: -offset }, ['left'])
90
+ : labels.edgeBox(labels.format(value, undefined, series.name), { x: 'after', y: 'middle' }, { x: offset }, ['right']));
90
91
  }
91
92
  }
92
93
  },
@@ -95,13 +96,18 @@ export function buildBarDefaults() {
95
96
  // Each bar matched by its own band (see `buildHitAreas`); a grouped bar's dot is
96
97
  // drawn in its series' slice of the band.
97
98
  pointMatching: 'contains',
98
- decorate: (state, ctx) => {
99
- const { sliceOf } = buildBarGeometry(state, ctx.cfg.bar.seriesPadding);
99
+ decorate: (state, env) => {
100
+ const { sliceOf } = buildBarGeometry(state, env.cfg.bar.seriesPadding);
100
101
  return (row) => ({
101
102
  areaInset: sliceOf(String(row[SERIES_KEY]))
102
103
  });
103
104
  },
104
- hitAreas: buildHitAreas
105
+ hitAreas: buildHitAreas,
106
+ // The hovered category's band behind its bars - its series' slice of it, when that bar alone is hovered.
107
+ marker: (state) => ({
108
+ back: [HoverDefaults.band(state.axes?.isHorizontal ? 'y' : 'x')],
109
+ front: []
110
+ })
105
111
  },
106
112
  timeline: { interpolation: { value: 'value', key: ['category', 'grouping'] } }
107
113
  };
@@ -1,5 +1,5 @@
1
1
  import type { BarMarkerConfig } from '../../../types/markers/common';
2
- import type { BarPlotState, BarPlotCtx } from '../../../types/plots/ranking/bar/state';
2
+ import type { BarPlotState, BarPlotEnv } from '../../../types/plots/ranking/bar/state';
3
3
  import type { ProcessedRow } from '../../../types/phases';
4
4
  import type { AxisValue } from '../../../types/layout/mapping';
5
5
  import type { BandSlice } from '../../../types/layout/hover';
@@ -25,11 +25,11 @@ export declare function buildBarGeometry<TData extends Record<string, unknown>>(
25
25
  * slice of it. The pointer needn't be over the visible bar. They drive the
26
26
  * plot's hover when it is active.
27
27
  */
28
- export declare function buildHitAreas<TData extends Record<string, unknown>>(state: BarPlotState<TData>, hover: HoverConfig<any>, ctx: BarPlotCtx): BarMarkerConfig[];
28
+ export declare function buildHitAreas<TData extends Record<string, unknown>>(state: BarPlotState<TData>, hover: HoverConfig<any>, env: BarPlotEnv): BarMarkerConfig[];
29
29
  /**
30
30
  * BarPlot's "markers" phase: visible `role: 'segment'` bars - real data plus
31
31
  * gap fills - drawing the rows the "transforms" phase left, prepended onto
32
32
  * whatever the "statistics" phase already put in `state.markers`, and its
33
33
  * value labels on top of everything.
34
34
  */
35
- export declare function buildMarks<TData extends Record<string, unknown>>(state: BarPlotState<TData>, ctx: BarPlotCtx): AxisBasedMarkersConfig[];
35
+ export declare function buildMarks<TData extends Record<string, unknown>>(state: BarPlotState<TData>, env: BarPlotEnv): AxisBasedMarkersConfig[];
@@ -46,8 +46,8 @@ export function buildBarGeometry(state, seriesPadding) {
46
46
  */
47
47
  export function buildHitAreas(state,
48
48
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
49
- hover, ctx) {
50
- const { categoryOf, sliceOf } = buildBarGeometry(state, ctx.cfg.bar.seriesPadding);
49
+ hover, env) {
50
+ const { categoryOf, sliceOf } = buildBarGeometry(state, env.cfg.bar.seriesPadding);
51
51
  const isHorizontal = state.axes?.isHorizontal ?? false;
52
52
  return hover.points.map(({ row, series }) => {
53
53
  const slice = series === undefined ? undefined : sliceOf(series);
@@ -57,7 +57,7 @@ hover, ctx) {
57
57
  isHorizontal,
58
58
  data: [row],
59
59
  category: categoryOf(row),
60
- hover: hover.active,
60
+ hover: hover.active && 'trigger',
61
61
  ...(slice
62
62
  ? isHorizontal
63
63
  ? { insetTop: slice.start, insetBottom: slice.end }
@@ -72,11 +72,11 @@ hover, ctx) {
72
72
  * whatever the "statistics" phase already put in `state.markers`, and its
73
73
  * value labels on top of everything.
74
74
  */
75
- export function buildMarks(state, ctx) {
75
+ export function buildMarks(state, env) {
76
76
  const { gapFillMaps, colorForSeries, processedData } = state;
77
77
  const isHorizontal = state.axes?.isHorizontal ?? false;
78
78
  const [categoryAxis, valueAxis] = isHorizontal ? ['y', 'x'] : ['x', 'y'];
79
- const geometry = buildBarGeometry(state, ctx.cfg.bar.seriesPadding);
79
+ const geometry = buildBarGeometry(state, env.cfg.bar.seriesPadding);
80
80
  const { channels } = processedData;
81
81
  const gapDefaults = getConfiguration().bar.gap;
82
82
  // Forwarded raw when the transforms left a plain channel (a field key keeps
@@ -101,7 +101,7 @@ export function buildMarks(state, ctx) {
101
101
  stacked: geometry.stacked
102
102
  });
103
103
  const labelFor = (name, slice, negative) => labels && {
104
- ...labels.shapeLabel(ctx, (d) => labels.format(Number(valueRead(d)), name, d), {
104
+ ...labels.shapeLabel(env, (d) => labels.format(Number(valueRead(d)), d, name), {
105
105
  fill: 'currentColor',
106
106
  ...labelAnchor(negative)
107
107
  }),
@@ -117,6 +117,7 @@ export function buildMarks(state, ctx) {
117
117
  isHorizontal,
118
118
  data,
119
119
  styles,
120
+ hover: 'style',
120
121
  ...(label ? { label } : {}),
121
122
  ...(isHorizontal
122
123
  ? { y: category, x1: from, x2: value }
@@ -138,7 +139,7 @@ export function buildMarks(state, ctx) {
138
139
  const name = group.series.name;
139
140
  const slice = geometry.sliceOf(name);
140
141
  const defaultColor = colorForSeries(name);
141
- const disabledFill = ctx.interaction?.fillFor(name);
142
+ const disabledFill = env.interaction?.fillFor(name);
142
143
  for (const seg of group.visualSegments) {
143
144
  const fill = disabledFill?.fill ?? seg.styles.fill ?? defaultColor;
144
145
  const styles = {
@@ -1,8 +1,8 @@
1
1
  import type { AxisPlotDefaults } from '../../../types/phases';
2
- import type { BulletPlotState, BulletPlotCtx } from '../../../types/plots/ranking/bullet/state';
2
+ import type { BulletPlotState, BulletPlotEnv } from '../../../types/plots/ranking/bullet/state';
3
3
  /**
4
4
  * BulletPlot on the shared pipeline: a BarPlot whose bars are drawn thinner
5
5
  * over `ranges` - bands that grade the value - with a tick at each `target`.
6
6
  * Its value axis fits them along with the bars.
7
7
  */
8
- export declare function buildBulletDefaults<TData extends Record<string, unknown>>(): AxisPlotDefaults<BulletPlotState<TData>, BulletPlotCtx>;
8
+ export declare function buildBulletDefaults<TData extends Record<string, unknown>>(): AxisPlotDefaults<BulletPlotState<TData>, BulletPlotEnv>;
@@ -11,13 +11,13 @@ export function buildBulletDefaults() {
11
11
  ...bar,
12
12
  scales: {
13
13
  ...bar.scales,
14
- defaults: (_state, ctx) => ({
14
+ defaults: (_state, env) => ({
15
15
  category: {
16
- paddingInner: ctx.cfg.bullet.paddingInner,
17
- paddingOuter: ctx.cfg.bullet.paddingOuter
16
+ paddingInner: env.cfg.bullet.paddingInner,
17
+ paddingOuter: env.cfg.bullet.paddingOuter
18
18
  }
19
19
  }),
20
- fit: (state, ctx) => fitValueDomain(state, buildReach(state, ctx))
20
+ fit: (state, env) => fitValueDomain(state, buildReach(state, env))
21
21
  },
22
22
  markers: { ...bar.markers, marks: buildMarks }
23
23
  };
@@ -1,10 +1,10 @@
1
1
  import type { AxisBasedMarkersConfig } from '../../../types/markers/common';
2
- import type { BulletPlotState, BulletPlotCtx } from '../../../types/plots/ranking/bullet/state';
2
+ import type { BulletPlotState, BulletPlotEnv } from '../../../types/plots/ranking/bullet/state';
3
3
  /** Every value the axis has to reach beyond the bars. */
4
- export declare function buildReach<TData extends Record<string, unknown>>(state: BulletPlotState<TData>, ctx: BulletPlotCtx): number[];
4
+ export declare function buildReach<TData extends Record<string, unknown>>(state: BulletPlotState<TData>, env: BulletPlotEnv): number[];
5
5
  /**
6
6
  * BulletPlot's "markers" phase, back to front: a rule per range, the bars of a
7
7
  * bar plot - thinner, so the ranges show around them - and a tick at each
8
8
  * target.
9
9
  */
10
- export declare function buildMarks<TData extends Record<string, unknown>>(state: BulletPlotState<TData>, ctx: BulletPlotCtx): AxisBasedMarkersConfig[];
10
+ export declare function buildMarks<TData extends Record<string, unknown>>(state: BulletPlotState<TData>, env: BulletPlotEnv): AxisBasedMarkersConfig[];
@@ -2,8 +2,8 @@ import { buildMarks as buildBarMarks, buildBarGeometry } from '../bar/markers';
2
2
  import { GAP_VALUE } from '../../../phases/transforms/TransformsPhase';
3
3
  import { RowNumbers } from '../../utils/RowNumbers';
4
4
  /** Each category's target and range bounds, read off the rows the bars draw. */
5
- function buildMeasures(state, ctx) {
6
- const geometry = buildBarGeometry(state, ctx.cfg.bar.seriesPadding);
5
+ function buildMeasures(state, env) {
6
+ const geometry = buildBarGeometry(state, env.cfg.bar.seriesPadding);
7
7
  return (state.processedData?.data ?? [])
8
8
  .filter((row) => row[GAP_VALUE] === undefined && geometry.spanOf(row) !== undefined)
9
9
  .map((row) => ({
@@ -16,8 +16,8 @@ function buildMeasures(state, ctx) {
16
16
  }));
17
17
  }
18
18
  /** Every value the axis has to reach beyond the bars. */
19
- export function buildReach(state, ctx) {
20
- return buildMeasures(state, ctx).flatMap(({ target, bounds }) => [
19
+ export function buildReach(state, env) {
20
+ return buildMeasures(state, env).flatMap(({ target, bounds }) => [
21
21
  ...(target === undefined ? [] : [target]),
22
22
  ...bounds
23
23
  ]);
@@ -27,8 +27,8 @@ export function buildReach(state, ctx) {
27
27
  * bar plot - thinner, so the ranges show around them - and a tick at each
28
28
  * target.
29
29
  */
30
- export function buildMarks(state, ctx) {
31
- const configured = ctx.cfg.bullet;
30
+ export function buildMarks(state, env) {
31
+ const configured = env.cfg.bullet;
32
32
  const own = (state.styles ?? {});
33
33
  const rangeColors = own.ranges?.colors ?? configured.rangeColors;
34
34
  const rangeWidth = own.ranges?.width ?? configured.rangeWidth;
@@ -38,8 +38,8 @@ export function buildMarks(state, ctx) {
38
38
  length: own.target?.length ?? configured.targetLength
39
39
  };
40
40
  const isHorizontal = state.axes?.isHorizontal ?? false;
41
- const baseline = buildBarGeometry(state, ctx.cfg.bar.seriesPadding).baseline;
42
- const measures = buildMeasures(state, ctx);
41
+ const baseline = buildBarGeometry(state, env.cfg.bar.seriesPadding).baseline;
42
+ const measures = buildMeasures(state, env);
43
43
  // Each bound is a band from the baseline, drawn widest first so the narrower ones lie over it.
44
44
  const rows = measures.flatMap(({ category, bounds }) => bounds
45
45
  .map((bound, rank) => ({
@@ -63,7 +63,7 @@ export function buildMarks(state, ctx) {
63
63
  }
64
64
  ];
65
65
  // The bars narrowed to a thickness of their own, centered in their band.
66
- const bars = buildBarMarks(state, ctx).map((marker) => marker.type === 'bar' && marker.role === 'segment'
66
+ const bars = buildBarMarks(state, env).map((marker) => marker.type === 'bar' && marker.role === 'segment'
67
67
  ? {
68
68
  ...marker,
69
69
  thickness: own.bar?.thickness ?? configured.barThickness
@@ -1,5 +1,5 @@
1
1
  import { ValueLabels } from '../../../layout/styles/ValueLabels';
2
- import type { ClevelandPlotState, ClevelandPlotCtx, ClevelandOptions } from '../../../types/plots/ranking/cleveland/state';
2
+ import type { ClevelandPlotState, ClevelandPlotEnv, ClevelandOptions } from '../../../types/plots/ranking/cleveland/state';
3
3
  import type { AxisBasedMarkersConfig, TextMarkerConfig } from '../../../types/markers/common';
4
4
  import type { EdgeBox } from '../../../types/layout/box';
5
5
  /**
@@ -16,14 +16,14 @@ export declare class ClevelandMarkers {
16
16
  /** Forgets what was warned about; for tests. */
17
17
  static resetWarnings(): void;
18
18
  /** The plot's connectors, then its dots, which draw on top of them. */
19
- marks: <TData extends Record<string, unknown>>(state: ClevelandPlotState<TData>, ctx: ClevelandPlotCtx) => AxisBasedMarkersConfig[];
19
+ marks: <TData extends Record<string, unknown>>(state: ClevelandPlotState<TData>, env: ClevelandPlotEnv) => AxisBasedMarkersConfig[];
20
20
  /**
21
21
  * The value labels of the dots `styles.values.of` picks, one `'text'` marker
22
22
  * per place a dot can hold in its range - past the top end (above, or right
23
23
  * of it), past the bottom end (below, or left of it) and, for the dots
24
24
  * between, beside it - and per series, when they take their series' color.
25
25
  */
26
- valueLabels: <TData extends Record<string, unknown>>(labels: ValueLabels, state: ClevelandPlotState<TData>, ctx: ClevelandPlotCtx) => TextMarkerConfig[];
26
+ valueLabels: <TData extends Record<string, unknown>>(labels: ValueLabels, state: ClevelandPlotState<TData>, env: ClevelandPlotEnv) => TextMarkerConfig[];
27
27
  /**
28
28
  * Room for the labels past the dots at the end of the value axis, so the
29
29
  * farthest one fits inside the figure instead of crossing its edge. Only the