@splunk/visualizations 28.4.0 → 28.5.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 (165) hide show
  1. package/Area.config.js +28 -7
  2. package/Area.config.js.map +2 -2
  3. package/Area.js +109 -39
  4. package/Area.js.map +2 -2
  5. package/Bar.config.js +28 -7
  6. package/Bar.config.js.map +2 -2
  7. package/Bar.js +109 -39
  8. package/Bar.js.map +2 -2
  9. package/Bubble.config.js +4 -4
  10. package/Bubble.config.js.map +2 -2
  11. package/Bubble.js +81 -30
  12. package/Bubble.js.map +2 -2
  13. package/CHANGELOG.external.md +98 -0
  14. package/ChoroplethSvg.js +74 -26
  15. package/ChoroplethSvg.js.map +2 -2
  16. package/Column.config.js +28 -7
  17. package/Column.config.js.map +2 -2
  18. package/Column.js +109 -39
  19. package/Column.js.map +2 -2
  20. package/Ellipse/config.d.ts.map +1 -1
  21. package/Ellipse.config.js +14 -5
  22. package/Ellipse.config.js.map +4 -4
  23. package/Ellipse.js +130 -73
  24. package/Ellipse.js.map +4 -4
  25. package/Events.js +74 -26
  26. package/Events.js.map +2 -2
  27. package/FillerGauge.js +234 -47
  28. package/FillerGauge.js.map +2 -2
  29. package/Image.js +74 -26
  30. package/Image.js.map +2 -2
  31. package/Line/lineUtils.d.ts.map +1 -1
  32. package/Line/mockdata/LineData.d.ts +95 -0
  33. package/Line/mockdata/LineData.d.ts.map +1 -1
  34. package/Line.config.js +28 -7
  35. package/Line.config.js.map +2 -2
  36. package/Line.js +125 -41
  37. package/Line.js.map +2 -2
  38. package/LinkGraph.js +74 -26
  39. package/LinkGraph.js.map +2 -2
  40. package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
  41. package/Map/PureMap/ClusterLayer.d.ts.map +1 -1
  42. package/Map/PureMap/MapUtils.d.ts +2 -2
  43. package/Map/PureMap/MapUtils.d.ts.map +1 -1
  44. package/Map/PureMap/PureMap.d.ts.map +1 -1
  45. package/Map.js +111 -37
  46. package/Map.js.map +2 -2
  47. package/Markdown/config.d.ts.map +1 -1
  48. package/Markdown.config.js +14 -5
  49. package/Markdown.config.js.map +4 -4
  50. package/Markdown.js +91 -34
  51. package/Markdown.js.map +4 -4
  52. package/MarkerGauge.js +243 -56
  53. package/MarkerGauge.js.map +4 -4
  54. package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts.map +1 -1
  55. package/NetworkGraph/PureNetworkGraph/components/Node.d.ts.map +1 -1
  56. package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts.map +1 -1
  57. package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts +78 -0
  58. package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts.map +1 -0
  59. package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts +1 -2
  60. package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -1
  61. package/NetworkGraph/config.d.ts.map +1 -1
  62. package/NetworkGraph.config.js +1 -0
  63. package/NetworkGraph.config.js.map +2 -2
  64. package/NetworkGraph.js +366 -105
  65. package/NetworkGraph.js.map +4 -4
  66. package/PERFORMANCE.md +23 -0
  67. package/ParallelCoordinates/ParallelCoordinates.d.ts +1 -46
  68. package/ParallelCoordinates/ParallelCoordinates.d.ts.map +1 -1
  69. package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts +12 -58
  70. package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts.map +1 -1
  71. package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts +1 -0
  72. package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts.map +1 -1
  73. package/ParallelCoordinates.js +150 -153
  74. package/ParallelCoordinates.js.map +4 -4
  75. package/Pie/Pie.d.ts.map +1 -1
  76. package/Pie/config.d.ts.map +1 -1
  77. package/Pie/pieUtils.d.ts +4 -0
  78. package/Pie/pieUtils.d.ts.map +1 -1
  79. package/Pie.config.js +16 -0
  80. package/Pie.config.js.map +2 -2
  81. package/Pie.js +121 -35
  82. package/Pie.js.map +2 -2
  83. package/Punchcard.js +74 -26
  84. package/Punchcard.js.map +2 -2
  85. package/Rectangle/config.d.ts.map +1 -1
  86. package/Rectangle.config.js +14 -5
  87. package/Rectangle.config.js.map +4 -4
  88. package/Rectangle.js +92 -35
  89. package/Rectangle.js.map +4 -4
  90. package/Sankey/PureSankey/PureSankey.d.ts +26 -72
  91. package/Sankey/PureSankey/PureSankey.d.ts.map +1 -1
  92. package/Sankey/PureSankey/SankeyLink.d.ts +3 -19
  93. package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -1
  94. package/Sankey/PureSankey/SankeyNode.d.ts +3 -20
  95. package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -1
  96. package/Sankey/PureSankey/SankeyTooltip.d.ts +3 -24
  97. package/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -1
  98. package/Sankey.js +270 -336
  99. package/Sankey.js.map +2 -2
  100. package/Scatter.config.js +168 -147
  101. package/Scatter.config.js.map +4 -4
  102. package/Scatter.js +249 -179
  103. package/Scatter.js.map +4 -4
  104. package/SingleValue.js +96 -75
  105. package/SingleValue.js.map +2 -2
  106. package/SingleValueIcon/config.d.ts.map +1 -1
  107. package/SingleValueIcon.config.js +14 -5
  108. package/SingleValueIcon.config.js.map +4 -4
  109. package/SingleValueIcon.js +118 -76
  110. package/SingleValueIcon.js.map +4 -4
  111. package/SingleValueRadial/PureSingleValueRadial/GaugeGraph.d.ts.map +1 -1
  112. package/SingleValueRadial.js +95 -76
  113. package/SingleValueRadial.js.map +2 -2
  114. package/Table/Table.d.ts.map +1 -1
  115. package/Table/hooks.d.ts +2 -0
  116. package/Table/hooks.d.ts.map +1 -1
  117. package/Table.js +95 -49
  118. package/Table.js.map +2 -2
  119. package/Timeline/PureTimeline/PureTimeline.d.ts.map +1 -1
  120. package/Timeline/PureTimeline/src/TimelinePlugin.d.ts.map +1 -1
  121. package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
  122. package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +2 -1
  123. package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
  124. package/Timeline.js +154 -54
  125. package/Timeline.js.map +2 -2
  126. package/common/Charting.d.ts.map +1 -1
  127. package/common/Charting.js +3 -0
  128. package/common/Charting.js.map +2 -2
  129. package/common/GaugeMajorTicks.js +150 -13
  130. package/common/GaugeMajorTicks.js.map +4 -4
  131. package/common/GaugeValueMarker.js +84 -17
  132. package/common/GaugeValueMarker.js.map +4 -4
  133. package/common/OptionsDoc.js.map +1 -1
  134. package/common/OverviewDoc.d.ts.map +1 -1
  135. package/common/OverviewDoc.js +2 -2
  136. package/common/OverviewDoc.js.map +2 -2
  137. package/common/TimeSeriesChartWrapper.d.ts.map +1 -1
  138. package/common/TimeSeriesChartWrapper.js +72 -24
  139. package/common/TimeSeriesChartWrapper.js.map +2 -2
  140. package/common/chartingUtils.d.ts +9 -3
  141. package/common/chartingUtils.d.ts.map +1 -1
  142. package/common/chartingUtils.js +21 -16
  143. package/common/chartingUtils.js.map +2 -2
  144. package/common/editorConfig/AxesChartDataConfig.d.ts +3 -3
  145. package/common/editorConfig/AxesChartDataConfig.d.ts.map +1 -1
  146. package/common/editorConfig/AxesChartDataDisplay.d.ts +4 -0
  147. package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -1
  148. package/common/editorConfig/AxesChartLegend.d.ts.map +1 -1
  149. package/common/gaugeUtils.d.ts +37 -0
  150. package/common/gaugeUtils.d.ts.map +1 -1
  151. package/common/gaugeUtils.js +152 -2
  152. package/common/gaugeUtils.js.map +4 -4
  153. package/common/hocs/mockdata/trellisData.d.ts +119 -0
  154. package/common/hocs/mockdata/trellisData.d.ts.map +1 -1
  155. package/common/interfaces/Overview.d.ts +1 -0
  156. package/common/interfaces/Overview.d.ts.map +1 -1
  157. package/common/interfaces/VizConfig.d.ts +2 -1
  158. package/common/interfaces/VizConfig.d.ts.map +1 -1
  159. package/common/utils/mapUtils.js.map +1 -1
  160. package/common/utils/trellisUtils.d.ts.map +1 -1
  161. package/common/utils/trellisUtils.js +4 -6
  162. package/common/utils/trellisUtils.js.map +2 -2
  163. package/common/withDashboardViz.js +74 -26
  164. package/common/withDashboardViz.js.map +2 -2
  165. package/package.json +36 -36
package/FillerGauge.js CHANGED
@@ -985,7 +985,7 @@ var Cover = styled_components_default.div`
985
985
  bottom: 0;
986
986
  `;
987
987
  var Blocker = styled_components_default.div.attrs({
988
- "data-splunk-visualization-version": "28.4.0 - 002bd482f"
988
+ "data-splunk-visualization-version": "28.5.1 - 617766eb3"
989
989
  })`
990
990
  position: relative;
991
991
  width: 100%;
@@ -1075,7 +1075,7 @@ var withFixedSizeContainer = (Viz) => {
1075
1075
  FixSizeItem,
1076
1076
  {
1077
1077
  "data-test": "fix-size-item",
1078
- "data-splunk-visualization-version": "28.4.0 - 002bd482f",
1078
+ "data-splunk-visualization-version": "28.5.1 - 617766eb3",
1079
1079
  width,
1080
1080
  height,
1081
1081
  backgroundColor
@@ -1701,16 +1701,14 @@ var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
1701
1701
  splitDataSources[val] = (0, lodash_exports.cloneDeep)(
1702
1702
  (0, lodash_exports.omit)(dataSource, ["primary.data.fields", "primary.data.columns"])
1703
1703
  );
1704
- splitDataSources[val].primary.data.fields = [
1705
- { name: fields[0].name },
1706
- ...dataSourceKeys.map((k) => ({
1707
- name: k
1708
- }))
1709
- ];
1704
+ splitDataSources[val].primary.data.fields = [{ name: fields[0].name }];
1710
1705
  splitDataSources[val].primary.data.columns = [[...columns[0]]];
1711
1706
  dataSourceKeys.forEach((dsKey) => {
1712
1707
  fields.forEach((field, idx) => {
1713
1708
  if (field.data_source === dsKey && (field.splitby_value === val || field.name === val)) {
1709
+ splitDataSources[val].primary.data.fields.push({
1710
+ name: dsKey
1711
+ });
1714
1712
  splitDataSources[val].primary.data.columns.push([...columns[idx]]);
1715
1713
  }
1716
1714
  });
@@ -2011,25 +2009,27 @@ var parseAxisValue = (val) => {
2011
2009
  const num = typeof val === "number" ? val : Number.parseFloat(val);
2012
2010
  return Number.isNaN(num) ? void 0 : num;
2013
2011
  };
2014
- var SideLegendWidth = 75;
2015
- var SeriesCompareLegendWidth = 200;
2012
+ var parseXAxisLineVisibility = (visibility) => {
2013
+ if (visibility === "hide") return false;
2014
+ if (visibility === "show") return true;
2015
+ return void 0;
2016
+ };
2016
2017
  var getLegend = (props) => {
2017
2018
  const legendPlacement = props == null ? void 0 : props.legendDisplay;
2018
- const { isSeriesCompare } = props;
2019
+ const { isSeriesCompare, legendTruncation } = props;
2019
2020
  const commonLegendProps = {
2020
2021
  center: true,
2021
2022
  fontSize: 12,
2022
2023
  largerTiles: true,
2023
- hideSeriesValue: !isSeriesCompare
2024
+ hideSeriesValue: !isSeriesCompare,
2024
2025
  // Show values if in seriesCompare mode
2026
+ legendTruncation
2025
2027
  };
2026
2028
  switch (legendPlacement) {
2027
2029
  case "off":
2028
2030
  return false;
2029
2031
  case "left":
2030
- return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
2031
- width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
2032
- }, commonLegendProps));
2032
+ return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
2033
2033
  case "bottom":
2034
2034
  return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
2035
2035
  wrap: true
@@ -2039,9 +2039,7 @@ var getLegend = (props) => {
2039
2039
  wrap: true
2040
2040
  }, commonLegendProps));
2041
2041
  default:
2042
- return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
2043
- width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
2044
- }, commonLegendProps));
2042
+ return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
2045
2043
  }
2046
2044
  };
2047
2045
  var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
@@ -2102,9 +2100,7 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
2102
2100
  if (yAxisAbbreviation !== "none") {
2103
2101
  yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
2104
2102
  }
2105
- if (yAxisAbbreviation === "none") {
2106
- yConfig.y.width = 55;
2107
- } else {
2103
+ if (yAxisAbbreviation !== "none") {
2108
2104
  yConfig.y.width = label && label.length > 0 ? 30 : 10;
2109
2105
  }
2110
2106
  if (yAxisLabelVisibility === "hide") {
@@ -2127,6 +2123,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
2127
2123
  y2Config.y2.type = scaleType;
2128
2124
  if (axisAbbreviation !== "none") {
2129
2125
  y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
2126
+ y2Config.y2.width = label && label.length > 0 ? 50 : 10;
2130
2127
  } else if (roundAxisLabelsToInteger) {
2131
2128
  y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
2132
2129
  }
@@ -2142,7 +2139,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
2142
2139
  }
2143
2140
  return y2Config;
2144
2141
  };
2145
- var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField) => {
2142
+ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
2146
2143
  const seriesConfig = {};
2147
2144
  let spanGaps;
2148
2145
  let replaceNullsWithZero;
@@ -2169,6 +2166,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
2169
2166
  );
2170
2167
  if (shouldAssignToY2) {
2171
2168
  seriesConfig[field].overrides.scale = "y2";
2169
+ } else {
2170
+ seriesConfig[field].overrides.scale = "y";
2172
2171
  }
2173
2172
  }
2174
2173
  if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
@@ -2181,6 +2180,11 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
2181
2180
  if (fieldDashStyle) {
2182
2181
  seriesConfig[field].lineDashStyle = fieldDashStyle;
2183
2182
  }
2183
+ const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
2184
+ const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
2185
+ if (fieldStepPosition && fieldStepPosition !== "off") {
2186
+ seriesConfig[field].stepPosition = fieldStepPosition;
2187
+ }
2184
2188
  if (replaceNullsWithZero !== void 0) {
2185
2189
  seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
2186
2190
  }
@@ -2405,6 +2409,9 @@ var TimeSeriesChartWrapper = (props) => {
2405
2409
  backgroundColor,
2406
2410
  defaultFontColor,
2407
2411
  additionalTooltipValues,
2412
+ xAxisLineVisibility: xAxisLineVisibility,
2413
+ yAxisLineVisibility,
2414
+ y2AxisLineVisibility,
2408
2415
  showYAxisWithZero: showYAxisWithZeroFromProps,
2409
2416
  showY2AxisWithZero: showY2AxisWithZeroFromProps
2410
2417
  } = _a, otherOptions = __objRest(_a, [
@@ -2428,6 +2435,10 @@ var TimeSeriesChartWrapper = (props) => {
2428
2435
  "backgroundColor",
2429
2436
  "defaultFontColor",
2430
2437
  "additionalTooltipValues",
2438
+ // Extract axis line visibility options from props
2439
+ "xAxisLineVisibility",
2440
+ "yAxisLineVisibility",
2441
+ "y2AxisLineVisibility",
2431
2442
  // Extract showYAxisWithZero directly from props for accelerated render mode
2432
2443
  "showYAxisWithZero",
2433
2444
  "showY2AxisWithZero"
@@ -2440,6 +2451,7 @@ var TimeSeriesChartWrapper = (props) => {
2440
2451
  fieldColors,
2441
2452
  legendLabels: legendLabelsStr,
2442
2453
  legendMode,
2454
+ legendTruncation,
2443
2455
  "axisTitleX.text": xAxisTitleText,
2444
2456
  "axisTitleY.text": yAxisTitleText,
2445
2457
  "axisTitleY2.text": y2AxisTitleText,
@@ -2448,6 +2460,7 @@ var TimeSeriesChartWrapper = (props) => {
2448
2460
  "axisTitleY2.visibility": y2AxisTitleVisibility,
2449
2461
  "axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
2450
2462
  "axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
2463
+ "axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
2451
2464
  "axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
2452
2465
  "axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
2453
2466
  "axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
@@ -2465,6 +2478,8 @@ var TimeSeriesChartWrapper = (props) => {
2465
2478
  lineWidth,
2466
2479
  lineDashStyle,
2467
2480
  fieldDashStyles: lineDashStylesByFieldStr,
2481
+ stepPosition,
2482
+ fieldStepPositions: stepPositionsByFieldStr,
2468
2483
  yAxisMin: yAxisMinRaw,
2469
2484
  yAxisMax: yAxisMaxRaw,
2470
2485
  y2AxisMin: y2AxisMinRaw,
@@ -2475,6 +2490,8 @@ var TimeSeriesChartWrapper = (props) => {
2475
2490
  showYMinorGridLines,
2476
2491
  showY2MinorGridLines,
2477
2492
  showLineSmoothing,
2493
+ xAxisMajorTickVisibility,
2494
+ xAxisMajorTickSize,
2478
2495
  yAxisMajorTickVisibility,
2479
2496
  y2AxisMajorTickVisibility,
2480
2497
  yAxisMajorTickSize,
@@ -2491,10 +2508,14 @@ var TimeSeriesChartWrapper = (props) => {
2491
2508
  const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
2492
2509
  const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
2493
2510
  const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
2511
+ const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
2494
2512
  const showYMajorTicks = yAxisMajorTickVisibility === "show";
2495
2513
  const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
2496
2514
  const showYMinorTicks = yAxisMinorTickVisibility === "show";
2497
2515
  const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
2516
+ const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
2517
+ const showYAxisLine = yAxisLineVisibility === "show";
2518
+ const showY2AxisLine = y2AxisLineVisibility === "show";
2498
2519
  const yAxisMin = parseAxisValue(yAxisMinRaw);
2499
2520
  const yAxisMax = parseAxisValue(yAxisMaxRaw);
2500
2521
  const y2AxisMin = parseAxisValue(y2AxisMinRaw);
@@ -2509,13 +2530,15 @@ var TimeSeriesChartWrapper = (props) => {
2509
2530
  y2AxisMajorUnitFromSimpleXML,
2510
2531
  y2AxisMajorTickInterval
2511
2532
  );
2512
- const yAxisMajorTickSizeNum = yAxisMajorTickSize ? Number(yAxisMajorTickSize) : void 0;
2513
- const y2AxisMajorTickSizeNum = y2AxisMajorTickSize ? Number(y2AxisMajorTickSize) : void 0;
2514
- const yAxisMinorTickSizeNum = yAxisMinorTickSize ? Number(yAxisMinorTickSize) : void 0;
2515
- const y2AxisMinorTickSizeNum = y2AxisMinorTickSize ? Number(y2AxisMinorTickSize) : void 0;
2533
+ const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
2534
+ const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
2535
+ const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
2536
+ const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
2537
+ const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
2516
2538
  const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
2517
2539
  const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
2518
2540
  const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
2541
+ const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
2519
2542
  const legendLabels = parseArrayOption(legendLabelsStr);
2520
2543
  const bgColor = backgroundColor || bgColorFromOptions;
2521
2544
  const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
@@ -2603,7 +2626,9 @@ var TimeSeriesChartWrapper = (props) => {
2603
2626
  nullValueMode,
2604
2627
  markerDisplay,
2605
2628
  lineDashStyle,
2606
- lineDashStylesByField
2629
+ lineDashStylesByField,
2630
+ stepPosition,
2631
+ stepPositionsByField
2607
2632
  ),
2608
2633
  [
2609
2634
  yFields,
@@ -2614,7 +2639,9 @@ var TimeSeriesChartWrapper = (props) => {
2614
2639
  nullValueMode,
2615
2640
  markerDisplay,
2616
2641
  lineDashStyle,
2617
- lineDashStylesByField
2642
+ lineDashStylesByField,
2643
+ stepPosition,
2644
+ stepPositionsByField
2618
2645
  ]
2619
2646
  );
2620
2647
  const chartingEventAnnotations = (0, react_exports.useMemo)(
@@ -2629,9 +2656,14 @@ var TimeSeriesChartWrapper = (props) => {
2629
2656
  () => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
2630
2657
  [xScaleConfig, yScaleConfig, y2ScaleConfig]
2631
2658
  );
2659
+ const isSeriesCompare = legendMode === "seriesCompare";
2632
2660
  const legend = (0, react_exports.useMemo)(
2633
- () => getLegend({ legendDisplay, isSeriesCompare: legendMode === "seriesCompare" }),
2634
- [legendDisplay, legendMode]
2661
+ () => getLegend({
2662
+ legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
2663
+ isSeriesCompare,
2664
+ legendTruncation
2665
+ }),
2666
+ [legendDisplay, isSeriesCompare, legendTruncation]
2635
2667
  );
2636
2668
  const handleChartClick = react_exports.useCallback(
2637
2669
  (event) => {
@@ -2736,6 +2768,7 @@ var TimeSeriesChartWrapper = (props) => {
2736
2768
  seriesConfig: seriesOverrides,
2737
2769
  legend,
2738
2770
  legendLabels,
2771
+ legendTruncation,
2739
2772
  isSeriesCompare: legendMode === "seriesCompare",
2740
2773
  maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
2741
2774
  scaleConfig,
@@ -2757,6 +2790,8 @@ var TimeSeriesChartWrapper = (props) => {
2757
2790
  showY2MinorGridLines,
2758
2791
  showLineSmoothing,
2759
2792
  dataValuesDisplay,
2793
+ showXMajorTicks,
2794
+ xAxisMajorTickSize: xAxisMajorTickSizeNum,
2760
2795
  showYMajorTicks,
2761
2796
  showY2MajorTicks,
2762
2797
  yAxisMajorTickSize: yAxisMajorTickSizeNum,
@@ -2768,7 +2803,11 @@ var TimeSeriesChartWrapper = (props) => {
2768
2803
  yAxisMinorTickSize: yAxisMinorTickSizeNum,
2769
2804
  y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
2770
2805
  showYAxisWithZero,
2771
- showY2AxisWithZero
2806
+ showY2AxisWithZero,
2807
+ showXAxisLine,
2808
+ showYAxisLine,
2809
+ showY2AxisLine,
2810
+ xAxisMaxLabelParts
2772
2811
  }
2773
2812
  ));
2774
2813
  }, [
@@ -2783,6 +2822,7 @@ var TimeSeriesChartWrapper = (props) => {
2783
2822
  seriesOverrides,
2784
2823
  legend,
2785
2824
  legendLabels,
2825
+ legendTruncation,
2786
2826
  scaleConfig,
2787
2827
  onClick,
2788
2828
  handleChartClick,
@@ -2801,6 +2841,8 @@ var TimeSeriesChartWrapper = (props) => {
2801
2841
  showY2MinorGridLines,
2802
2842
  showLineSmoothing,
2803
2843
  dataValuesDisplay,
2844
+ showXMajorTicks,
2845
+ xAxisMajorTickSizeNum,
2804
2846
  showYMajorTicks,
2805
2847
  showY2MajorTicks,
2806
2848
  yAxisMajorTickSizeNum,
@@ -2813,7 +2855,11 @@ var TimeSeriesChartWrapper = (props) => {
2813
2855
  y2AxisMinorTickSizeNum,
2814
2856
  showYAxisWithZero,
2815
2857
  showY2AxisWithZero,
2816
- legendMode
2858
+ showXAxisLine,
2859
+ showYAxisLine,
2860
+ showY2AxisLine,
2861
+ legendMode,
2862
+ xAxisMaxLabelParts
2817
2863
  ]);
2818
2864
  const memoizedVisualization = (0, react_exports.useMemo)(() => {
2819
2865
  return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
@@ -3137,6 +3183,10 @@ var colorConstants_default = "default" in defaultImport33 ? defaultImport33.defa
3137
3183
  // src/common/gaugeUtils.ts
3138
3184
  var GAUGE_THICKNESS = 50;
3139
3185
  var FILL_THICKNESS = 38;
3186
+ var DEFAULT_NUM_OF_TICKS = 5;
3187
+ var MAX_TICK_LABEL_DECIMAL_PLACES = 5;
3188
+ var MAX_VALUE_LABEL_DIGITS_WITHOUT_PERCENT = 6;
3189
+ var MAX_VALUE_LABEL_DIGITS_WITH_PERCENT = 5;
3140
3190
  var getGaugeWidth = ({ containerWidth, orientation }) => orientation === "vertical" ? GAUGE_THICKNESS : containerWidth * 0.8;
3141
3191
  var getGaugeHeight = ({ containerHeight, orientation }) => orientation === "vertical" ? containerHeight * 0.8 : GAUGE_THICKNESS;
3142
3192
  var getGaugeLength = ({ containerWidth, containerHeight, orientation }) => orientation === "vertical" ? getGaugeHeight({ containerHeight, orientation }) : getGaugeWidth({ containerWidth, orientation });
@@ -3260,6 +3310,137 @@ var getFillerGaugeValueMarkerPositions = ({ fillBarX, fillBarY, fillBarLength, o
3260
3310
  valueMarkerY
3261
3311
  };
3262
3312
  };
3313
+ var getDecimalPlaces = (value) => {
3314
+ const numericValue = Number(value);
3315
+ if (!Number.isFinite(numericValue)) {
3316
+ return 0;
3317
+ }
3318
+ const fractionPart = numericValue.toString().split(".")[1];
3319
+ return fractionPart ? fractionPart.length : 0;
3320
+ };
3321
+ var getUniqueDecimalPlaces = ({
3322
+ values,
3323
+ minimumDecimalPlaces
3324
+ }) => {
3325
+ if (values.length <= 1) {
3326
+ return minimumDecimalPlaces;
3327
+ }
3328
+ for (let decimalPlaces = minimumDecimalPlaces; decimalPlaces <= MAX_TICK_LABEL_DECIMAL_PLACES; decimalPlaces += 1) {
3329
+ const roundedValues = values.map((value) => Number(value.toFixed(decimalPlaces)));
3330
+ if (new Set(roundedValues).size === roundedValues.length) {
3331
+ return decimalPlaces;
3332
+ }
3333
+ }
3334
+ return MAX_TICK_LABEL_DECIMAL_PLACES;
3335
+ };
3336
+ var getPercentageFromRange = ({ value, min, range: range2 }) => {
3337
+ if (range2 === 0) {
3338
+ return 0;
3339
+ }
3340
+ return (value - min) / range2 * 100;
3341
+ };
3342
+ var getNumOfTicks = ({
3343
+ min,
3344
+ max,
3345
+ majorUnit,
3346
+ usePercentageRange
3347
+ }) => {
3348
+ const range2 = max - min;
3349
+ const majorUnitNumber = Number(majorUnit);
3350
+ const isAutoMajorUnit = majorUnit === "auto" || Number.isNaN(majorUnitNumber) || majorUnitNumber <= 0;
3351
+ let numOfTicks = DEFAULT_NUM_OF_TICKS;
3352
+ if (!isAutoMajorUnit) {
3353
+ numOfTicks = usePercentageRange ? 100 / majorUnitNumber : range2 / majorUnitNumber;
3354
+ }
3355
+ return { numOfTicks, isAutoMajorUnit, majorUnitNumber };
3356
+ };
3357
+ var getTickLabelFormatter = ({
3358
+ min,
3359
+ max,
3360
+ majorUnit,
3361
+ usePercentageRange
3362
+ }) => {
3363
+ const range2 = max - min;
3364
+ const { numOfTicks, isAutoMajorUnit, majorUnitNumber } = getNumOfTicks({
3365
+ min,
3366
+ max,
3367
+ majorUnit,
3368
+ usePercentageRange
3369
+ });
3370
+ const numericStep = range2 / numOfTicks;
3371
+ const tickValues = [];
3372
+ for (let i = 0; i <= numOfTicks; i += 1) {
3373
+ tickValues.push(min + numericStep * i);
3374
+ }
3375
+ if (!Number.isInteger(numOfTicks)) {
3376
+ tickValues.push(max);
3377
+ }
3378
+ const minimumNumericDecimalPlaces = Math.min(
3379
+ MAX_TICK_LABEL_DECIMAL_PLACES,
3380
+ Math.max(
3381
+ getDecimalPlaces(min),
3382
+ getDecimalPlaces(max),
3383
+ isAutoMajorUnit ? 0 : getDecimalPlaces(majorUnitNumber)
3384
+ )
3385
+ );
3386
+ const numericLabelDecimalPlaces = getUniqueDecimalPlaces({
3387
+ values: tickValues,
3388
+ minimumDecimalPlaces: minimumNumericDecimalPlaces
3389
+ });
3390
+ const percentageLabelDecimalPlaces = getUniqueDecimalPlaces({
3391
+ values: tickValues.map((value) => getPercentageFromRange({ value, min, range: range2 })),
3392
+ minimumDecimalPlaces: 0
3393
+ });
3394
+ const formatTickLabel = (value) => {
3395
+ if (usePercentageRange) {
3396
+ const percentageValue = getPercentageFromRange({ value, min, range: range2 });
3397
+ return `${percentageValue.toFixed(percentageLabelDecimalPlaces)}%`;
3398
+ }
3399
+ const numericLabel = value.toFixed(numericLabelDecimalPlaces);
3400
+ if (numericLabel.includes(".")) {
3401
+ return numericLabel;
3402
+ }
3403
+ return (0, numberUtils_exports.formatNumber)(Number(numericLabel), 0, {
3404
+ useThousandSeparators: true,
3405
+ useTrendUnits: true
3406
+ }).replace(/k$/, "K");
3407
+ };
3408
+ return { numOfTicks, numericStep, formatTickLabel };
3409
+ };
3410
+ var getDigitsBeforeDecimal = (numericValue) => Math.abs(Math.trunc(Number(numericValue))).toString().length;
3411
+ var getCappedDecimalPlaces = (numericValue, rawDecimalPlaces, maxDigits) => {
3412
+ const digitsBeforeDecimal = getDigitsBeforeDecimal(numericValue);
3413
+ const maxDecimalPlaces = Math.max(0, maxDigits - digitsBeforeDecimal);
3414
+ return Math.min(rawDecimalPlaces, maxDecimalPlaces);
3415
+ };
3416
+ var formatGaugeValueLabel = ({
3417
+ value,
3418
+ min,
3419
+ max,
3420
+ usePercentageValue
3421
+ }) => {
3422
+ const numericValue = Number(value);
3423
+ const range2 = max - min || 1;
3424
+ const percentageValue = getPercentageFromRange({ value: numericValue, min, range: range2 });
3425
+ const trendFormatOptions = {
3426
+ useThousandSeparators: true,
3427
+ useTrendUnits: true
3428
+ };
3429
+ if (usePercentageValue) {
3430
+ const percentageDecimalPlaces = getCappedDecimalPlaces(
3431
+ percentageValue,
3432
+ 2,
3433
+ MAX_VALUE_LABEL_DIGITS_WITH_PERCENT
3434
+ );
3435
+ return `${(0, numberUtils_exports.formatNumber)(percentageValue, percentageDecimalPlaces, trendFormatOptions)}%`;
3436
+ }
3437
+ const valueDecimalPlaces = getCappedDecimalPlaces(
3438
+ numericValue,
3439
+ getDecimalPlaces(numericValue),
3440
+ MAX_VALUE_LABEL_DIGITS_WITHOUT_PERCENT
3441
+ );
3442
+ return (0, numberUtils_exports.formatNumber)(numericValue, valueDecimalPlaces, trendFormatOptions);
3443
+ };
3263
3444
  var gaugeOptionsMapping = {
3264
3445
  majorTickInterval: "majorUnit",
3265
3446
  gaugeRanges: "ranges"
@@ -3288,9 +3469,9 @@ var mapValueLabelDisplay = (labelOrValue, options) => {
3288
3469
  var convertToGaugeProperties = (originalOptions) => (0, lodash_exports.chain)(mapToOldKey(originalOptions)).thru((options) => mapValueLabelDisplay("label", options)).thru((options) => mapValueLabelDisplay("value", options)).value();
3289
3470
 
3290
3471
  // src/common/GaugeMajorTicks.jsx
3291
- var DEFAULT_NUM_OF_TICKS = 5;
3292
3472
  var TICK_LENGTH_DELTA = 5;
3293
3473
  var TICK_LABEL_PADDING_FACTOR = 3.2;
3474
+ var VERTICAL_START_ANCHOR_OFFSET = 8;
3294
3475
  var MajorTickLine = styled_components_default.line`
3295
3476
  stroke: ${(props) => props.majorTickStrokeColor};
3296
3477
  stroke-width: 2px;
@@ -3303,7 +3484,7 @@ var MajorTickLabel = styled_components_default.text`
3303
3484
  sans-serif;
3304
3485
  line-height: 19px;
3305
3486
  fill: ${(props) => props.majorTickFillColor};
3306
- text-anchor: middle;
3487
+ text-anchor: ${(props) => props.textAnchor};
3307
3488
  text-align: center;
3308
3489
  `;
3309
3490
  var MajorTick = ({
@@ -3316,6 +3497,7 @@ var MajorTick = ({
3316
3497
  label,
3317
3498
  labelX,
3318
3499
  labelY,
3500
+ textAnchor = "middle",
3319
3501
  majorTickStrokeColor,
3320
3502
  majorTickFillColor
3321
3503
  }) => /* @__PURE__ */ react_default.createElement("g", null, /* @__PURE__ */ react_default.createElement(
@@ -3334,13 +3516,11 @@ var MajorTick = ({
3334
3516
  {
3335
3517
  x: labelX,
3336
3518
  y: labelY,
3519
+ textAnchor,
3337
3520
  majorTickFillColor,
3338
3521
  "data-test": "major-tick-label"
3339
3522
  },
3340
- (0, numberUtils_exports.isNumerial)(label) ? (0, numberUtils_exports.formatNumber)(label, 0, {
3341
- useThousandSeparators: true,
3342
- useTrendUnits: true
3343
- }) : label
3523
+ label
3344
3524
  ));
3345
3525
  MajorTick.propTypes = {
3346
3526
  index: prop_types_default.number,
@@ -3352,6 +3532,7 @@ MajorTick.propTypes = {
3352
3532
  label: prop_types_default.oneOfType([prop_types_default.string, prop_types_default.number]),
3353
3533
  labelX: prop_types_default.number,
3354
3534
  labelY: prop_types_default.number,
3535
+ textAnchor: prop_types_default.string,
3355
3536
  majorTickStrokeColor: prop_types_default.string,
3356
3537
  majorTickFillColor: prop_types_default.string
3357
3538
  };
@@ -3368,7 +3549,7 @@ var positionMajorTick = ({ width, height, startX, startY, orientation, numOfTick
3368
3549
  y1 = y;
3369
3550
  x2 += width + TICK_LENGTH_DELTA;
3370
3551
  y2 = y;
3371
- labelX += width + TICK_LENGTH_DELTA * TICK_LABEL_PADDING_FACTOR;
3552
+ labelX += width + TICK_LENGTH_DELTA * TICK_LABEL_PADDING_FACTOR - VERTICAL_START_ANCHOR_OFFSET;
3372
3553
  labelY = y;
3373
3554
  } else {
3374
3555
  const x = width / numOfTicks * i + startX;
@@ -3397,10 +3578,17 @@ var MajorTicks = (_a) => {
3397
3578
  majorTickFillColor,
3398
3579
  majorTickStrokeColor
3399
3580
  } = props;
3400
- const range2 = max - min;
3401
- const numOfTicks = majorUnit === "auto" || Number.isNaN(Number(majorUnit)) || majorUnit <= 0 ? DEFAULT_NUM_OF_TICKS : range2 / majorUnit;
3581
+ const isVertical = orientation === "vertical";
3582
+ const textAnchor = isVertical ? "start" : "middle";
3583
+ const { numOfTicks, numericStep, formatTickLabel } = getTickLabelFormatter({
3584
+ min,
3585
+ max,
3586
+ majorUnit,
3587
+ usePercentageRange
3588
+ });
3402
3589
  const majorTicks = [];
3403
3590
  for (let i = 0; i <= numOfTicks; i += 1) {
3591
+ const tickValue = min + numericStep * i;
3404
3592
  const { x1, y1, x2, y2, labelX, labelY } = positionMajorTick({
3405
3593
  width,
3406
3594
  height,
@@ -3410,7 +3598,7 @@ var MajorTicks = (_a) => {
3410
3598
  numOfTicks,
3411
3599
  i
3412
3600
  });
3413
- const label = usePercentageRange ? `${parseInt((i / numOfTicks - min / range2) * 100, 10)}%` : parseInt(min + range2 / numOfTicks * i, 10);
3601
+ const label = formatTickLabel(tickValue);
3414
3602
  majorTicks.push(
3415
3603
  /* @__PURE__ */ react_default.createElement(
3416
3604
  MajorTick,
@@ -3425,6 +3613,7 @@ var MajorTicks = (_a) => {
3425
3613
  label,
3426
3614
  labelX,
3427
3615
  labelY,
3616
+ textAnchor,
3428
3617
  majorTickFillColor,
3429
3618
  majorTickStrokeColor
3430
3619
  }
@@ -3453,9 +3642,10 @@ var MajorTicks = (_a) => {
3453
3642
  x2,
3454
3643
  y2,
3455
3644
  showLabels,
3456
- label: usePercentageRange ? "100%" : max,
3645
+ label: formatTickLabel(max),
3457
3646
  labelX,
3458
3647
  labelY,
3648
+ textAnchor,
3459
3649
  majorTickFillColor,
3460
3650
  majorTickStrokeColor
3461
3651
  }
@@ -3610,10 +3800,7 @@ var ValueMarker = (_a) => {
3610
3800
  valueMarkerLabelFillColor,
3611
3801
  "aria-label": (0, format_exports.sprintf)((0, i18n_exports._)("Marker gauge value: %s"), value)
3612
3802
  },
3613
- usePercentageValue ? `${(value / (max - min) * 100).toFixed(2)}%` : (0, numberUtils_exports.formatNumber)(value, 0, {
3614
- useThousandSeparators: true,
3615
- useTrendUnits: true
3616
- })
3803
+ formatGaugeValueLabel({ value, min, max, usePercentageValue })
3617
3804
  )));
3618
3805
  };
3619
3806
  ValueMarker.propTypes = {