@cdc/chart 4.26.5 → 4.26.7

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 (128) hide show
  1. package/CONFIG.md +20 -14
  2. package/dist/{cdcchart-DQ00cQCm.es.js → cdcchart-BWVIUcAF.es.js} +5 -55
  3. package/dist/cdcchart.js +36554 -34320
  4. package/examples/feature/heatmap/average-age-categorical.json +1 -1
  5. package/examples/feature/heatmap/calendar-heatmap.json +1 -1
  6. package/examples/feature/heatmap/sparse-aggregation.json +1 -1
  7. package/examples/private/bad-y-axis.json +543 -0
  8. package/examples/private/bar-chart-negative-value.json +455 -0
  9. package/examples/private/flueview.json +22051 -0
  10. package/package.json +3 -11
  11. package/src/CdcChart.tsx +7 -6
  12. package/src/CdcChartComponent.tsx +71 -18
  13. package/src/_stories/Chart.PieLabels.stories.tsx +47 -0
  14. package/src/_stories/Chart.SeriesColorAssignments.stories.tsx +183 -0
  15. package/src/_stories/Chart.YAxisAutoMaxStrategy.stories.tsx +52 -0
  16. package/src/_stories/Chart.YAxisFilterDomain.stories.tsx +90 -0
  17. package/src/_stories/Chart.smoke.stories.tsx +14 -1
  18. package/src/_stories/ChartAnnotation.smoke.stories.tsx +10 -0
  19. package/src/_stories/ChartPrefixSuffix.smoke.stories.tsx +28 -1
  20. package/src/_stories/_mock/annotation_event-line_mock.json +1064 -0
  21. package/src/_stories/_mock/heatmap-average-age-categorical.json +1 -1
  22. package/src/_stories/_mock/heatmap.json +1 -1
  23. package/src/components/Annotations/components/AnnotationDraggable.styles.css +22 -1
  24. package/src/components/Annotations/components/AnnotationDraggable.tsx +219 -119
  25. package/src/components/Annotations/tests/AnnotationDraggable.test.tsx +198 -0
  26. package/src/components/Axis/LeftAxis.tsx +3 -0
  27. package/src/components/Axis/LeftAxisGridlines.tsx +8 -1
  28. package/src/components/Axis/RightAxis.tsx +3 -0
  29. package/src/components/Axis/tests/AxisTickValues.test.tsx +86 -0
  30. package/src/components/BarChart/components/BarChart.Horizontal.tsx +1 -2
  31. package/src/components/BarChart/components/BarChart.StackedHorizontal.tsx +1 -1
  32. package/src/components/BarChart/components/BarChart.StackedVertical.tsx +1 -1
  33. package/src/components/BarChart/components/BarChart.Vertical.tsx +1 -2
  34. package/src/components/BarChart/helpers/getBarData.ts +28 -28
  35. package/src/components/BarChart/helpers/getBarHeights.ts +2 -2
  36. package/src/components/BarChart/helpers/tests/useBarChart.test.tsx +98 -0
  37. package/src/components/BarChart/helpers/useBarChart.ts +4 -5
  38. package/src/components/BoxPlot/BoxPlot.Horizontal.tsx +7 -6
  39. package/src/components/BoxPlot/BoxPlot.Vertical.tsx +9 -7
  40. package/src/components/BoxPlot/helpers/index.ts +4 -3
  41. package/src/components/Brush/BrushSelector.tsx +1 -1
  42. package/src/components/EditorPanel/EditorPanel.tsx +457 -165
  43. package/src/components/EditorPanel/components/Panels/Panel.Annotate.tsx +101 -52
  44. package/src/components/EditorPanel/components/Panels/Panel.General.tsx +16 -7
  45. package/src/components/EditorPanel/components/Panels/Panel.PatternSettings.tsx +3 -3
  46. package/src/components/EditorPanel/components/Panels/Panel.Series.tsx +19 -4
  47. package/src/components/EditorPanel/components/Panels/Panel.SmallMultiples.test.tsx +98 -0
  48. package/src/components/EditorPanel/components/Panels/Panel.SmallMultiples.tsx +10 -0
  49. package/src/components/EditorPanel/components/Panels/Panel.Visual.test.tsx +484 -0
  50. package/src/components/EditorPanel/components/Panels/Panel.Visual.tsx +3 -0
  51. package/src/components/EditorPanel/components/Panels/SeriesColorAssignments.tsx +262 -0
  52. package/src/components/EditorPanel/components/Panels/panelVisual.styles.css +32 -0
  53. package/src/components/EditorPanel/components/panels.scss +10 -0
  54. package/src/components/EditorPanel/editor-panel.scss +47 -0
  55. package/src/components/EditorPanel/helpers/getVisualizationTypeConfigUpdate.ts +6 -2
  56. package/src/components/EditorPanel/helpers/tests/getVisualizationTypeConfigUpdate.test.ts +20 -2
  57. package/src/components/EditorPanel/helpers/updateFieldRankByValue.ts +3 -3
  58. package/src/components/EditorPanel/useEditorPermissions.test.tsx +288 -11
  59. package/src/components/EditorPanel/useEditorPermissions.ts +46 -6
  60. package/src/components/Forecasting/Forecasting.tsx +1 -1
  61. package/src/components/HeatMap/components/HeatMap.tsx +22 -17
  62. package/src/components/HeatMap/components/HeatMapGradientLegend.tsx +29 -15
  63. package/src/components/HeatMap/heatmap.css +15 -1
  64. package/src/components/HeatMap/tests/HeatMap.test.tsx +39 -7
  65. package/src/components/Legend/Legend.Component.tsx +56 -61
  66. package/src/components/Legend/Legend.Suppression.tsx +3 -3
  67. package/src/components/Legend/LegendGroup/LegendGroup.tsx +0 -1
  68. package/src/components/Legend/helpers/createFormatLabels.test.ts +88 -0
  69. package/src/components/Legend/helpers/createFormatLabels.tsx +6 -1
  70. package/src/components/LineChart/helpers.test.ts +230 -1
  71. package/src/components/LineChart/helpers.ts +25 -14
  72. package/src/components/LineChart/index.tsx +23 -7
  73. package/src/components/LinearChart/tests/LinearChart.test.tsx +30 -0
  74. package/src/components/LinearChart.tsx +51 -15
  75. package/src/components/PieChart/PieChart.tsx +117 -10
  76. package/src/components/PieChart/helpers/labelPlacement.test.ts +88 -0
  77. package/src/components/PieChart/helpers/labelPlacement.ts +95 -0
  78. package/src/components/ScatterPlot/ScatterPlot.jsx +5 -13
  79. package/src/components/SmallMultiples/SmallMultipleTile.tsx +3 -0
  80. package/src/components/SmallMultiples/SmallMultiples.tsx +38 -9
  81. package/src/components/SmallMultiples/tests/SmallMultiples.test.tsx +170 -0
  82. package/src/data/initial-state.js +3 -0
  83. package/src/helpers/calculateLeftYAxisWidth.ts +9 -3
  84. package/src/helpers/categoryOrder.ts +60 -0
  85. package/src/helpers/colorAssignmentHelpers.ts +102 -0
  86. package/src/helpers/dataHelpers.ts +11 -1
  87. package/src/helpers/getAxisMaxOverride.ts +16 -0
  88. package/src/helpers/getBoxPlotConfig.ts +19 -12
  89. package/src/helpers/getCleanTopTickMax.ts +64 -0
  90. package/src/helpers/getColorScale.ts +18 -9
  91. package/src/helpers/getComboChartConfig.ts +0 -1
  92. package/src/helpers/getExcludedData.ts +0 -1
  93. package/src/helpers/getHasBoundarySuppression.ts +27 -0
  94. package/src/helpers/getMinMax.ts +25 -22
  95. package/src/helpers/getNewRuntime.ts +0 -2
  96. package/src/helpers/getPiePercent.ts +3 -3
  97. package/src/helpers/getYAxisDomainData.ts +38 -0
  98. package/src/helpers/getYAxisFinalizationEligibility.ts +40 -0
  99. package/src/helpers/hasSpacedInlineLabel.ts +10 -0
  100. package/src/helpers/isConvertLineToBarGraph.ts +2 -2
  101. package/src/helpers/seriesColumnSettings.ts +26 -7
  102. package/src/helpers/sizeHelpers.ts +0 -2
  103. package/src/helpers/smallMultiplesHelpers.ts +5 -0
  104. package/src/helpers/tests/calculateLeftYAxisWidth.test.ts +38 -0
  105. package/src/helpers/tests/categoryOrder.test.ts +57 -0
  106. package/src/helpers/tests/dataHelpers.test.ts +135 -0
  107. package/src/helpers/tests/getAxisMaxOverride.test.ts +36 -0
  108. package/src/helpers/tests/getCleanTopTickMax.test.ts +165 -0
  109. package/src/helpers/tests/getColorScale.test.ts +197 -0
  110. package/src/helpers/tests/getMinMax.test.ts +211 -0
  111. package/src/helpers/tests/getYAxisDomainData.test.ts +119 -0
  112. package/src/helpers/tests/getYAxisFinalizationEligibility.test.ts +185 -0
  113. package/src/helpers/tests/{getYAxisAutoPaddingMode.test.ts → hasSpacedInlineLabel.test.ts} +17 -32
  114. package/src/helpers/tests/seriesColumnSettings.test.ts +76 -2
  115. package/src/helpers/tests/smallMultiplesHelpers.test.ts +99 -0
  116. package/src/hooks/tests/useRightAxis.test.tsx +268 -0
  117. package/src/hooks/tests/useScales.test.tsx +302 -27
  118. package/src/hooks/tests/useTooltip.test.tsx +132 -0
  119. package/src/hooks/useRightAxis.ts +35 -25
  120. package/src/hooks/useScales.ts +45 -28
  121. package/src/hooks/useTooltip.tsx +17 -11
  122. package/src/store/chart.reducer.ts +0 -1
  123. package/src/test/CdcChart.dataTable.test.tsx +216 -0
  124. package/src/types/ChartConfig.ts +6 -1
  125. package/src/types/ChartContext.ts +3 -0
  126. package/src/helpers/getYAxisAutoPadding.ts +0 -55
  127. package/src/helpers/getYAxisAutoPaddingMode.ts +0 -17
  128. package/src/helpers/tests/getYAxisAutoPadding.test.ts +0 -37
package/CONFIG.md CHANGED
@@ -55,7 +55,7 @@ Dashboard flows can also select data from `datasets` with `dataKey`.
55
55
  | `visualizationSubType` | `string` | No | `regular` | Selects the sub-mode within a chart family. | Current authorable values are `regular` and `stacked`; `stacked` is used by bar, combo, and stacked area flows. Older saved configs may contain `horizontal`; use `orientation: "horizontal"` for current horizontal charts. |
56
56
  | `orientation` | `vertical \| horizontal` | No | `vertical` | Controls the primary chart orientation. | `Bar` and `Box Plot` support both directions; `Deviation Bar` is horizontal only. |
57
57
  | `xAxis` | `object` | Conditionally | Package-initialized defaults | X-axis / category-axis configuration. | Required for most chart types and for pie category wiring. See `Axis: xAxis and yAxis` below. |
58
- | `yAxis` | `object` | Conditionally | Package-initialized defaults | Y-axis / measure-axis configuration. | Required for `Pie` charts and shared with multi-axis chart flows. See `Axis: xAxis and yAxis` below. In charts, `yAxis.titlePlacement` controls whether the title stays on the side or moves above the plot. Visible top titles also keep the chart's y-axis auto-padding behavior enabled, including small-multiple titles hidden only by tile layout. |
58
+ | `yAxis` | `object` | Conditionally | Package-initialized defaults | Y-axis / measure-axis configuration. | Required for `Pie` charts and shared with multi-axis chart flows. See `Axis: xAxis and yAxis` below. In charts, `yAxis.titlePlacement` controls whether the title stays on the side or moves above the plot. |
59
59
  | `series` | `Series[]` | Conditionally | Package-initialized defaults | Measure series to render. | Required for most non-pie charts. See `Series: series[]` below. Dynamic-category series still start from an authored `series[]` entry. For HeatMap, each selected series becomes one heatmap row. |
60
60
  | `columns` | `Record<string, Column>` | No | `{}` | Column-level display and formatting overrides. | Column configs drive labels, prefixes, suffixes, and table visibility. |
61
61
  | `dynamicSeries` | `boolean` | No | `false` | Legacy/paused dynamic-series flag. | Current runtime can regenerate generated series during filter updates, but initial rendering still depends on authored `series[]` or `series[].dynamicCategory`. |
@@ -80,11 +80,15 @@ Axis settings are chart-owned because their meaning depends on chart family, ori
80
80
  | --- | --- | --- | --- | --- | --- |
81
81
  | `xAxis.dataKey`, `yAxis.dataKey` | `string` | Conditionally | `''` | Source field used by the axis. | Required for visible/category axes and most value-axis chart wiring. |
82
82
  | `xAxis.type`, `yAxis.type` | `string` | No | Package defaults | Axis scale mode. | Category/date axes commonly use `categorical`, `date`, or `date-time`; Scatter Plot x-axes can use `continuous`; current numeric value axes use `linear` or `logarithmic`. |
83
+ | `xAxis.categoryOrderType` | `data \| custom` | No | `data` | Chooses how categorical x-axis values are ordered. | Only applies when `xAxis.type` is `categorical`. `data` preserves source-data order. `custom` uses `xAxis.categoryOrder` for the rendered chart and chart-owned data table. |
84
+ | `xAxis.categoryOrder` | `string[]` | No | `[]` | Custom categorical x-axis value order. | Used only when `xAxis.categoryOrderType` is `custom`. Values missing from the custom list are appended in source-data order. |
83
85
  | `xAxis.label`, `yAxis.label` | `string` | No | `''` | Axis title shown near the axis. | Optional display label. |
84
- | `yAxis.titlePlacement` | `side \| top` | No | `top` for new configs; older configs missing this field migrate to `side` | Chooses where the y-axis title renders. | `top` renders the title above the plot and participates in y-axis auto-padding behavior. |
86
+ | `yAxis.titlePlacement` | `side \| top` | No | `top` for new configs; older configs missing this field migrate to `side` | Chooses where the y-axis title renders. | `top` renders the title above the plot. |
85
87
  | `*.hideAxis`, `*.hideTicks`, `*.hideLabel` | `boolean` | No | `false` | Hides axis line, tick marks, or label. | Supported per axis where the renderer exposes these controls. |
86
88
  | `*.labelColor`, `*.tickLabelColor`, `*.tickColor` | CSS color string | No | Package defaults | Axis label, tick-label, and tick-mark colors. | Preserved in saved configs and used by the rendered axes. |
87
89
  | `yAxis.gridLines`, `yAxis.enablePadding`, `yAxis.scalePadding`, `yAxis.displayNumbersOnBar`, `xAxis.showYearsOnce` | `boolean`, `number` | No | Package defaults | Axis grid, padding, bar-label, and date-label display controls. | Supported where the chart family and orientation use the related rendering behavior. |
90
+ | `yAxis.filterDomainBehavior` | `dynamic \| stable` | No | `dynamic` when omitted | Controls which rows automatic value-axis domains use when filters are active. | `dynamic` rescales to the currently filtered rows. `stable` uses the full eligible chart dataset while rendering filtered rows; it still respects hard exclusions and chart dataset scope. Applies to the horizontal value axis for horizontal charts and to the right axis for Combo charts. Brush behavior remains controlled by `xAxis.brushDynamicYAxis`. |
91
+ | `yAxis.autoMaxStrategy` | `default \| clean-top-tick` | No | `default` when omitted; new chart configs default to `clean-top-tick` | Controls how automatic value-axis maximums are chosen before padding. | Applies only when the relevant value-axis max is not explicitly set (`yAxis.max` for vertical charts, `xAxis.max` for horizontal charts, `yAxis.rightMax` for Combo right axes). `clean-top-tick` rounds automatic max values up to a cleaner mantissa step such as `1.2`, `1.5`, `2`, `2.5`, `3`, `4`, `5`, `6`, `8`, or `10` times the current order-of-magnitude step. After tick count is known, runtime may finalize the automatic max to the highest generated tick or the next tick interval so the visible top tick clears the data. |
88
92
  | `*.dateParseFormat`, `*.dateDisplayFormat` | `string` | No | Package defaults | Input and output date formatting hints. | Used by date-based axes and table/tooltip formatting. |
89
93
  | `*.numTicks`, `*.tickRotation`, `*.maxTickRotation` | `number` | No | Package defaults | Tick density and tick-label rotation controls. | Runtime may still adjust ticks for available space. |
90
94
  | `*.max`, `*.min` | `string` | No | None | Explicit axis bounds. | Stored as strings in saved configs. |
@@ -94,11 +98,11 @@ Axis settings are chart-owned because their meaning depends on chart family, ori
94
98
  | `*.categories` | `object[]` | No | `[]` | Category metadata for specialized axis rendering. | Mostly used by advanced chart flows. |
95
99
  | `*.anchors` | `object[]` | No | `[]` | Target-line or anchor metadata. | Each anchor stores `value`, `color`, and `lineStyle`. |
96
100
  | `xAxis.target`, `xAxis.targetLabel`, `xAxis.showTargetLabel`, `yAxis.target`, `yAxis.targetLabel`, `yAxis.showTargetLabel` | `number \| string`, `string`, `boolean` | No | Package defaults | Target line and label controls. | Deviation Bar uses the x-axis target fields; renderer support varies by chart family. |
97
- | `yAxis.inlineLabel`, `yAxis.labelPlacement`, `yAxis.labelsAboveGridlines` | `string`, `string`, `boolean` | No | None, package defaults, `false` | Inline suffix/label controls for the left Y axis. | Used by line and bar axis-label rendering and auto-padding helpers. |
101
+ | `yAxis.inlineLabel`, `yAxis.labelPlacement`, `yAxis.labelsAboveGridlines` | `string`, `string`, `boolean` | No | None, package defaults, `false` | Inline suffix/label controls for the left Y axis. | Used by line and bar axis-label rendering. For non-Combo charts, when `inlineLabel` contains a space, runtime treats the primary automatic Y-axis max as effectively clean-top-tick even if `autoMaxStrategy` is `default`; if the raw max is within one quarter of a tick interval from the top generated tick, runtime adds one more interval for label headroom. Valid explicit max values bypass this automatic finalization. Combo charts do not use this automatic inline-label headroom, so manual Y-axis padding remains available. |
98
102
  | `yAxis.rightLabel`, `yAxis.rightNumTicks`, `yAxis.rightAxisSize`, `yAxis.rightLabelOffsetSize` | `string`, `number`, `number`, `number` | No | `''`, package defaults | Right-axis label, tick, width, and offset controls. | Used by combo and line-capable dual-axis charts. |
99
103
  | `yAxis.rightAxisLabelColor`, `yAxis.rightAxisTickLabelColor`, `yAxis.rightAxisTickColor` | CSS color string | No | Package defaults | Right-axis label, tick-label, and tick-mark colors. | Only meaningful when right-axis series are configured. |
100
104
  | `yAxis.rightHideAxis`, `yAxis.rightHideLabel`, `yAxis.rightHideTicks` | `boolean` | No | `false` | Hides the right-axis line, label, or ticks. | Only meaningful when right-axis series are configured. |
101
- | `yAxis.rightMin`, `yAxis.rightMax`, `yAxis.smallestLeftAxisMax`, `yAxis.smallestRightAxisMax` | `string \| number` | No | None | Explicit or minimum bounds for left/right axes. | Runtime coerces numeric-like values when calculating scales. |
105
+ | `yAxis.rightMin`, `yAxis.rightMax`, `yAxis.smallestLeftAxisMax`, `yAxis.smallestRightAxisMax` | `string \| number` | No | None | Explicit or minimum bounds for left/right axes. | Runtime coerces numeric-like values when calculating scales. For Combo right axes, `rightMin` is honored only when finite and less than or equal to the right-axis data minimum; without a valid `rightMin`, positive right-axis domains start at `0`. `rightMax` is honored only when finite and greater than or equal to the right-axis data maximum. |
102
106
  | `xAxis.brushActive`, `xAxis.brushDefaultRecentDateCount`, `xAxis.brushDynamicYAxis` | `boolean`, `number`, `boolean` | No | `false`, None, `false` | Enables and configures the x-axis brush range selector. | Supported on vertical Line, Bar, Area Chart, and Combo charts with a non-categorical x-axis. |
103
107
 
104
108
  ### Series: `series[]`
@@ -185,7 +189,7 @@ Axis settings are chart-owned because their meaning depends on chart family, ori
185
189
  | `lineDatapointStyle` | `hidden \| always show \| hover` | No | `hover` | Controls line chart point visibility. | Affects line and combo charts. |
186
190
  | `lineDatapointColor` | `Same as Line \| Lighter than Line` | No | `Same as Line` | Chooses the point color relative to the line. | Affects line markers and hover styles. |
187
191
  | `isolatedDotsSameSize` | `boolean` | No | `false` | Keeps isolated line dots the same size as normal dots. | Only used by line-chart variants. |
188
- | `labels` | `boolean` | No | `false` | Shows value labels on supported chart types. | Especially visible on bar-style charts. |
192
+ | `labels` | `boolean` | No | `false` | Shows value labels on supported chart types. | For `Pie`, enables category and percentage labels. Regular pie labels that fit render inside slices; labels that do not fit, and donut labels, render outside without connector lines. |
189
193
  | `isResponsiveTicks` | `boolean` | No | `false` | Enables responsive tick handling. | Helpful for dense x-axis labels. |
190
194
  | `roundingStyle` | `standard \| shallow \| finger` | No | `standard` | Chooses the numeric rounding strategy. | Matches the editor options. |
191
195
  | `tipRounding` | `top \| full` | No | `top` | Controls tooltip rounding behavior. | Legacy-friendly display option. |
@@ -200,25 +204,27 @@ Axis settings are chart-owned because their meaning depends on chart family, ori
200
204
  | `twoColor.palette` | `string` | No | `monochrome-1` | Palette used for two-color chart variants. | Used when the chart switches to a paired/deviation bar color treatment. |
201
205
  | `twoColor.isPaletteReversed` | `boolean` | No | `false` | Reverses the two-color palette variant. | Current active reversal flag for two-color palettes. |
202
206
  | `general.palette.isReversed` | `boolean` | No | `true` for current chart defaults | Reverses the active palette order. | Current active reversal flag for the main palette. The top-level `isPaletteReversed` field is legacy. |
207
+ | `general.palette.colorAssignmentMode` | `ordered \| by-value` | No | `ordered` when omitted | Enables authored by-series color assignment. | `by-value` is required before `colorAssignments` affects chart colors; assignment presence alone does not activate it. |
208
+ | `general.palette.colorAssignments` | `{ key: string; color: string }[]` | No | `[]` | Assigns colors to stable authored chart series keys. | Supported for regular Line, Bar, Combo, Area Chart, Scatter Plot, and by-series Small Multiples. `key` should match `series[].dataKey`; stale keys are ignored and may be removed by editor updates. |
203
209
  | `pieType` | `Regular \| Donut` | No | `Regular` | Chooses between a full pie and a donut chart. | Only meaningful for `Pie` charts. |
204
210
  | `showAreaUnderLine` | `boolean` | No | `false` | Fills the area below line series. | Primarily used by line and small-multiple line charts. |
205
211
  | `showLineSeriesLabels` | `boolean` | No | `false` | Appends the series name at the end of line and combo series. | Only meaningful for line-capable charts. |
206
212
  | `colorMatchLineSeriesLabels` | `boolean` | No | `false` | Matches end labels to the series color. | Only relevant when `showLineSeriesLabels` is enabled. |
207
213
  | `stackedAreaChartLineType` | `string` | No | `Linear` | Chooses the curve used by stacked area charts. | Mapped to the supported curve set in the editor. |
208
214
  | `hideXAxisLabel` | `boolean` | No | `false` | Hides the rendered x-axis label. | Mostly used by small multiples and compact layouts. |
209
- | `hideYAxisLabel` | `boolean` | No | `false` | Hides the rendered y-axis label. | Mostly used by small multiples and compact layouts. Hidden top-positioned Y-axis titles do not trigger top-title auto-padding, except small multiples still preserve padding for titles hidden only by repeated-tile layout. In small multiples, the leading tile in each row keeps the y-axis title visible while the other tiles hide it, including when `yAxis.titlePlacement` is `top`. |
215
+ | `hideYAxisLabel` | `boolean` | No | `false` | Hides the rendered y-axis label. | Mostly used by small multiples and compact layouts. In small multiples, the leading tile in each row keeps the y-axis title visible while the other tiles hide it, including when `yAxis.titlePlacement` is `top`. |
210
216
 
211
217
  ### Number Formatting: `dataFormat.*`
212
218
 
213
- These fields are chart-owned. They are applied by chart number-format helpers for axes, labels, tooltips, and generated table values unless a column-specific formatter overrides the value.
219
+ These fields are chart-owned. They are applied by chart number-format helpers for axes, labels, tooltips, and generated table values unless a column-specific formatter overrides the value. Missing or blank column rounding inherits these settings; numeric column rounding, including `0`, is an explicit override.
214
220
 
215
221
  | Field | Type | Required | Default | Description | Allowed values / Notes |
216
222
  | --- | --- | --- | --- | --- | --- |
217
223
  | `dataFormat.commas` | `boolean` | No | `true` when the whole `dataFormat` block is omitted | Adds locale-aware grouping to left/value-axis numbers, tooltips, and data table output. | Missing `commas` inside a partial `dataFormat` object can be backfilled as legacy `false`; author this field explicitly when adding only some number-format options. |
218
224
  | `dataFormat.abbreviated` | `boolean` | No | `false` | Abbreviates large or small left/value-axis numbers. | Only applied when the formatter decides the value should be abbreviated. |
219
- | `dataFormat.roundTo` | `number` | No | `0` when omitted | Decimal precision for left/value-axis numbers and many chart values. | Ignored for a value when `preserveOriginalDecimals` is true. |
225
+ | `dataFormat.roundTo` | `number` | No | `0` when omitted | Decimal precision for left/value-axis numbers and many chart values. | Ignored for a value when `preserveOriginalDecimals` is true. Missing or blank series-column `roundToPlace` values inherit this precision. |
220
226
  | `dataFormat.preserveOriginalDecimals` | `boolean` | No | `false` | Preserves each value's original decimal places. | Bypasses the configured decimal precision for left, right, and bottom formatting. |
221
- | `dataFormat.prefix`, `dataFormat.suffix` | `string` | No | `''` | Text added before or after left/value-axis numbers. | Examples: `$`, `%`. Column-level prefixes and suffixes can override these for table/additional-column output. |
227
+ | `dataFormat.prefix`, `dataFormat.suffix` | `string` | No | `''` | Text added before or after left/value-axis series numbers. | Examples: `$`, `%`. Non-empty column-level prefixes and suffixes override these values. Blank series-column affixes inherit these fields; additional non-series columns use only their own affixes and do not inherit axis units. |
222
228
  | `dataFormat.rightCommas` | `boolean` | No | `false` | Adds grouping to right-axis numbers. | Used by dual-axis charts. |
223
229
  | `dataFormat.rightRoundTo` | `number` | No | `0` when omitted | Decimal precision for right-axis numbers. | Used by dual-axis charts. |
224
230
  | `dataFormat.rightPrefix`, `dataFormat.rightSuffix` | `string` | No | `''` | Text added before or after right-axis numbers. | Used by dual-axis charts. |
@@ -237,7 +243,7 @@ These fields are chart-owned. They are applied by chart number-format helpers fo
237
243
  | `legend.hide` | `boolean` | No | `false` | Hides the chart legend. | Shared field; charts may still render specialized legends such as warming-stripes gradients separately. |
238
244
  | `legend.position` | `left \| bottom \| top \| right \| side` | No | `top` | Places the legend relative to the chart. | Small viewports may force bottom placement. |
239
245
  | `legend.behavior` | `highlight \| isolate` | No | `isolate` | Controls click behavior for series legends. | `highlight` emphasizes clicked series; `isolate` narrows display to selected legend entries where supported. |
240
- | `legend.label`, `legend.description` | `string` | No | `''` | Legend heading and supporting description. | Rendered as authored legend copy. |
246
+ | `legend.label`, `legend.description` | `string` | No | `''` | Legend heading and supporting description. | Supports HTML parsing and markup-variable processing when `enableMarkupVariables` is `true`. Standard chart legends support this behavior; HeatMap and Warming Stripes gradient legends render these fields as authored copy. |
241
247
  | `legend.singleRow` | `boolean` | No | `true` | Requests a single-row legend layout. | Runtime may wrap when space is limited. |
242
248
  | `legend.unified` | `boolean` | No | Package defaults | Combines legend handling for supported chart families. | Common in pie and specialized legend flows. |
243
249
  | `legend.axisAlign` | `boolean` | No | `true` | Aligns the legend with the plot/axis area. | Chart-specific layout option. |
@@ -249,11 +255,11 @@ These fields are chart-owned. They are applied by chart number-format helpers fo
249
255
  | `legend.style` | `circles \| boxes \| gradient \| lines` | No | `circles` | Chooses marker style for legend items. | `gradient` is used by gradient/warming-stripes-style legends. |
250
256
  | `legend.subStyle` | `linear blocks \| smooth` | No | `linear blocks` | Chooses gradient legend treatment. | Only meaningful for gradient-style legends. |
251
257
  | `legend.shape`, `legend.hasShape` | `string`, `boolean` | No | `circle`, package defaults | Shape metadata for shape-based legend entries. | Used by pattern and specialized legend rendering. |
252
- | `legend.tickRotation` | `number \| string` | No | `''` | Rotates gradient legend tick labels. | Saved configs may store a numeric string. |
258
+ | `legend.tickRotation` | `number \| string` | No | `''` | Rotates gradient legend tick labels. | Saved configs may store a numeric string. Ignored by HeatMap block gradient legends. |
253
259
  | `legend.groupBy` | `string` | No | `''` | Groups legend items by a source field. | Advanced legend layout option. |
254
260
  | `legend.order` | `dataColumn \| asc \| desc` | No | `dataColumn` | Controls legend item ordering. | `dataColumn` follows the data/config order. |
255
261
  | `legend.orderedValues` | `{ label?: string; value?: string }[]` | No | `[]` | Explicit legend order/labels. | Used when custom ordering is needed. |
256
- | `legend.patterns`, `legend.patternField` | `object`, `string` | No | `{}`, `''` | Data-driven pattern configuration for legend marks. | Pattern entries can include label, color, shape, data key/value, and contrast metadata. |
262
+ | `legend.patterns`, `legend.patternField` | `object`, `string` | No | `{}`, `''` | Data-driven pattern configuration for legend marks. | Pattern entries can include label, color, shape, data key/value, pattern size, and contrast metadata. Missing pattern sizes render as medium (`10`). |
257
263
  | `legend.dynamicLegend`, `legend.dynamicLegendDefaultText`, `legend.dynamicLegendItemLimit`, `legend.dynamicLegendItemLimitMessage`, `legend.dynamicLegendChartMessage` | mixed | No | Package defaults | Dynamic legend controls and messages. | Used when legend selections drive chart state or empty-selection copy. |
258
264
  | `legend.warmingStripesIntervals` | `object[]` | No | None | Warming-stripes interval metadata. | Used by warming-stripes-style line chart rendering. |
259
265
  | `legend.hideSuppressedLabels`, `legend.hideSuppressionLink`, `legend.tooltipLegendVisible` | `boolean` | No | `false`, `false`, inferred from legend visibility | Suppression and tooltip legend controls. | Used by suppression-aware legend and tooltip flows. |
@@ -310,8 +316,8 @@ HeatMap-specific behavior:
310
316
  | --- | --- |
311
317
  | Aggregation | If multiple source rows share the same x-axis value and series key, their numeric values are summed into one cell. |
312
318
  | Tooltips | HeatMap cells use the shared chart tooltip markup. `series[].tooltip: false` hides that series row/value from cell tooltips. Column configs with `tooltips: true` can add extra rows unless they refer to the x-axis column or one of the heatmap series columns. Aggregated cells show an aggregated-row count and show `Multiple values` for extra tooltip columns that disagree across source rows. |
313
- | Palette and legend | HeatMap colors come from `general.palette` or the chart fallback palette. `heatmap.colorBucketCount` quantizes the scale into 1-9 colors. `legend.style: "gradient"` or an omitted style renders a block-based gradient legend. Non-gradient legend styles render generated value ranges. |
314
- | Axis labels | `xAxis.tickRotation` or `xAxis.maxTickRotation` rotates column labels and contributes to x-axis title spacing. `yAxis.tickRotation` rotates row labels. HeatMap defaults `yAxis.titlePlacement` to `side` when it is not explicitly authored. `yAxis.titlePlacement: "top"` renders the row-axis title above the row labels, aligned with the top x-axis title when one is visible; side placement renders the rotated side title centered beside the row labels. `hideXAxisLabel` and `hideYAxisLabel` hide the axis titles; `xAxis.hideLabel` and `yAxis.hideLabel` hide tick labels. |
319
+ | Palette and legend | HeatMap colors come from `general.palette` or the chart fallback palette. `heatmap.colorBucketCount` quantizes the scale into 1-9 colors. `legend.style: "gradient"` or an omitted style renders a block-based gradient legend with one value-range label per block; HeatMap normalizes `legend.subStyle: "smooth"` to `linear blocks` and ignores `legend.tickRotation`. Non-gradient legend styles render generated value ranges. |
320
+ | Axis labels | `xAxis.tickRotation` or `xAxis.maxTickRotation` rotates column labels and contributes to x-axis title spacing. `yAxis.tickRotation` rotates row labels. HeatMap defaults `yAxis.titlePlacement` to `side` when it is not explicitly authored. `yAxis.titlePlacement: "top"` renders the row-axis title above the row labels, aligned with the top x-axis title when one is visible; side placement renders the rotated side title centered beside the row labels. `xAxis.hideAxis` and `xAxis.hideTicks` hide the Date/Category axis line and tick marks. `hideXAxisLabel` and `hideYAxisLabel` hide the axis titles; `xAxis.hideLabel` and `yAxis.hideLabel` hide tick labels. |
315
321
 
316
322
  ### Small Multiples: `smallMultiples.*`
317
323
 
@@ -845,8 +845,6 @@ var yn = "KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF
845
845
  case "rem":
846
846
  case "em":
847
847
  return 16 * e.number;
848
- // TODO use correct font-size
849
- case "px":
850
848
  default:
851
849
  return e.number;
852
850
  }
@@ -1529,7 +1527,6 @@ var SB = {
1529
1527
  case "repeat-y":
1530
1528
  case "no-repeat repeat":
1531
1529
  return 3;
1532
- case "repeat":
1533
1530
  default:
1534
1531
  return 0;
1535
1532
  }
@@ -1609,13 +1606,7 @@ var Ca = {
1609
1606
  prefix: !1,
1610
1607
  type: 2,
1611
1608
  parse: function(e, A) {
1612
- switch (A) {
1613
- case "rtl":
1614
- return 1;
1615
- case "ltr":
1616
- default:
1617
- return 0;
1618
- }
1609
+ return A === "rtl" ? 1 : 0;
1619
1610
  }
1620
1611
  }, Ta = {
1621
1612
  name: "display",
@@ -1732,13 +1723,7 @@ var Ga = {
1732
1723
  prefix: !1,
1733
1724
  type: 2,
1734
1725
  parse: function(e, A) {
1735
- switch (A) {
1736
- case "strict":
1737
- return Je.STRICT;
1738
- case "normal":
1739
- default:
1740
- return Je.NORMAL;
1741
- }
1726
+ return A === "strict" ? Je.STRICT : Je.NORMAL;
1742
1727
  }
1743
1728
  }, Ra = {
1744
1729
  name: "line-height",
@@ -1762,13 +1747,7 @@ var Ga = {
1762
1747
  prefix: !1,
1763
1748
  type: 2,
1764
1749
  parse: function(e, A) {
1765
- switch (A) {
1766
- case "inside":
1767
- return 0;
1768
- case "outside":
1769
- default:
1770
- return 1;
1771
- }
1750
+ return A === "inside" ? 0 : 1;
1772
1751
  }
1773
1752
  }, _r = {
1774
1753
  name: "list-style-type",
@@ -1883,7 +1862,6 @@ var Ga = {
1883
1862
  return 50;
1884
1863
  case "disclosure-closed":
1885
1864
  return 51;
1886
- case "none":
1887
1865
  default:
1888
1866
  return -1;
1889
1867
  }
@@ -1912,7 +1890,6 @@ var Ga = {
1912
1890
  return 3;
1913
1891
  case "auto":
1914
1892
  return 4;
1915
- case "visible":
1916
1893
  default:
1917
1894
  return 0;
1918
1895
  }
@@ -1924,13 +1901,7 @@ var Ga = {
1924
1901
  prefix: !1,
1925
1902
  type: 2,
1926
1903
  parse: function(e, A) {
1927
- switch (A) {
1928
- case "break-word":
1929
- return "break-word";
1930
- case "normal":
1931
- default:
1932
- return "normal";
1933
- }
1904
+ return A === "break-word" ? "break-word" : "normal";
1934
1905
  }
1935
1906
  }, ar = function(e) {
1936
1907
  return {
@@ -1952,7 +1923,6 @@ var Ga = {
1952
1923
  case "center":
1953
1924
  case "justify":
1954
1925
  return 1;
1955
- case "left":
1956
1926
  default:
1957
1927
  return 0;
1958
1928
  }
@@ -2071,7 +2041,6 @@ var Ga = {
2071
2041
  return 1;
2072
2042
  case "collapse":
2073
2043
  return 2;
2074
- case "visible":
2075
2044
  default:
2076
2045
  return 0;
2077
2046
  }
@@ -2091,7 +2060,6 @@ var oi = {
2091
2060
  return ae.BREAK_ALL;
2092
2061
  case "keep-all":
2093
2062
  return ae.KEEP_ALL;
2094
- case "normal":
2095
2063
  default:
2096
2064
  return ae.NORMAL;
2097
2065
  }
@@ -2192,17 +2160,7 @@ var oi = {
2192
2160
  type: 0,
2193
2161
  prefix: !1,
2194
2162
  parse: function(e, A) {
2195
- if (kA(A))
2196
- return A.number;
2197
- if (D(A))
2198
- switch (A.value) {
2199
- case "bold":
2200
- return 700;
2201
- case "normal":
2202
- default:
2203
- return 400;
2204
- }
2205
- return 400;
2163
+ return kA(A) ? A.number : D(A) && A.value === "bold" ? 700 : 400;
2206
2164
  }
2207
2165
  }, fi = {
2208
2166
  name: "font-variant",
@@ -2225,7 +2183,6 @@ var oi = {
2225
2183
  return "oblique";
2226
2184
  case "italic":
2227
2185
  return "italic";
2228
- case "normal":
2229
2186
  default:
2230
2187
  return "normal";
2231
2188
  }
@@ -3439,7 +3396,6 @@ var qi = 1, Ur = 2, Fr = 3, Tt = 4, St = 5, ji = 7, Ot = 8, hr = 9, dr = 10, Mt
3439
3396
  return T(e, 3664, 3673, !0, r);
3440
3397
  case 46:
3441
3398
  return T(e, 3872, 3881, !0, r);
3442
- case 3:
3443
3399
  default:
3444
3400
  return T(e, 48, 57, !0, r);
3445
3401
  }
@@ -4049,7 +4005,6 @@ var x = function(e, A, t, r, B) {
4049
4005
  return eA(e.topRightBorderBox, e.topRightPaddingBox, e.bottomRightBorderBox, e.bottomRightPaddingBox);
4050
4006
  case 2:
4051
4007
  return eA(e.bottomRightBorderBox, e.bottomRightPaddingBox, e.bottomLeftBorderBox, e.bottomLeftPaddingBox);
4052
- case 3:
4053
4008
  default:
4054
4009
  return eA(e.bottomLeftBorderBox, e.bottomLeftPaddingBox, e.topLeftBorderBox, e.topLeftPaddingBox);
4055
4010
  }
@@ -4061,7 +4016,6 @@ var x = function(e, A, t, r, B) {
4061
4016
  return eA(e.topRightBorderBox, e.topRightBorderDoubleOuterBox, e.bottomRightBorderBox, e.bottomRightBorderDoubleOuterBox);
4062
4017
  case 2:
4063
4018
  return eA(e.bottomRightBorderBox, e.bottomRightBorderDoubleOuterBox, e.bottomLeftBorderBox, e.bottomLeftBorderDoubleOuterBox);
4064
- case 3:
4065
4019
  default:
4066
4020
  return eA(e.bottomLeftBorderBox, e.bottomLeftBorderDoubleOuterBox, e.topLeftBorderBox, e.topLeftBorderDoubleOuterBox);
4067
4021
  }
@@ -4073,7 +4027,6 @@ var x = function(e, A, t, r, B) {
4073
4027
  return eA(e.topRightBorderDoubleInnerBox, e.topRightPaddingBox, e.bottomRightBorderDoubleInnerBox, e.bottomRightPaddingBox);
4074
4028
  case 2:
4075
4029
  return eA(e.bottomRightBorderDoubleInnerBox, e.bottomRightPaddingBox, e.bottomLeftBorderDoubleInnerBox, e.bottomLeftPaddingBox);
4076
- case 3:
4077
4030
  default:
4078
4031
  return eA(e.bottomLeftBorderDoubleInnerBox, e.bottomLeftPaddingBox, e.topLeftBorderDoubleInnerBox, e.topLeftPaddingBox);
4079
4032
  }
@@ -4085,7 +4038,6 @@ var x = function(e, A, t, r, B) {
4085
4038
  return Oe(e.topRightBorderStroke, e.bottomRightBorderStroke);
4086
4039
  case 2:
4087
4040
  return Oe(e.bottomRightBorderStroke, e.bottomLeftBorderStroke);
4088
- case 3:
4089
4041
  default:
4090
4042
  return Oe(e.bottomLeftBorderStroke, e.topLeftBorderStroke);
4091
4043
  }
@@ -4706,7 +4658,6 @@ var x = function(e, A, t, r, B) {
4706
4658
  return Ze(A);
4707
4659
  case 2:
4708
4660
  return BQ(A);
4709
- case 1:
4710
4661
  default:
4711
4662
  return qe(A);
4712
4663
  }
@@ -4716,7 +4667,6 @@ var x = function(e, A, t, r, B) {
4716
4667
  return "center";
4717
4668
  case 2:
4718
4669
  return "right";
4719
- case 0:
4720
4670
  default:
4721
4671
  return "left";
4722
4672
  }