@splunk/visualizations 28.3.0 → 28.5.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 (285) hide show
  1. package/Area/Area.d.ts.map +1 -1
  2. package/Area.config.js +28 -8
  3. package/Area.config.js.map +2 -2
  4. package/Area.js +583 -120
  5. package/Area.js.map +3 -3
  6. package/Bar/Bar.d.ts.map +1 -1
  7. package/Bar.config.js +28 -8
  8. package/Bar.config.js.map +2 -2
  9. package/Bar.js +593 -120
  10. package/Bar.js.map +3 -3
  11. package/Bubble.config.js +4 -5
  12. package/Bubble.config.js.map +2 -2
  13. package/Bubble.js +554 -98
  14. package/Bubble.js.map +3 -3
  15. package/CHANGELOG.external.md +165 -0
  16. package/ChoroplethSvg/ChoroplethSvg.d.ts +4 -3
  17. package/ChoroplethSvg/ChoroplethSvg.d.ts.map +1 -1
  18. package/ChoroplethSvg.config.js +1 -3
  19. package/ChoroplethSvg.config.js.map +2 -2
  20. package/ChoroplethSvg.js +595 -111
  21. package/ChoroplethSvg.js.map +4 -4
  22. package/Column/Column.d.ts.map +1 -1
  23. package/Column.config.js +28 -8
  24. package/Column.config.js.map +2 -2
  25. package/Column.js +583 -120
  26. package/Column.js.map +3 -3
  27. package/Ellipse/config.d.ts.map +1 -1
  28. package/Ellipse.config.js +14 -5
  29. package/Ellipse.config.js.map +4 -4
  30. package/Ellipse.js +640 -159
  31. package/Ellipse.js.map +4 -4
  32. package/Events/PureEvents/PureEvents.d.ts.map +1 -1
  33. package/Events.js +668 -157
  34. package/Events.js.map +4 -4
  35. package/FillerGauge/FillerGauge.d.ts.map +1 -1
  36. package/FillerGauge/PureFillerGauge/FillerGauge.d.ts.map +1 -1
  37. package/FillerGauge.js +751 -169
  38. package/FillerGauge.js.map +4 -4
  39. package/Image/Image.d.ts.map +1 -1
  40. package/Image.js +620 -116
  41. package/Image.js.map +4 -4
  42. package/Line/Line.d.ts.map +1 -1
  43. package/Line/lineUtils.d.ts.map +1 -1
  44. package/Line/mockdata/LineData.d.ts +154 -0
  45. package/Line/mockdata/LineData.d.ts.map +1 -1
  46. package/Line.config.js +28 -8
  47. package/Line.config.js.map +2 -2
  48. package/Line.js +704 -122
  49. package/Line.js.map +3 -3
  50. package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts +5 -0
  51. package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts.map +1 -1
  52. package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts.map +1 -1
  53. package/LinkGraph/PureLinkGraph/components/Graph.d.ts +9 -1
  54. package/LinkGraph/PureLinkGraph/components/Graph.d.ts.map +1 -1
  55. package/LinkGraph/PureLinkGraph/components/GraphStyles.d.ts.map +1 -1
  56. package/LinkGraph/PureLinkGraph/components/Node.d.ts +1 -0
  57. package/LinkGraph/PureLinkGraph/components/Node.d.ts.map +1 -1
  58. package/LinkGraph/PureLinkGraph/components/Nodes.d.ts +1 -0
  59. package/LinkGraph/PureLinkGraph/components/Nodes.d.ts.map +1 -1
  60. package/LinkGraph/PureLinkGraph/measurementUtils.d.ts +16 -0
  61. package/LinkGraph/PureLinkGraph/measurementUtils.d.ts.map +1 -0
  62. package/LinkGraph/PureLinkGraph/utils/iconLoader.d.ts.map +1 -1
  63. package/LinkGraph/config.d.ts.map +1 -1
  64. package/LinkGraph.config.js +15 -1
  65. package/LinkGraph.config.js.map +2 -2
  66. package/LinkGraph.js +1411 -662
  67. package/LinkGraph.js.map +4 -4
  68. package/Map/Map.d.ts +2 -2
  69. package/Map/Map.d.ts.map +1 -1
  70. package/Map/PureMap/BubbleLayer.d.ts +5 -0
  71. package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
  72. package/Map/PureMap/ClusterLayer.d.ts.map +1 -1
  73. package/Map/PureMap/LocalChoroplethLayer.d.ts.map +1 -1
  74. package/Map/PureMap/MapUtils.d.ts +2 -2
  75. package/Map/PureMap/MapUtils.d.ts.map +1 -1
  76. package/Map/PureMap/PureMap.d.ts.map +1 -1
  77. package/Map/PureMap/PureMapContainer.d.ts.map +1 -1
  78. package/Map/PureMap/Tooltip.d.ts.map +1 -1
  79. package/Map/config.d.ts.map +1 -1
  80. package/Map.config.js +0 -1
  81. package/Map.config.js.map +2 -2
  82. package/Map.js +831 -247
  83. package/Map.js.map +4 -4
  84. package/Markdown/Markdown.d.ts.map +1 -1
  85. package/Markdown/config.d.ts.map +1 -1
  86. package/Markdown.config.js +14 -5
  87. package/Markdown.config.js.map +4 -4
  88. package/Markdown.js +619 -109
  89. package/Markdown.js.map +4 -4
  90. package/MarkerGauge/MarkerGauge.d.ts +5 -1
  91. package/MarkerGauge/MarkerGauge.d.ts.map +1 -1
  92. package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts +4 -0
  93. package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts.map +1 -1
  94. package/MarkerGauge/config.d.ts.map +1 -1
  95. package/MarkerGauge.config.js +121 -3
  96. package/MarkerGauge.config.js.map +3 -3
  97. package/MarkerGauge.js +1535 -172
  98. package/MarkerGauge.js.map +4 -4
  99. package/NetworkGraph/NetworkGraph.d.ts +22 -0
  100. package/NetworkGraph/NetworkGraph.d.ts.map +1 -0
  101. package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts +60 -0
  102. package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts.map +1 -0
  103. package/NetworkGraph/PureNetworkGraph/components/Link.d.ts +19 -0
  104. package/NetworkGraph/PureNetworkGraph/components/Link.d.ts.map +1 -0
  105. package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts +29 -0
  106. package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts.map +1 -0
  107. package/NetworkGraph/PureNetworkGraph/components/Node.d.ts +27 -0
  108. package/NetworkGraph/PureNetworkGraph/components/Node.d.ts.map +1 -0
  109. package/NetworkGraph/PureNetworkGraph/components/Tooltip.d.ts +12 -0
  110. package/NetworkGraph/PureNetworkGraph/components/Tooltip.d.ts.map +1 -0
  111. package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts +13 -0
  112. package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts.map +1 -0
  113. package/NetworkGraph/PureNetworkGraph/mockdata/data.d.ts +140 -0
  114. package/NetworkGraph/PureNetworkGraph/mockdata/data.d.ts.map +1 -0
  115. package/NetworkGraph/PureNetworkGraph/mockdata/datasource.d.ts +89 -0
  116. package/NetworkGraph/PureNetworkGraph/mockdata/datasource.d.ts.map +1 -0
  117. package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts +78 -0
  118. package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts.map +1 -0
  119. package/NetworkGraph/PureNetworkGraph/utils/forceLayout.d.ts +47 -0
  120. package/NetworkGraph/PureNetworkGraph/utils/forceLayout.d.ts.map +1 -0
  121. package/NetworkGraph/PureNetworkGraph/utils/iconLoader.d.ts +78 -0
  122. package/NetworkGraph/PureNetworkGraph/utils/iconLoader.d.ts.map +1 -0
  123. package/NetworkGraph/PureNetworkGraph/utils/networkGraphShared.d.ts +111 -0
  124. package/NetworkGraph/PureNetworkGraph/utils/networkGraphShared.d.ts.map +1 -0
  125. package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts +122 -0
  126. package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -0
  127. package/NetworkGraph/config.d.ts +4 -0
  128. package/NetworkGraph/config.d.ts.map +1 -0
  129. package/NetworkGraph/index.d.ts +3 -0
  130. package/NetworkGraph/index.d.ts.map +1 -0
  131. package/NetworkGraph.config.js +938 -0
  132. package/NetworkGraph.config.js.map +7 -0
  133. package/NetworkGraph.js +7053 -0
  134. package/NetworkGraph.js.map +7 -0
  135. package/PERFORMANCE.md +23 -0
  136. package/ParallelCoordinates/ParallelCoordinates.d.ts +1 -46
  137. package/ParallelCoordinates/ParallelCoordinates.d.ts.map +1 -1
  138. package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts +12 -58
  139. package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts.map +1 -1
  140. package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts +1 -0
  141. package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts.map +1 -1
  142. package/ParallelCoordinates.js +664 -228
  143. package/ParallelCoordinates.js.map +4 -4
  144. package/Pie/Pie.d.ts.map +1 -1
  145. package/Pie/config.d.ts.map +1 -1
  146. package/Pie/pieUtils.d.ts +4 -0
  147. package/Pie/pieUtils.d.ts.map +1 -1
  148. package/Pie.config.js +16 -0
  149. package/Pie.config.js.map +2 -2
  150. package/Pie.js +610 -118
  151. package/Pie.js.map +3 -3
  152. package/Punchcard.js +579 -92
  153. package/Punchcard.js.map +4 -4
  154. package/Rectangle/config.d.ts.map +1 -1
  155. package/Rectangle.config.js +14 -5
  156. package/Rectangle.config.js.map +4 -4
  157. package/Rectangle.js +611 -130
  158. package/Rectangle.js.map +4 -4
  159. package/Sankey/PureSankey/PureSankey.d.ts +26 -72
  160. package/Sankey/PureSankey/PureSankey.d.ts.map +1 -1
  161. package/Sankey/PureSankey/SankeyLink.d.ts +3 -19
  162. package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -1
  163. package/Sankey/PureSankey/SankeyNode.d.ts +3 -20
  164. package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -1
  165. package/Sankey/PureSankey/SankeyTooltip.d.ts +3 -24
  166. package/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -1
  167. package/Sankey.js +814 -429
  168. package/Sankey.js.map +4 -4
  169. package/Scatter/Scatter.d.ts.map +1 -1
  170. package/Scatter.config.js +168 -148
  171. package/Scatter.config.js.map +4 -4
  172. package/Scatter.js +733 -260
  173. package/Scatter.js.map +4 -4
  174. package/SingleValue/SingleValue.d.ts.map +1 -1
  175. package/SingleValue/config.d.ts.map +1 -1
  176. package/SingleValue.config.js +15 -2
  177. package/SingleValue.config.js.map +2 -2
  178. package/SingleValue.js +733 -229
  179. package/SingleValue.js.map +3 -3
  180. package/SingleValueBasic.js.map +1 -1
  181. package/SingleValueIcon/SingleValueIcon.d.ts.map +1 -1
  182. package/SingleValueIcon/config.d.ts.map +1 -1
  183. package/SingleValueIcon.config.js +14 -6
  184. package/SingleValueIcon.config.js.map +4 -4
  185. package/SingleValueIcon.js +612 -182
  186. package/SingleValueIcon.js.map +4 -4
  187. package/SingleValueRadial/PureSingleValueRadial/GaugeGraph.d.ts.map +1 -1
  188. package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts +0 -8
  189. package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts.map +1 -1
  190. package/SingleValueRadial/SingleValueRadial.d.ts.map +1 -1
  191. package/SingleValueRadial.config.js +0 -1
  192. package/SingleValueRadial.config.js.map +2 -2
  193. package/SingleValueRadial.js +594 -182
  194. package/SingleValueRadial.js.map +4 -4
  195. package/SparkLine.js +46 -8
  196. package/SparkLine.js.map +2 -2
  197. package/Table/PureTable.d.ts +10 -0
  198. package/Table/PureTable.d.ts.map +1 -1
  199. package/Table/Table.d.ts.map +1 -1
  200. package/Table/cells/SparklineCell.d.ts.map +1 -1
  201. package/Table/config.d.ts.map +1 -1
  202. package/Table/hooks.d.ts +6 -0
  203. package/Table/hooks.d.ts.map +1 -1
  204. package/Table.config.js +1 -1
  205. package/Table.config.js.map +2 -2
  206. package/Table.js +836 -253
  207. package/Table.js.map +4 -4
  208. package/Timeline/PureTimeline/PureTimeline.d.ts.map +1 -1
  209. package/Timeline/PureTimeline/src/CursorPlugin.d.ts.map +1 -1
  210. package/Timeline/PureTimeline/src/TimelineLegend.d.ts.map +1 -1
  211. package/Timeline/PureTimeline/src/TimelinePlugin.d.ts.map +1 -1
  212. package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
  213. package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +2 -1
  214. package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
  215. package/Timeline/config.d.ts.map +1 -1
  216. package/Timeline.config.js +31 -12
  217. package/Timeline.config.js.map +4 -4
  218. package/Timeline.js +785 -247
  219. package/Timeline.js.map +4 -4
  220. package/common/Charting.d.ts +5 -0
  221. package/common/Charting.d.ts.map +1 -1
  222. package/common/Charting.js +12 -0
  223. package/common/Charting.js.map +2 -2
  224. package/common/GaugeMajorTicks.js +150 -13
  225. package/common/GaugeMajorTicks.js.map +4 -4
  226. package/common/GaugeValueMarker.js +84 -17
  227. package/common/GaugeValueMarker.js.map +4 -4
  228. package/common/OptionsDoc.js.map +1 -1
  229. package/common/OverviewDoc.d.ts.map +1 -1
  230. package/common/OverviewDoc.js +2 -2
  231. package/common/OverviewDoc.js.map +2 -2
  232. package/common/ThemesDoc.js +0 -1
  233. package/common/ThemesDoc.js.map +2 -2
  234. package/common/TimeSeriesChartWrapper.d.ts +24 -11
  235. package/common/TimeSeriesChartWrapper.d.ts.map +1 -1
  236. package/common/TimeSeriesChartWrapper.js +617 -91
  237. package/common/TimeSeriesChartWrapper.js.map +4 -4
  238. package/common/chartingUtils.d.ts +52 -6
  239. package/common/chartingUtils.d.ts.map +1 -1
  240. package/common/chartingUtils.js +116 -17
  241. package/common/chartingUtils.js.map +3 -3
  242. package/common/editorConfig/AxesChartDataConfig.d.ts +3 -3
  243. package/common/editorConfig/AxesChartDataConfig.d.ts.map +1 -1
  244. package/common/editorConfig/AxesChartDataDisplay.d.ts +4 -0
  245. package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -1
  246. package/common/editorConfig/AxesChartLegend.d.ts.map +1 -1
  247. package/common/gaugeUtils.d.ts +37 -0
  248. package/common/gaugeUtils.d.ts.map +1 -1
  249. package/common/gaugeUtils.js +152 -2
  250. package/common/gaugeUtils.js.map +4 -4
  251. package/common/hocs/mockdata/trellisData.d.ts +119 -0
  252. package/common/hocs/mockdata/trellisData.d.ts.map +1 -1
  253. package/common/hocs/withTrellis.d.ts.map +1 -1
  254. package/common/interfaces/DashboardVizProps.d.ts +0 -3
  255. package/common/interfaces/DashboardVizProps.d.ts.map +1 -1
  256. package/common/interfaces/DataSource.d.ts +1 -1
  257. package/common/interfaces/DataSource.d.ts.map +1 -1
  258. package/common/interfaces/Overview.d.ts +1 -0
  259. package/common/interfaces/Overview.d.ts.map +1 -1
  260. package/common/interfaces/VizConfig.d.ts +2 -1
  261. package/common/interfaces/VizConfig.d.ts.map +1 -1
  262. package/common/shapeUtils.js +5 -20
  263. package/common/shapeUtils.js.map +2 -2
  264. package/common/utils/dataUtils.d.ts.map +1 -1
  265. package/common/utils/dataUtils.js +5 -4
  266. package/common/utils/dataUtils.js.map +2 -2
  267. package/common/utils/mapUtils.js +16 -9
  268. package/common/utils/mapUtils.js.map +2 -2
  269. package/common/utils/singleValueUtils.js +17 -18
  270. package/common/utils/singleValueUtils.js.map +2 -2
  271. package/common/utils/textUtils.d.ts +20 -0
  272. package/common/utils/textUtils.d.ts.map +1 -0
  273. package/common/utils/textUtils.js +76 -0
  274. package/common/utils/textUtils.js.map +7 -0
  275. package/common/utils/trellisUtils.d.ts.map +1 -1
  276. package/common/utils/trellisUtils.js +16 -20
  277. package/common/utils/trellisUtils.js.map +2 -2
  278. package/common/withDashboardViz.d.ts.map +1 -1
  279. package/common/withDashboardViz.js +600 -92
  280. package/common/withDashboardViz.js.map +4 -4
  281. package/package.json +46 -39
  282. package/common/utils/styleUtils.d.ts +0 -2
  283. package/common/utils/styleUtils.d.ts.map +0 -1
  284. package/common/utils/styleUtils.js +0 -30
  285. package/common/utils/styleUtils.js.map +0 -7
package/Line.js CHANGED
@@ -248,6 +248,7 @@ var DefaultVizActionHandler = class {
248
248
  };
249
249
 
250
250
  // src/common/utils/dataUtils.ts
251
+ var getFieldName = (field) => typeof field === "string" ? field : field.name;
251
252
  var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices) => {
252
253
  const dataLength = data.length;
253
254
  const downsampledIndices = [];
@@ -421,9 +422,9 @@ var tryToCoerceAllDisplayedFields = (ds, xField, yFields, fieldTypes, options) =
421
422
  let xColumn = [];
422
423
  const yColumns = [];
423
424
  const canDownsample = !ds.data.fields.some((field, index) => {
424
- var _a, _b;
425
- const fieldName = (_a = field.name) != null ? _a : field;
426
- const fieldType = (_b = fieldTypes[index]) != null ? _b : "unknown";
425
+ var _a;
426
+ const fieldName = getFieldName(field);
427
+ const fieldType = (_a = fieldTypes[index]) != null ? _a : "unknown";
427
428
  const column = ds.data.columns[index];
428
429
  let hasDisplayedColumnThatCantBeDownsampled = false;
429
430
  if (fieldName === xField) {
@@ -627,6 +628,7 @@ var Charting = (props) => {
627
628
  const timezone = (0, react_exports.useContext)(TimezoneContext_default);
628
629
  const selectChartEvent = (0, react_exports.useRef)(null);
629
630
  const trellisEnabled = useTrellisEnabled(props.splitByLayout);
631
+ const isResizing = (0, react_exports.useRef)(false);
630
632
  const drawChartRef = (0, react_exports.useRef)(() => {
631
633
  });
632
634
  const debouncedDrawChart = (0, react_exports.useMemo)(
@@ -725,6 +727,9 @@ var Charting = (props) => {
725
727
  recalculateDownsamplingThreshold();
726
728
  }, [recalculateDownsamplingThreshold]);
727
729
  const handleSelect = useEventCallback_default((chartEvent) => {
730
+ if (isResizing.current) {
731
+ return;
732
+ }
728
733
  selectChartEvent.current = chartEvent;
729
734
  recalculateDownsamplingThreshold();
730
735
  const payload = appendTrellisToPayload(
@@ -859,6 +864,14 @@ var Charting = (props) => {
859
864
  }
860
865
  if (chart.current) {
861
866
  if (Math.round(chart.current.height) !== Math.round(computedHeight) || Math.round(chart.current.width) !== Math.round(computedWidth)) {
867
+ isResizing.current = true;
868
+ queueMicrotask(() => {
869
+ try {
870
+ isResizing.current = false;
871
+ } catch (e) {
872
+ (0, lodash_exports.noop)(e);
873
+ }
874
+ });
862
875
  chart.current.resize(computedWidth, computedHeight);
863
876
  }
864
877
  }
@@ -1011,6 +1024,9 @@ var isTrellisEnabled = ({ options, featureFlags }) => {
1011
1024
  const { splitByLayout = visualization_schemas_exports.LAYOUT_TYPE.Off } = options;
1012
1025
  return isTrellisFeatureFlagOn({ featureFlags }) && splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
1013
1026
  };
1027
+ var isAcceleratedRenderFeatureFlagOn = ({ featureFlags }) => {
1028
+ return Boolean(featureFlags == null ? void 0 : featureFlags.visualizations_enableAcceleratedRender);
1029
+ };
1014
1030
  var AxesChartDataConfig = {
1015
1031
  label: (0, i18n_exports._)("Data configurations"),
1016
1032
  layout: [
@@ -1144,9 +1160,6 @@ var AxesChartDataConfigBubble = {
1144
1160
  }
1145
1161
  ])
1146
1162
  };
1147
- var isAcceleratedRenderFeatureFlagOn = ({ featureFlags }) => {
1148
- return Boolean(featureFlags == null ? void 0 : featureFlags.visualizations_enableAcceleratedRender);
1149
- };
1150
1163
  var AcceleratedRenderEditorLayout = [
1151
1164
  [
1152
1165
  {
@@ -1156,10 +1169,9 @@ var AcceleratedRenderEditorLayout = [
1156
1169
  showEditor: isAcceleratedRenderFeatureFlagOn,
1157
1170
  editorProps: {
1158
1171
  help: (0, i18n_exports._)(
1159
- "Render visualizations faster for large datasets. Some functionalities might not be available in this mode."
1172
+ "Render visualizations faster for large datasets. Split series is not available in this mode."
1160
1173
  ),
1161
1174
  helpFormat: "under"
1162
- // TODO: uncomment and replace link with real link (SCP-75907)
1163
1175
  // helpTextLink: {
1164
1176
  // href: 'https://splunkui.splunk.com/Packages/visualizations/Overview',
1165
1177
  // label: 'Learn More.',
@@ -1314,6 +1326,10 @@ var isTrellisEnabled3 = ({ options, featureFlags }) => {
1314
1326
  const { splitByLayout = visualization_schemas_exports.LAYOUT_TYPE.Off } = options;
1315
1327
  return isTrellisFeatureFlagOn3({ featureFlags }) && splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
1316
1328
  };
1329
+ var isAcceleratedRenderEnabled = ({ options, featureFlags }) => {
1330
+ const { acceleratedRender } = options;
1331
+ return isAcceleratedRenderFeatureFlagOn({ featureFlags }) && acceleratedRender;
1332
+ };
1317
1333
  var AxesChartDataDisplayBase = {
1318
1334
  label: (0, i18n_exports._)("Data display"),
1319
1335
  layout: [
@@ -1374,7 +1390,8 @@ var AxesChartDataDisplayBase = {
1374
1390
  {
1375
1391
  label: (0, i18n_exports._)("Split series"),
1376
1392
  option: "showSplitSeries",
1377
- editor: "editor.toggle"
1393
+ editor: "editor.toggle",
1394
+ isDisabled: isAcceleratedRenderEnabled
1378
1395
  }
1379
1396
  ],
1380
1397
  [
@@ -1382,7 +1399,23 @@ var AxesChartDataDisplayBase = {
1382
1399
  label: (0, i18n_exports._)("Independent y-axis for split series"),
1383
1400
  option: "showIndependentYRanges",
1384
1401
  editor: "editor.checkbox",
1385
- showEditor: ({ options }) => options.showSplitSeries
1402
+ showEditor: ({ options, featureFlags }) => options.showSplitSeries && !isAcceleratedRenderEnabled({ options, featureFlags })
1403
+ }
1404
+ ],
1405
+ [
1406
+ {
1407
+ label: (0, i18n_exports._)("Step position"),
1408
+ option: "stepPosition",
1409
+ editor: "editor.radioBar",
1410
+ editorProps: {
1411
+ values: [
1412
+ { label: (0, i18n_exports._)("Off"), value: "off" },
1413
+ { label: (0, i18n_exports._)("Before"), value: "before" },
1414
+ { label: (0, i18n_exports._)("After"), value: "after" }
1415
+ ]
1416
+ },
1417
+ showEditor: ({ options, featureFlags }) => isAcceleratedRenderEnabled({ options, featureFlags })
1418
+ // step position is only supported when accelerated render is enabled
1386
1419
  }
1387
1420
  ],
1388
1421
  ...TimechartTrellisEditorConfig
@@ -1569,7 +1602,7 @@ var AxesChartLegendWithTrellisAndMode = ({
1569
1602
  { label: (0, i18n_exports._)("Bottom"), value: "bottom" },
1570
1603
  { label: (0, i18n_exports._)("Off"), value: "off" }
1571
1604
  ],
1572
- tooltip: showLegendTooltip && (0, i18n_exports._)('Legend mode must be "Standard" to configure legend display')
1605
+ tooltip: showLegendTooltip ? (0, i18n_exports._)('Legend mode must be "Standard" to configure legend display') : void 0
1573
1606
  },
1574
1607
  isDisabled: showLegendTooltip ? ({ options }) => options.legendMode === "seriesCompare" : void 0,
1575
1608
  overrideDefaultValue: ({ options }) => (options == null ? void 0 : options.splitByLayout) === "trellis" ? "off" : "right"
@@ -2729,7 +2762,7 @@ var Cover = styled_components_default.div`
2729
2762
  bottom: 0;
2730
2763
  `;
2731
2764
  var Blocker = styled_components_default.div.attrs({
2732
- "data-splunk-visualization-version": "28.3.0 - 843e0f60b"
2765
+ "data-splunk-visualization-version": "28.5.0 - b192418b7"
2733
2766
  })`
2734
2767
  position: relative;
2735
2768
  width: 100%;
@@ -2810,7 +2843,7 @@ var withFixedSizeContainer = (Viz) => {
2810
2843
  FixSizeItem,
2811
2844
  {
2812
2845
  "data-test": "fix-size-item",
2813
- "data-splunk-visualization-version": "28.3.0 - 843e0f60b",
2846
+ "data-splunk-visualization-version": "28.5.0 - b192418b7",
2814
2847
  width,
2815
2848
  height,
2816
2849
  backgroundColor
@@ -3086,7 +3119,7 @@ var trellisUtils_default = "default" in defaultImport33 ? defaultImport33.defaul
3086
3119
  var AGGREGATIONS = "aggregations";
3087
3120
  var dataSourcesSplitByAggregationsUnknown = (dataSource) => {
3088
3121
  var _a, _b, _c, _d;
3089
- const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
3122
+ const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
3090
3123
  const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
3091
3124
  let splitDataSources = null;
3092
3125
  let errorCode = null;
@@ -3107,7 +3140,7 @@ var dataSourcesSplitByAggregationsUnknown = (dataSource) => {
3107
3140
  }
3108
3141
  return { splitDataSources, errorCode };
3109
3142
  };
3110
- var toFieldEntries = (fields) => {
3143
+ var toFieldEntries = (fields = []) => {
3111
3144
  return fields.map((field) => {
3112
3145
  if (typeof field === "string") {
3113
3146
  return { name: field };
@@ -3122,7 +3155,7 @@ var dataSourcesSplitByAggregationsTimechartAndChart = (dataSource) => {
3122
3155
  let splitDataSources = null;
3123
3156
  let splitByFields = [];
3124
3157
  let errorCode = null;
3125
- if (typeof fields[0] !== "string") {
3158
+ if (fields.length > 0) {
3126
3159
  splitByFields = (0, trellisUtils_exports.extractDataSourceAggregationKeysChart)(fields);
3127
3160
  }
3128
3161
  if (splitByFields && splitByFields.length > 0) {
@@ -3160,12 +3193,12 @@ var dataSourcesSplitByAggregationsTimechartAndChart = (dataSource) => {
3160
3193
  };
3161
3194
  var dataSourcesSplitByAggregationsStats = (dataSource) => {
3162
3195
  var _a, _b, _c, _d;
3163
- const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
3196
+ const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
3164
3197
  const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
3165
3198
  let splitDataSources = null;
3166
3199
  let splitByFields = [];
3167
3200
  let errorCode = null;
3168
- if (typeof fields[0] !== "string") {
3201
+ if (fields.length > 0) {
3169
3202
  splitByFields = (0, trellisUtils_exports.extractDataSourceAggregationKeysStats)(fields);
3170
3203
  }
3171
3204
  if (splitByFields && splitByFields.length > 0) {
@@ -3189,12 +3222,12 @@ var dataSourcesSplitByAggregationsStats = (dataSource) => {
3189
3222
  };
3190
3223
  var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
3191
3224
  var _a, _b, _c, _d, _e;
3192
- const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
3225
+ const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
3193
3226
  const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
3194
3227
  let splitDataSources = null;
3195
3228
  let splitByFields = [];
3196
3229
  let errorCode = null;
3197
- if (typeof fields[0] !== "string") {
3230
+ if (fields.length > 0) {
3198
3231
  splitByFields = (0, trellisUtils_exports.extractSplitByFieldsChartFields)(fields);
3199
3232
  }
3200
3233
  if (splitByFields && splitByFields.indexOf(splitBy) > -1) {
@@ -3210,16 +3243,14 @@ var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
3210
3243
  splitDataSources[val] = (0, lodash_exports.cloneDeep)(
3211
3244
  (0, lodash_exports.omit)(dataSource, ["primary.data.fields", "primary.data.columns"])
3212
3245
  );
3213
- splitDataSources[val].primary.data.fields = [
3214
- { name: fields[0].name },
3215
- ...dataSourceKeys.map((k) => ({
3216
- name: k
3217
- }))
3218
- ];
3246
+ splitDataSources[val].primary.data.fields = [{ name: fields[0].name }];
3219
3247
  splitDataSources[val].primary.data.columns = [[...columns[0]]];
3220
3248
  dataSourceKeys.forEach((dsKey) => {
3221
3249
  fields.forEach((field, idx) => {
3222
3250
  if (field.data_source === dsKey && (field.splitby_value === val || field.name === val)) {
3251
+ splitDataSources[val].primary.data.fields.push({
3252
+ name: dsKey
3253
+ });
3223
3254
  splitDataSources[val].primary.data.columns.push([...columns[idx]]);
3224
3255
  }
3225
3256
  });
@@ -3232,12 +3263,12 @@ var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
3232
3263
  };
3233
3264
  var dataSourcesSplitByModeChart = (dataSource, splitBy) => {
3234
3265
  var _a, _b, _c, _d;
3235
- const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
3266
+ const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
3236
3267
  const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
3237
3268
  let splitDataSources = null;
3238
3269
  let splitByFields = [];
3239
3270
  let errorCode = null;
3240
- if (typeof fields[0] !== "string") {
3271
+ if (fields.length > 0) {
3241
3272
  splitByFields = (0, trellisUtils_exports.extractSplitByFieldsChartFields)(fields);
3242
3273
  }
3243
3274
  if (splitByFields && splitByFields.indexOf(splitBy) > -1) {
@@ -3325,17 +3356,15 @@ var dataSourcesSplitByModeChart = (dataSource, splitBy) => {
3325
3356
  };
3326
3357
  var dataSourcesSplitByModeStatsorUnknown = (dataSource, splitBy, splitMode) => {
3327
3358
  var _a, _b, _c, _d, _e, _f;
3328
- const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
3359
+ const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
3329
3360
  const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
3330
3361
  let splitDataSources = null;
3331
3362
  let splitByFields = [];
3332
3363
  let errorCode = null;
3333
- if (typeof fields[0] !== "string") {
3364
+ if (fields.length > 0) {
3334
3365
  splitByFields = splitMode !== trellisUtils_exports.UNKNOWN ? (0, trellisUtils_exports.extractSplitByFieldsForStats)(fields) : (0, trellisUtils_exports.extractSplitByFieldsForUnknown)(fields);
3335
3366
  }
3336
- const splitByIndex = fields == null ? void 0 : fields.findIndex(
3337
- (field) => field === splitBy || field.name === splitBy
3338
- );
3367
+ const splitByIndex = fields.findIndex((field) => field.name === splitBy);
3339
3368
  if (splitByFields && splitByFields.indexOf(splitBy) > -1) {
3340
3369
  const splitByColumn = (_f = (_e = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _e.data) == null ? void 0 : _f.columns[splitByIndex];
3341
3370
  splitDataSources = {};
@@ -3549,6 +3578,32 @@ function constructAdditionalTooltipFieldsMap({ fields, columns, additionalToolti
3549
3578
  });
3550
3579
  return map;
3551
3580
  }
3581
+ function extractAdditionalTooltipValues(columns, fields, additionalTooltipFields) {
3582
+ var _a;
3583
+ if (!(additionalTooltipFields == null ? void 0 : additionalTooltipFields.length) || !(columns == null ? void 0 : columns.length) || !(fields == null ? void 0 : fields.length)) {
3584
+ return [];
3585
+ }
3586
+ const fieldIndexMap = fields.reduce((acc, field, index) => {
3587
+ acc[field.name] = index;
3588
+ return acc;
3589
+ }, {});
3590
+ const numRows = ((_a = columns[0]) == null ? void 0 : _a.length) || 0;
3591
+ const additionalTooltipValuesArray = [];
3592
+ for (let i = 0; i < numRows; i += 1) {
3593
+ const tooltipObject = {};
3594
+ additionalTooltipFields.forEach((fieldName) => {
3595
+ var _a2, _b;
3596
+ if (fieldName in fieldIndexMap) {
3597
+ const columnIndex = fieldIndexMap[fieldName];
3598
+ tooltipObject[fieldName] = (_b = (_a2 = columns[columnIndex]) == null ? void 0 : _a2[i]) != null ? _b : null;
3599
+ } else {
3600
+ tooltipObject[fieldName] = null;
3601
+ }
3602
+ });
3603
+ additionalTooltipValuesArray.push(tooltipObject);
3604
+ }
3605
+ return additionalTooltipValuesArray;
3606
+ }
3552
3607
  var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
3553
3608
  const rangeSelectEventHandler = eventHandlers.find(
3554
3609
  (eventHandler) => {
@@ -3579,17 +3634,34 @@ var filterChartDataFromInternalFields = (chartData) => {
3579
3634
  var convert2DArrayToNumbers = (arr) => {
3580
3635
  return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
3581
3636
  };
3582
- var SideLegendWidth = 75;
3583
- var commonLegendProps = { center: true, fontSize: 12, largerTiles: true, hideSeriesValue: true };
3637
+ var parseAxisValue = (val) => {
3638
+ if (val === void 0 || val === null || val === "auto" || val === "") {
3639
+ return void 0;
3640
+ }
3641
+ const num = typeof val === "number" ? val : Number.parseFloat(val);
3642
+ return Number.isNaN(num) ? void 0 : num;
3643
+ };
3644
+ var parseXAxisLineVisibility = (visibility) => {
3645
+ if (visibility === "hide") return false;
3646
+ if (visibility === "show") return true;
3647
+ return void 0;
3648
+ };
3584
3649
  var getLegend = (props) => {
3585
3650
  const legendPlacement = props == null ? void 0 : props.legendDisplay;
3651
+ const { isSeriesCompare, legendTruncation } = props;
3652
+ const commonLegendProps = {
3653
+ center: true,
3654
+ fontSize: 12,
3655
+ largerTiles: true,
3656
+ hideSeriesValue: !isSeriesCompare,
3657
+ // Show values if in seriesCompare mode
3658
+ legendTruncation
3659
+ };
3586
3660
  switch (legendPlacement) {
3587
3661
  case "off":
3588
3662
  return false;
3589
3663
  case "left":
3590
- return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
3591
- width: SideLegendWidth
3592
- }, commonLegendProps));
3664
+ return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
3593
3665
  case "bottom":
3594
3666
  return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
3595
3667
  wrap: true
@@ -3599,9 +3671,7 @@ var getLegend = (props) => {
3599
3671
  wrap: true
3600
3672
  }, commonLegendProps));
3601
3673
  default:
3602
- return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
3603
- width: SideLegendWidth
3604
- }, commonLegendProps));
3674
+ return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
3605
3675
  }
3606
3676
  };
3607
3677
  var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
@@ -3636,22 +3706,25 @@ var ellipsisAxisTitle = (axisTitle, containerSpacing, fontSize = 12) => {
3636
3706
  const end = axisTitle.slice(-halfChars);
3637
3707
  return `${start}...${end}`;
3638
3708
  };
3639
- var getFieldName = (field) => {
3709
+ var getFieldName2 = (field) => {
3640
3710
  const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
3641
3711
  return fieldName;
3642
3712
  };
3643
3713
  var getFieldNames = (fields) => {
3644
- return fields.map((field) => getFieldName(field));
3714
+ return fields.map((field) => getFieldName2(field));
3645
3715
  };
3646
- var getXScaleConfig = (label, xAxisLabelVisibility) => {
3716
+ var getXScaleConfig = (label, xAxisLabelVisibility, xAxisLabelRotation) => {
3647
3717
  const xConfig = { x: {} };
3648
3718
  xConfig.x.label = label;
3649
3719
  if (xAxisLabelVisibility === "hide") {
3650
3720
  xConfig.x.hideLabels = true;
3651
3721
  }
3722
+ if (xAxisLabelRotation !== void 0) {
3723
+ xConfig.x.labelRotation = xAxisLabelRotation;
3724
+ }
3652
3725
  return xConfig;
3653
3726
  };
3654
- var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility) => {
3727
+ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax) => {
3655
3728
  const scaleType = yAxisScale != null ? yAxisScale : "linear";
3656
3729
  const yConfig = { y: {} };
3657
3730
  yConfig.y.label = label;
@@ -3659,34 +3732,46 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
3659
3732
  if (yAxisAbbreviation !== "none") {
3660
3733
  yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
3661
3734
  }
3662
- if (yAxisAbbreviation === "none") {
3663
- yConfig.y.width = 55;
3664
- } else {
3735
+ if (yAxisAbbreviation !== "none") {
3665
3736
  yConfig.y.width = label && label.length > 0 ? 30 : 10;
3666
3737
  }
3667
3738
  if (yAxisLabelVisibility === "hide") {
3668
3739
  yConfig.y.hideLabels = true;
3669
3740
  }
3741
+ if (yAxisMin !== void 0 || yAxisMax !== void 0) {
3742
+ yConfig.y.range = (u, dataMin, dataMax) => {
3743
+ const min = yAxisMin != null ? yAxisMin : dataMin;
3744
+ const max = yAxisMax != null ? yAxisMax : dataMax;
3745
+ return [min, max];
3746
+ };
3747
+ }
3670
3748
  return yConfig;
3671
3749
  };
3672
- var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility) => {
3750
+ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility, y2AxisMin, y2AxisMax) => {
3673
3751
  const y2Config = { y2: {} };
3674
3752
  const scaleType = axisScale != null ? axisScale : "linear";
3675
3753
  y2Config.y2.label = label;
3676
3754
  y2Config.y2.side = "right";
3677
- y2Config.y2.showGrid = false;
3678
3755
  y2Config.y2.type = scaleType;
3679
3756
  if (axisAbbreviation !== "none") {
3680
3757
  y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
3758
+ y2Config.y2.width = label && label.length > 0 ? 50 : 10;
3681
3759
  } else if (roundAxisLabelsToInteger) {
3682
3760
  y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
3683
3761
  }
3684
3762
  if (y2AxisLabelVisibility === "hide") {
3685
3763
  y2Config.y2.hideLabels = true;
3686
3764
  }
3765
+ if (y2AxisMin !== void 0 || y2AxisMax !== void 0) {
3766
+ y2Config.y2.range = (u, dataMin, dataMax) => {
3767
+ const min = y2AxisMin != null ? y2AxisMin : dataMin;
3768
+ const max = y2AxisMax != null ? y2AxisMax : dataMax;
3769
+ return [min, max];
3770
+ };
3771
+ }
3687
3772
  return y2Config;
3688
3773
  };
3689
- var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay) => {
3774
+ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
3690
3775
  const seriesConfig = {};
3691
3776
  let spanGaps;
3692
3777
  let replaceNullsWithZero;
@@ -3713,6 +3798,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
3713
3798
  );
3714
3799
  if (shouldAssignToY2) {
3715
3800
  seriesConfig[field].overrides.scale = "y2";
3801
+ } else {
3802
+ seriesConfig[field].overrides.scale = "y";
3716
3803
  }
3717
3804
  }
3718
3805
  if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
@@ -3721,12 +3808,50 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
3721
3808
  if (markerDisplay !== void 0) {
3722
3809
  seriesConfig[field].markerDisplay = markerDisplay;
3723
3810
  }
3811
+ const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
3812
+ if (fieldDashStyle) {
3813
+ seriesConfig[field].lineDashStyle = fieldDashStyle;
3814
+ }
3815
+ const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
3816
+ const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
3817
+ if (fieldStepPosition && fieldStepPosition !== "off") {
3818
+ seriesConfig[field].stepPosition = fieldStepPosition;
3819
+ }
3724
3820
  if (replaceNullsWithZero !== void 0) {
3725
3821
  seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
3726
3822
  }
3727
3823
  });
3728
3824
  return seriesConfig;
3729
3825
  };
3826
+ var findRangeIndices = (xData, startValue, endValue) => {
3827
+ let startXIndex = -1;
3828
+ let endXIndex = -1;
3829
+ const xDataEpoch = xData.map((val) => {
3830
+ if (typeof val === "string") {
3831
+ return new Date(val).getTime() / 1e3;
3832
+ }
3833
+ return val;
3834
+ });
3835
+ for (let i = 0; i < xDataEpoch.length; i += 1) {
3836
+ if (xDataEpoch[i] >= startValue) {
3837
+ startXIndex = i;
3838
+ break;
3839
+ }
3840
+ }
3841
+ if (startXIndex === -1 && xDataEpoch.length > 0) {
3842
+ startXIndex = xDataEpoch.length - 1;
3843
+ }
3844
+ for (let i = xDataEpoch.length - 1; i >= 0; i -= 1) {
3845
+ if (xDataEpoch[i] <= endValue) {
3846
+ endXIndex = i;
3847
+ break;
3848
+ }
3849
+ }
3850
+ if (endXIndex === -1 && xDataEpoch.length > 0) {
3851
+ endXIndex = 0;
3852
+ }
3853
+ return { startXIndex, endXIndex };
3854
+ };
3730
3855
 
3731
3856
  // src/common/TimeSeriesChartWrapper.tsx
3732
3857
  var TimeSeriesChartContainer = styled_components_default.div`
@@ -3737,38 +3862,123 @@ var TimeSeriesChartContainer = styled_components_default.div`
3737
3862
  position: absolute !important; // This is needed for canvas element export pdf/png to work correctly
3738
3863
  }
3739
3864
  `;
3740
- var handleClick = (chartEvent, onClick) => {
3865
+ var appendTrellisToPayload2 = (payload, trellisKey, trellisSplitBy) => {
3866
+ const result = __spreadValues({}, payload);
3867
+ if (trellisSplitBy) {
3868
+ result["trellis.name"] = trellisSplitBy;
3869
+ }
3870
+ if (trellisKey) {
3871
+ result["trellis.value"] = trellisKey;
3872
+ }
3873
+ return result;
3874
+ };
3875
+ var hasMouseoverPayloadChanged = (currentPayload, previousPayload) => {
3876
+ if (!previousPayload) {
3877
+ return true;
3878
+ }
3879
+ if (currentPayload.index !== previousPayload.index) {
3880
+ return true;
3881
+ }
3882
+ if (currentPayload.seriesIndex !== previousPayload.seriesIndex) {
3883
+ return true;
3884
+ }
3885
+ if (currentPayload["trellis.name"] !== previousPayload["trellis.name"]) {
3886
+ return true;
3887
+ }
3888
+ if (currentPayload["trellis.value"] !== previousPayload["trellis.value"]) {
3889
+ return true;
3890
+ }
3891
+ return false;
3892
+ };
3893
+ var handleClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
3741
3894
  const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(chartEvent, "value", "seriesKey")), {
3742
3895
  name: chartEvent.seriesKey
3743
3896
  });
3744
3897
  delete payload.seriesKey;
3745
3898
  if (chartEvent.rowContext) {
3746
- Object.keys(chartEvent.rowContext).forEach((fieldName) => {
3747
- payload[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
3748
- });
3899
+ Object.assign(
3900
+ payload,
3901
+ Object.keys(chartEvent.rowContext).reduce((acc, fieldName) => {
3902
+ acc[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
3903
+ return acc;
3904
+ }, {})
3905
+ );
3749
3906
  }
3907
+ const updatedPayload = appendTrellisToPayload2(payload, trellisKey, trellisSplitBy);
3750
3908
  if (onClick) {
3751
3909
  onClick({
3752
3910
  type: "point.click",
3753
3911
  originalEvent: chartEvent,
3754
- payload
3912
+ payload: updatedPayload
3755
3913
  });
3756
3914
  }
3757
3915
  };
3758
- var handleLegendClick = (chartEvent, onClick) => {
3916
+ var handleLegendClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
3759
3917
  const payload = {
3760
3918
  name: chartEvent
3761
3919
  };
3920
+ const updatedPayload = appendTrellisToPayload2(payload, trellisKey, trellisSplitBy);
3762
3921
  if (onClick) {
3763
3922
  onClick({
3764
3923
  type: "legend.click",
3765
3924
  originalEvent: chartEvent,
3766
- payload
3925
+ payload: updatedPayload
3926
+ });
3927
+ }
3928
+ };
3929
+ var handleRangeSelection = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
3930
+ var _a;
3931
+ if (!rangeEvent) {
3932
+ return;
3933
+ }
3934
+ const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
3935
+ const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
3936
+ const payload = {
3937
+ startXIndex,
3938
+ startXValue: rangeEvent.start,
3939
+ endXIndex,
3940
+ endXValue: rangeEvent.end
3941
+ };
3942
+ const updatedPayload = appendTrellisToPayload2(payload, trellisKey, trellisSplitBy);
3943
+ if (onSelect) {
3944
+ onSelect({
3945
+ type: "range.selectBeforeZoom",
3946
+ originalEvent: rangeEvent,
3947
+ payload: updatedPayload
3948
+ });
3949
+ }
3950
+ };
3951
+ var handleRangeZoom = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
3952
+ var _a;
3953
+ const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
3954
+ const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
3955
+ const payload = {
3956
+ startXIndex,
3957
+ startXValue: rangeEvent.start,
3958
+ endXIndex,
3959
+ endXValue: rangeEvent.end
3960
+ };
3961
+ const updatedPayload = appendTrellisToPayload2(payload, trellisKey, trellisSplitBy);
3962
+ if (onSelect) {
3963
+ onSelect({
3964
+ type: "range.select",
3965
+ originalEvent: rangeEvent,
3966
+ payload: updatedPayload
3767
3967
  });
3768
3968
  }
3769
3969
  };
3970
+ var parseArrayOption = (value) => {
3971
+ if (Array.isArray(value)) {
3972
+ return value;
3973
+ }
3974
+ if (value) {
3975
+ return JSON.parse(value);
3976
+ }
3977
+ return void 0;
3978
+ };
3770
3979
  var TimeSeriesChartWrapper = (props) => {
3771
- const {
3980
+ var _b, _c, _d;
3981
+ const _a = props, {
3772
3982
  width,
3773
3983
  height,
3774
3984
  chartData,
@@ -3781,12 +3991,57 @@ var TimeSeriesChartWrapper = (props) => {
3781
3991
  markerDisplay,
3782
3992
  onClick,
3783
3993
  onPointMouseOver,
3784
- onPointMouseOut
3785
- } = props;
3786
- const {
3994
+ onPointMouseOut,
3995
+ onSelect,
3996
+ splitByLayout,
3997
+ trellisKey,
3998
+ trellisSplitBy,
3787
3999
  backgroundColor,
4000
+ defaultFontColor,
4001
+ additionalTooltipValues,
4002
+ xAxisLineVisibility: xAxisLineVisibility,
4003
+ yAxisLineVisibility,
4004
+ y2AxisLineVisibility,
4005
+ showYAxisWithZero: showYAxisWithZeroFromProps,
4006
+ showY2AxisWithZero: showY2AxisWithZeroFromProps
4007
+ } = _a, otherOptions = __objRest(_a, [
4008
+ "width",
4009
+ "height",
4010
+ "chartData",
4011
+ "options",
4012
+ "userLocale",
4013
+ "annotationX",
4014
+ "annotationLabel",
4015
+ "annotationColor",
4016
+ "legendDisplay",
4017
+ "markerDisplay",
4018
+ "onClick",
4019
+ "onPointMouseOver",
4020
+ "onPointMouseOut",
4021
+ "onSelect",
4022
+ "splitByLayout",
4023
+ "trellisKey",
4024
+ "trellisSplitBy",
4025
+ "backgroundColor",
4026
+ "defaultFontColor",
4027
+ "additionalTooltipValues",
4028
+ // Extract axis line visibility options from props
4029
+ "xAxisLineVisibility",
4030
+ "yAxisLineVisibility",
4031
+ "y2AxisLineVisibility",
4032
+ // Extract showYAxisWithZero directly from props for accelerated render mode
4033
+ "showYAxisWithZero",
4034
+ "showY2AxisWithZero"
4035
+ ]);
4036
+ const { eventHandlers, xField: xFieldFromProps } = otherOptions;
4037
+ const trellisEnabled = useTrellisEnabled(splitByLayout);
4038
+ const {
4039
+ backgroundColor: bgColorFromOptions,
3788
4040
  seriesColors: seriesColorsStr,
3789
4041
  fieldColors,
4042
+ legendLabels: legendLabelsStr,
4043
+ legendMode,
4044
+ legendTruncation,
3790
4045
  "axisTitleX.text": xAxisTitleText,
3791
4046
  "axisTitleY.text": yAxisTitleText,
3792
4047
  "axisTitleY2.text": y2AxisTitleText,
@@ -3794,8 +4049,12 @@ var TimeSeriesChartWrapper = (props) => {
3794
4049
  "axisTitleY.visibility": yAxisTitleVisibility,
3795
4050
  "axisTitleY2.visibility": y2AxisTitleVisibility,
3796
4051
  "axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
4052
+ "axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
4053
+ "axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
3797
4054
  "axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
4055
+ "axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
3798
4056
  "axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
4057
+ "axisLabelsY2.majorUnit": y2AxisMajorUnitFromSimpleXML,
3799
4058
  "axisY.abbreviation": yAxisAbbreviation,
3800
4059
  "axisY.scale": yAxisScale,
3801
4060
  "axisY2.abbreviation": y2AxisAbbreviation,
@@ -3805,10 +4064,73 @@ var TimeSeriesChartWrapper = (props) => {
3805
4064
  "axisLabelsY2.integerUnits": y2IntegerUnits,
3806
4065
  "chart.overlayFields": overlayFieldsStr,
3807
4066
  "chart.nullValueMode": nullValueMode,
3808
- lineWidth
4067
+ "chart.showDataLabels": showDataLabels,
4068
+ lineWidth,
4069
+ lineDashStyle,
4070
+ fieldDashStyles: lineDashStylesByFieldStr,
4071
+ stepPosition,
4072
+ fieldStepPositions: stepPositionsByFieldStr,
4073
+ yAxisMin: yAxisMinRaw,
4074
+ yAxisMax: yAxisMaxRaw,
4075
+ y2AxisMin: y2AxisMinRaw,
4076
+ y2AxisMax: y2AxisMaxRaw,
4077
+ showXMajorGridLines,
4078
+ showYMajorGridLines,
4079
+ showY2MajorGridLines,
4080
+ showYMinorGridLines,
4081
+ showY2MinorGridLines,
4082
+ showLineSmoothing,
4083
+ xAxisMajorTickVisibility,
4084
+ xAxisMajorTickSize,
4085
+ yAxisMajorTickVisibility,
4086
+ y2AxisMajorTickVisibility,
4087
+ yAxisMajorTickSize,
4088
+ y2AxisMajorTickSize,
4089
+ yAxisMajorTickInterval,
4090
+ y2AxisMajorTickInterval,
4091
+ yAxisMinorTickVisibility,
4092
+ y2AxisMinorTickVisibility,
4093
+ yAxisMinorTickSize,
4094
+ y2AxisMinorTickSize,
4095
+ showYAxisWithZero: showYAxisWithZeroFromOptions,
4096
+ showY2AxisWithZero: showY2AxisWithZeroFromOptions
3809
4097
  } = options;
4098
+ const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
4099
+ const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
4100
+ const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
4101
+ const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
4102
+ const showYMajorTicks = yAxisMajorTickVisibility === "show";
4103
+ const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
4104
+ const showYMinorTicks = yAxisMinorTickVisibility === "show";
4105
+ const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
4106
+ const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
4107
+ const showYAxisLine = yAxisLineVisibility === "show";
4108
+ const showY2AxisLine = y2AxisLineVisibility === "show";
4109
+ const yAxisMin = parseAxisValue(yAxisMinRaw);
4110
+ const yAxisMax = parseAxisValue(yAxisMaxRaw);
4111
+ const y2AxisMin = parseAxisValue(y2AxisMinRaw);
4112
+ const y2AxisMax = parseAxisValue(y2AxisMaxRaw);
4113
+ const parseTickInterval = (simpleXMLValue, canvasValue) => {
4114
+ if (simpleXMLValue) return Number(simpleXMLValue);
4115
+ if (canvasValue) return Number(canvasValue);
4116
+ return void 0;
4117
+ };
4118
+ const yAxisMajorTickIntervalNum = parseTickInterval(yAxisMajorUnitFromSimpleXML, yAxisMajorTickInterval);
4119
+ const y2AxisMajorTickIntervalNum = parseTickInterval(
4120
+ y2AxisMajorUnitFromSimpleXML,
4121
+ y2AxisMajorTickInterval
4122
+ );
4123
+ const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
4124
+ const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
4125
+ const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
4126
+ const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
4127
+ const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
3810
4128
  const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
3811
4129
  const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
4130
+ const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
4131
+ const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
4132
+ const legendLabels = parseArrayOption(legendLabelsStr);
4133
+ const bgColor = backgroundColor || bgColorFromOptions;
3812
4134
  const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
3813
4135
  const [containerHeight, setContainerHeight] = react_exports.useState(Number(props.height));
3814
4136
  const cachedHandleResize = react_exports.useCallback((w, h) => {
@@ -3819,31 +4141,64 @@ var TimeSeriesChartWrapper = (props) => {
3819
4141
  fields: chartData.fields,
3820
4142
  columns: chartData.seriesList
3821
4143
  });
3822
- const xField = getFieldName(filteredChartData.fields[0]);
4144
+ const xField = getFieldName2(filteredChartData.fields[0]);
3823
4145
  const yFields = getFieldNames(
3824
4146
  filteredChartData.fields.length > 1 ? filteredChartData.fields.slice(1) : []
3825
4147
  );
3826
- const y2Fields = y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [];
3827
- const overlayFields = overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [];
4148
+ const y2Fields = (0, react_exports.useMemo)(
4149
+ () => y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [],
4150
+ [y2FieldsStr]
4151
+ );
4152
+ const overlayFields = (0, react_exports.useMemo)(
4153
+ () => overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [],
4154
+ [overlayFieldsStr]
4155
+ );
3828
4156
  let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
3829
4157
  xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
3830
- let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFields, yAxisTitleVisibility);
4158
+ const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
4159
+ let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility);
3831
4160
  yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
3832
4161
  const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
3833
4162
  let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
3834
4163
  y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
3835
- const xScaleConfig = getXScaleConfig(xAxisTitle, xAxisLabelVisibility);
3836
- const yScaleConfig = getYScaleConfig(yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility);
3837
- let y2ScaleConfig = {};
3838
- if (y2Enabled) {
3839
- y2ScaleConfig = getY2ScaleConfig(
3840
- y2AxisTitle,
3841
- y2AxisAbbreviation,
3842
- y2AxisScale,
3843
- y2IntegerUnits,
3844
- y2AxisLabelVisibility
3845
- );
3846
- }
4164
+ const xScaleConfig = (0, react_exports.useMemo)(
4165
+ () => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
4166
+ [xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
4167
+ );
4168
+ const yScaleConfig = (0, react_exports.useMemo)(
4169
+ () => getYScaleConfig(
4170
+ yAxisTitle,
4171
+ yAxisAbbreviation,
4172
+ yAxisScale,
4173
+ yAxisLabelVisibility,
4174
+ yAxisMin,
4175
+ yAxisMax
4176
+ ),
4177
+ [yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax]
4178
+ );
4179
+ const y2ScaleConfig = (0, react_exports.useMemo)(() => {
4180
+ if (y2Enabled) {
4181
+ return getY2ScaleConfig(
4182
+ y2AxisTitle,
4183
+ y2AxisAbbreviation,
4184
+ y2AxisScale,
4185
+ y2IntegerUnits,
4186
+ y2AxisLabelVisibility,
4187
+ y2AxisMin,
4188
+ y2AxisMax
4189
+ );
4190
+ }
4191
+ return {};
4192
+ }, [
4193
+ y2Enabled,
4194
+ y2AxisTitle,
4195
+ y2AxisAbbreviation,
4196
+ y2AxisScale,
4197
+ y2IntegerUnits,
4198
+ y2AxisLabelVisibility,
4199
+ y2AxisMin,
4200
+ y2AxisMax
4201
+ ]);
3847
4202
  const uplotContainerElement = (0, react_exports.useRef)(null);
3848
4203
  const seriesDataFormatted = [
3849
4204
  filteredChartData.columns[0],
@@ -3859,9 +4214,25 @@ var TimeSeriesChartWrapper = (props) => {
3859
4214
  overlayFields,
3860
4215
  y2Enabled,
3861
4216
  nullValueMode,
3862
- markerDisplay
4217
+ markerDisplay,
4218
+ lineDashStyle,
4219
+ lineDashStylesByField,
4220
+ stepPosition,
4221
+ stepPositionsByField
3863
4222
  ),
3864
- [yFields, y2Fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay]
4223
+ [
4224
+ yFields,
4225
+ y2Fields,
4226
+ lineWidth,
4227
+ overlayFields,
4228
+ y2Enabled,
4229
+ nullValueMode,
4230
+ markerDisplay,
4231
+ lineDashStyle,
4232
+ lineDashStylesByField,
4233
+ stepPosition,
4234
+ stepPositionsByField
4235
+ ]
3865
4236
  );
3866
4237
  const chartingEventAnnotations = (0, react_exports.useMemo)(
3867
4238
  () => getAnnotationsForCanvas({
@@ -3875,25 +4246,59 @@ var TimeSeriesChartWrapper = (props) => {
3875
4246
  () => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
3876
4247
  [xScaleConfig, yScaleConfig, y2ScaleConfig]
3877
4248
  );
3878
- const legend = (0, react_exports.useMemo)(() => getLegend({ legendDisplay }), [legendDisplay]);
4249
+ const isSeriesCompare = legendMode === "seriesCompare";
4250
+ const legend = (0, react_exports.useMemo)(
4251
+ () => getLegend({
4252
+ legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
4253
+ isSeriesCompare,
4254
+ legendTruncation
4255
+ }),
4256
+ [legendDisplay, isSeriesCompare, legendTruncation]
4257
+ );
3879
4258
  const handleChartClick = react_exports.useCallback(
3880
4259
  (event) => {
3881
4260
  if (onClick) {
3882
- handleClick(event, onClick);
4261
+ handleClick(event, onClick, trellisKey, trellisSplitBy);
3883
4262
  }
3884
4263
  },
3885
- [onClick]
4264
+ [onClick, trellisKey, trellisSplitBy]
3886
4265
  );
3887
4266
  const handleChartLegendClick = react_exports.useCallback(
3888
4267
  (event) => {
3889
4268
  if (onClick) {
3890
- handleLegendClick(event, onClick);
4269
+ handleLegendClick(event, onClick, trellisKey, trellisSplitBy);
4270
+ }
4271
+ },
4272
+ [onClick, trellisKey, trellisSplitBy]
4273
+ );
4274
+ const handleChartRangeSelection = react_exports.useCallback(
4275
+ (range2) => {
4276
+ if (onSelect) {
4277
+ handleRangeSelection(range2, onSelect, chartData, trellisKey, trellisSplitBy);
4278
+ }
4279
+ },
4280
+ [onSelect, chartData, trellisKey, trellisSplitBy]
4281
+ );
4282
+ const handleChartRangeZoom = react_exports.useCallback(
4283
+ (range2) => {
4284
+ if (onSelect) {
4285
+ handleRangeZoom(range2, onSelect, chartData, trellisKey, trellisSplitBy);
3891
4286
  }
3892
4287
  },
3893
- [onClick]
4288
+ [onSelect, chartData, trellisKey, trellisSplitBy]
4289
+ );
4290
+ const xFieldToUse = xFieldFromProps || xField;
4291
+ const enableSearchZoom = react_exports.useMemo(
4292
+ () => shouldEnableSearchZoom(eventHandlers, xFieldToUse),
4293
+ [eventHandlers, xFieldToUse]
3894
4294
  );
3895
4295
  const lastPayloadRef = react_exports.useRef(null);
3896
4296
  const lastOriginalEventRef = react_exports.useRef(null);
4297
+ const previousMouseoverPayloadRef = react_exports.useRef(null);
4298
+ const additionalTooltipValuesRef = react_exports.useRef(additionalTooltipValues);
4299
+ react_exports.useEffect(() => {
4300
+ additionalTooltipValuesRef.current = additionalTooltipValues;
4301
+ }, [additionalTooltipValues]);
3897
4302
  const handleChartCrosshairChange = react_exports.useCallback(
3898
4303
  (event) => {
3899
4304
  if (onPointMouseOver || onPointMouseOut) {
@@ -3905,6 +4310,7 @@ var TimeSeriesChartWrapper = (props) => {
3905
4310
  payload: lastPayloadRef.current
3906
4311
  });
3907
4312
  }
4313
+ previousMouseoverPayloadRef.current = null;
3908
4314
  return;
3909
4315
  }
3910
4316
  const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
@@ -3912,25 +4318,36 @@ var TimeSeriesChartWrapper = (props) => {
3912
4318
  });
3913
4319
  delete payload.seriesKey;
3914
4320
  if (event.rowContext) {
3915
- Object.keys(event.rowContext).forEach((fieldName) => {
3916
- payload[`row.${fieldName}.value`] = event.rowContext[fieldName];
3917
- });
4321
+ Object.assign(
4322
+ payload,
4323
+ Object.keys(event.rowContext).reduce((acc, fieldName) => {
4324
+ acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
4325
+ return acc;
4326
+ }, {})
4327
+ );
4328
+ }
4329
+ const updatedPayload = appendTrellisToPayload2(payload, trellisKey, trellisSplitBy);
4330
+ if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
4331
+ return;
3918
4332
  }
3919
- lastPayloadRef.current = payload;
4333
+ lastPayloadRef.current = updatedPayload;
3920
4334
  lastOriginalEventRef.current = event;
4335
+ previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
3921
4336
  if (onPointMouseOver) {
3922
4337
  onPointMouseOver({
3923
4338
  type: "point.mouseover",
3924
4339
  originalEvent: event,
3925
- payload
4340
+ payload: updatedPayload
3926
4341
  });
3927
4342
  }
3928
4343
  }
3929
4344
  },
3930
- [onPointMouseOver, onPointMouseOut]
4345
+ [onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
3931
4346
  );
3932
- const memoizedChart = (0, react_exports.useMemo)(
3933
- () => /* @__PURE__ */ react_exports.createElement(
4347
+ const dataKey = `${(_b = chartData.columns[0]) == null ? void 0 : _b[0]}-${(_c = chartData.columns[0]) == null ? void 0 : _c[chartData.columns[0].length - 1]}-${(_d = chartData.columns[0]) == null ? void 0 : _d.length}`;
4348
+ const memoizedChart = (0, react_exports.useMemo)(() => {
4349
+ const computedOnRangeZoom = onSelect ? handleChartRangeZoom : void 0;
4350
+ return /* @__PURE__ */ react_exports.createElement(visualization_canvas_exports.RangeSelectionProvider, { key: dataKey }, /* @__PURE__ */ react_exports.createElement(
3934
4351
  visualization_canvas_exports.TimeSeriesChart,
3935
4352
  {
3936
4353
  data: chartData,
@@ -3940,49 +4357,121 @@ var TimeSeriesChartWrapper = (props) => {
3940
4357
  seriesColorsByField,
3941
4358
  seriesConfig: seriesOverrides,
3942
4359
  legend,
4360
+ legendLabels,
4361
+ legendTruncation,
4362
+ isSeriesCompare: legendMode === "seriesCompare",
4363
+ maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
3943
4364
  scaleConfig,
3944
4365
  timestampFormat: "expanded",
3945
4366
  onCrosshairClick: onClick ? handleChartClick : void 0,
3946
4367
  onCrosshairChange: onPointMouseOver || onPointMouseOut ? handleChartCrosshairChange : void 0,
3947
4368
  onSeriesClick: onClick ? handleChartLegendClick : void 0,
4369
+ onRangeSelection: handleChartRangeSelection,
4370
+ onRangeZoom: computedOnRangeZoom,
4371
+ serverSideZoom: enableSearchZoom,
3948
4372
  userLocale,
3949
4373
  events: chartingEventAnnotations,
3950
- eventsConfig: { renderer: triangleEventAnnotationRenderer }
4374
+ eventsConfig: { renderer: triangleEventAnnotationRenderer },
4375
+ additionalTooltipValuesRef,
4376
+ showXMajorGridLines,
4377
+ showYMajorGridLines,
4378
+ showY2MajorGridLines,
4379
+ showYMinorGridLines,
4380
+ showY2MinorGridLines,
4381
+ showLineSmoothing,
4382
+ dataValuesDisplay,
4383
+ showXMajorTicks,
4384
+ xAxisMajorTickSize: xAxisMajorTickSizeNum,
4385
+ showYMajorTicks,
4386
+ showY2MajorTicks,
4387
+ yAxisMajorTickSize: yAxisMajorTickSizeNum,
4388
+ y2AxisMajorTickSize: y2AxisMajorTickSizeNum,
4389
+ yAxisMajorTickInterval: yAxisMajorTickIntervalNum,
4390
+ y2AxisMajorTickInterval: y2AxisMajorTickIntervalNum,
4391
+ showYMinorTicks,
4392
+ showY2MinorTicks,
4393
+ yAxisMinorTickSize: yAxisMinorTickSizeNum,
4394
+ y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
4395
+ showYAxisWithZero,
4396
+ showY2AxisWithZero,
4397
+ showXAxisLine,
4398
+ showYAxisLine,
4399
+ showY2AxisLine,
4400
+ xAxisMaxLabelParts
3951
4401
  }
3952
- ),
3953
- [
3954
- chartData,
3955
- containerWidth,
3956
- containerHeight,
3957
- seriesColors,
3958
- seriesColorsByField,
3959
- seriesOverrides,
3960
- legend,
3961
- scaleConfig,
3962
- userLocale,
3963
- chartingEventAnnotations,
3964
- onClick,
3965
- handleChartClick,
3966
- onPointMouseOver,
3967
- onPointMouseOut,
3968
- handleChartCrosshairChange,
3969
- handleChartLegendClick
3970
- ]
3971
- );
4402
+ ));
4403
+ }, [
4404
+ onSelect,
4405
+ handleChartRangeZoom,
4406
+ dataKey,
4407
+ chartData,
4408
+ containerWidth,
4409
+ containerHeight,
4410
+ seriesColors,
4411
+ seriesColorsByField,
4412
+ seriesOverrides,
4413
+ legend,
4414
+ legendLabels,
4415
+ legendTruncation,
4416
+ scaleConfig,
4417
+ onClick,
4418
+ handleChartClick,
4419
+ onPointMouseOver,
4420
+ onPointMouseOut,
4421
+ handleChartCrosshairChange,
4422
+ handleChartLegendClick,
4423
+ handleChartRangeSelection,
4424
+ enableSearchZoom,
4425
+ userLocale,
4426
+ chartingEventAnnotations,
4427
+ showXMajorGridLines,
4428
+ showYMajorGridLines,
4429
+ showY2MajorGridLines,
4430
+ showYMinorGridLines,
4431
+ showY2MinorGridLines,
4432
+ showLineSmoothing,
4433
+ dataValuesDisplay,
4434
+ showXMajorTicks,
4435
+ xAxisMajorTickSizeNum,
4436
+ showYMajorTicks,
4437
+ showY2MajorTicks,
4438
+ yAxisMajorTickSizeNum,
4439
+ y2AxisMajorTickSizeNum,
4440
+ yAxisMajorTickIntervalNum,
4441
+ y2AxisMajorTickIntervalNum,
4442
+ showYMinorTicks,
4443
+ showY2MinorTicks,
4444
+ yAxisMinorTickSizeNum,
4445
+ y2AxisMinorTickSizeNum,
4446
+ showYAxisWithZero,
4447
+ showY2AxisWithZero,
4448
+ showXAxisLine,
4449
+ showYAxisLine,
4450
+ showY2AxisLine,
4451
+ legendMode,
4452
+ xAxisMaxLabelParts
4453
+ ]);
3972
4454
  const memoizedVisualization = (0, react_exports.useMemo)(() => {
3973
- return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor }, memoizedChart);
3974
- }, [backgroundColor, memoizedChart]);
3975
- return /* @__PURE__ */ react_exports.createElement(
4455
+ return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
4456
+ }, [bgColor, memoizedChart]);
4457
+ return /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, trellisEnabled && /* @__PURE__ */ react_exports.createElement(
4458
+ TrellisTitle,
4459
+ {
4460
+ trellisKey,
4461
+ backgroundColor: bgColor,
4462
+ fontColor: defaultFontColor
4463
+ }
4464
+ ), /* @__PURE__ */ react_exports.createElement(
3976
4465
  TimeSeriesChartContainer,
3977
4466
  {
3978
- height,
4467
+ height: trellisEnabled ? Number(height) - TRELLIS_TITLE_HEIGHT : height,
3979
4468
  width,
3980
4469
  ref: uplotContainerElement,
3981
4470
  "data-test": "timeseries-chart-wrapper"
3982
4471
  },
3983
4472
  /* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }),
3984
4473
  memoizedVisualization
3985
- );
4474
+ ));
3986
4475
  };
3987
4476
  var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
3988
4477
 
@@ -4293,9 +4782,52 @@ var simpleXMLOptions_default = "default" in defaultImport37 ? defaultImport37.de
4293
4782
  // src/Line/lineUtils.ts
4294
4783
  var transformOptions = (originalOptions) => {
4295
4784
  const returnOptions = (0, propUtils_exports.adjustOptionsToSchema)(originalOptions, config_default.optionsSchema);
4296
- return __spreadProps(__spreadValues({}, (0, simpleXMLOptions_exports.getSimpleXMLOptionsForProps)(convertToLineSCProperties(returnOptions))), {
4785
+ const convertedOptions = convertToLineSCProperties(returnOptions);
4786
+ const transformed = __spreadProps(__spreadValues({}, (0, simpleXMLOptions_exports.getSimpleXMLOptionsForProps)(convertedOptions)), {
4297
4787
  chart: "line"
4298
4788
  });
4789
+ const canvasSpecificProps = [
4790
+ "yAxisMin",
4791
+ "yAxisMax",
4792
+ "y2AxisMin",
4793
+ "y2AxisMax",
4794
+ "showXMajorGridLines",
4795
+ "showYMajorGridLines",
4796
+ "showY2MajorGridLines",
4797
+ "showYMinorGridLines",
4798
+ "showY2MinorGridLines",
4799
+ "showLineSmoothing",
4800
+ "xAxisMajorTickVisibility",
4801
+ "xAxisMajorTickSize",
4802
+ "yAxisMajorTickVisibility",
4803
+ "y2AxisMajorTickVisibility",
4804
+ "yAxisMajorTickSize",
4805
+ "y2AxisMajorTickSize",
4806
+ "yAxisMinorTickVisibility",
4807
+ "y2AxisMinorTickVisibility",
4808
+ "yAxisMinorTickSize",
4809
+ "y2AxisMinorTickSize",
4810
+ "xAxisLineVisibility",
4811
+ "yAxisLineVisibility",
4812
+ "y2AxisLineVisibility",
4813
+ "legendMode",
4814
+ "legendTruncation"
4815
+ // Note: yAxisMajorTickInterval, y2AxisMajorTickInterval, showYAxisWithZero, and showY2AxisWithZero
4816
+ // are NOT canvas-specific. They're mapped to SimpleXML props in lineOptionsSCMapping
4817
+ ];
4818
+ const preservedProps = canvasSpecificProps.reduce(
4819
+ (acc, prop) => {
4820
+ if (returnOptions[prop] !== void 0) {
4821
+ acc[prop] = returnOptions[prop];
4822
+ }
4823
+ return acc;
4824
+ },
4825
+ {}
4826
+ );
4827
+ if (convertedOptions.legendLabels !== void 0) {
4828
+ preservedProps.legendLabels = convertedOptions.legendLabels;
4829
+ }
4830
+ return __spreadValues(__spreadValues({}, transformed), preservedProps);
4299
4831
  };
4300
4832
  var convertMarkerOptions = (originalOptions, lineOptionValuesSCMapping) => {
4301
4833
  const originalOptionsWithAdditionalProps = originalOptions;
@@ -4327,6 +4859,8 @@ var convertToLineSCProperties = (originalOptions) => {
4327
4859
  dataValuesDisplay: "showDataLabels",
4328
4860
  nullValueDisplay: "nullValueMode",
4329
4861
  lineDashStylesByField: "fieldDashStyles",
4862
+ stepPositionsByField: "fieldStepPositions",
4863
+ stepPosition: "stepPosition",
4330
4864
  xAxisLabelRotation: "xAxisMajorLabelRotation",
4331
4865
  xAxisLabelVisibility: "xAxisMajorLabelVisibility",
4332
4866
  seriesColorsByField: "fieldColors",
@@ -4369,7 +4903,13 @@ var convertToLineSCProperties = (originalOptions) => {
4369
4903
  off: "none"
4370
4904
  }
4371
4905
  };
4372
- const stingValues = ["fieldDashStyles", "seriesColors", "fieldColors", "legendLabels"];
4906
+ const stingValues = [
4907
+ "fieldDashStyles",
4908
+ "fieldStepPositions",
4909
+ "seriesColors",
4910
+ "fieldColors",
4911
+ "legendLabels"
4912
+ ];
4373
4913
  return convertMarkerOptions(
4374
4914
  (0, propUtils_exports.convertToSCProperties)(originalOptions, lineOptionsSCMapping, lineOptionValuesSCMapping, stingValues),
4375
4915
  lineOptionValuesSCMapping
@@ -4630,6 +5170,37 @@ var withTrellis = (Viz) => {
4630
5170
  var withTrellis_default = withTrellis;
4631
5171
 
4632
5172
  // src/Line/Line.tsx
5173
+ var additionalTooltipValuesCache = {
5174
+ columns: null,
5175
+ fields: null,
5176
+ additionalTooltipFields: void 0,
5177
+ result: void 0
5178
+ };
5179
+ var areArraysEqual = (a, b) => {
5180
+ if (a === b) return true;
5181
+ if (!a || !b) return false;
5182
+ if (a.length !== b.length) return false;
5183
+ for (let i = 0; i < a.length; i += 1) {
5184
+ if (a[i] !== b[i]) return false;
5185
+ }
5186
+ return true;
5187
+ };
5188
+ var getMemoizedAdditionalTooltipValues = (columns, fields, additionalTooltipFields) => {
5189
+ if (additionalTooltipValuesCache.columns === columns && additionalTooltipValuesCache.fields === fields && areArraysEqual(additionalTooltipValuesCache.additionalTooltipFields, additionalTooltipFields)) {
5190
+ return additionalTooltipValuesCache.result;
5191
+ }
5192
+ let result;
5193
+ if ((additionalTooltipFields == null ? void 0 : additionalTooltipFields.length) && columns && fields) {
5194
+ result = extractAdditionalTooltipValues(columns, fields, additionalTooltipFields);
5195
+ }
5196
+ additionalTooltipValuesCache = {
5197
+ columns,
5198
+ fields,
5199
+ additionalTooltipFields,
5200
+ result
5201
+ };
5202
+ return result;
5203
+ };
4633
5204
  var computeVizProps = (_a) => {
4634
5205
  var _b = _a, {
4635
5206
  dataSources,
@@ -4662,6 +5233,7 @@ var computeVizProps = (_a) => {
4662
5233
  "trellisSplitBy",
4663
5234
  "themeFunc"
4664
5235
  ]);
5236
+ var _a2;
4665
5237
  const defaultFontColor = themeFunc("defaultFontColor");
4666
5238
  const computedProps = {
4667
5239
  visualizationApiRef,
@@ -4704,6 +5276,16 @@ var computeVizProps = (_a) => {
4704
5276
  computedProps.onPointMouseOver = onEventTrigger;
4705
5277
  computedProps.onPointMouseOut = onEventTrigger;
4706
5278
  }
5279
+ computedProps.eventHandlers = eventHandlers;
5280
+ computedProps.xField = xField;
5281
+ if ((_a2 = dataSources == null ? void 0 : dataSources.primary) == null ? void 0 : _a2.data) {
5282
+ const { columns: originalColumns, fields: originalFields } = dataSources.primary.data;
5283
+ computedProps.additionalTooltipValues = getMemoizedAdditionalTooltipValues(
5284
+ originalColumns,
5285
+ originalFields,
5286
+ additionalTooltipFields
5287
+ );
5288
+ }
4707
5289
  return computedProps;
4708
5290
  };
4709
5291
  var Line = withTrellis_default(