@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
@@ -346,7 +346,6 @@ var computeText = ({
346
346
  }) => {
347
347
  let text = (0, numberUtils_exports.isNumerial)(value) ? (0, numberUtils_exports.formatNumber)(value, numberPrecision, {
348
348
  useThousandSeparators: shouldUseThousandSeparators,
349
- // todo: need update formatNumber
350
349
  useTrendUnits: shouldAbbreviateValue
351
350
  }) : value;
352
351
  text = text || "";
@@ -423,13 +422,10 @@ var getTrendFontSize = ({ width, height, trendText, spaceRatio = 1 }) => {
423
422
  return trendFontSize;
424
423
  };
425
424
  var getUnderLabelHeight = (height) => height > DEFAULT_FONT ? DEFAULT_FONT : height;
426
- var getUnderLabel = ({ underLabel, width, height }) => (
427
- // todo: may need truncate underLabel later
428
- computeFontSize(underLabel, {
429
- width,
430
- height
431
- })
432
- );
425
+ var getUnderLabel = ({ underLabel, width, height }) => computeFontSize(underLabel, {
426
+ width,
427
+ height
428
+ });
433
429
  var getMajorAndTrend = ({
434
430
  width,
435
431
  height,
@@ -603,16 +599,19 @@ var computeSingleValueContent = ({
603
599
  smallVizProps
604
600
  };
605
601
  };
606
- var handleValueClickCallback = (ev, majorValue, majorValueField, trendValue, onValueClick, trellisEnabled = false, trellisSplitBy = "", trellisKey = "") => onValueClick(__spreadProps(__spreadValues({}, ev), {
607
- payload: __spreadValues({
608
- trendValue,
609
- value: majorValue,
610
- name: majorValueField
611
- }, trellisEnabled && {
612
- "trellis.name": trellisSplitBy,
613
- "trellis.value": trellisKey
614
- })
615
- }));
602
+ var handleValueClickCallback = (ev, majorValue, majorValueField, trendValue, onValueClick, trellisContext = {}) => {
603
+ const { trellisEnabled = false, trellisSplitBy = "", trellisKey = "" } = trellisContext;
604
+ return onValueClick(__spreadProps(__spreadValues({}, ev), {
605
+ payload: __spreadValues({
606
+ trendValue,
607
+ value: majorValue,
608
+ name: majorValueField
609
+ }, trellisEnabled && {
610
+ "trellis.name": trellisSplitBy,
611
+ "trellis.value": trellisKey
612
+ })
613
+ }));
614
+ };
616
615
  var getTrendColorWithPercent = (options) => {
617
616
  const shouldUsePercentTrendColor = options.trendColor === "> trendValue | rangeValue(trendColorEditorConfig)" && options.trendDisplay === "percent";
618
617
  return shouldUsePercentTrendColor ? {
@@ -1153,32 +1152,33 @@ var Container = styled_components_default.div`
1153
1152
  var SingleValueIcon = (_a) => {
1154
1153
  var props = __objRest(_a, []);
1155
1154
  const {
1156
- width,
1157
- height = 250,
1155
+ width = "100%",
1156
+ height = 400,
1158
1157
  style,
1159
1158
  majorFontSize,
1160
- majorValue,
1159
+ majorValue = "N/A",
1161
1160
  majorValueDisplay,
1162
- majorValueField,
1161
+ majorValueField = "",
1163
1162
  trendValue,
1164
1163
  trendFontSize,
1165
- unitPosition,
1166
- numberPrecision,
1167
- shouldUseThousandSeparators,
1168
- shouldAbbreviateTrendValue,
1169
- shouldAbbreviateMajorValue,
1170
- icon,
1171
- iconOpacity,
1164
+ unitPosition = "after",
1165
+ numberPrecision = 0,
1166
+ shouldUseThousandSeparators = true,
1167
+ shouldAbbreviateTrendValue = false,
1168
+ shouldAbbreviateMajorValue = false,
1169
+ icon = "default",
1170
+ iconOpacity = 1,
1172
1171
  IconComponent,
1173
- noDataSources,
1174
- noResult,
1175
- onValueClick,
1172
+ noDataSources = false,
1173
+ noResult = false,
1174
+ onValueClick = () => {
1175
+ },
1176
1176
  defaultFontColor,
1177
1177
  defaultBlockFontColor,
1178
1178
  splitByLayout,
1179
1179
  trellisKey = "",
1180
1180
  trellisSplitBy = "",
1181
- align
1181
+ align = "center"
1182
1182
  } = props;
1183
1183
  const [containerWidth, setContainerWidth] = react_default.useState(Number(props.width));
1184
1184
  const [containerHeight, setContainerHeight] = react_default.useState(Number(props.height));
@@ -1196,16 +1196,11 @@ var SingleValueIcon = (_a) => {
1196
1196
  });
1197
1197
  const trellisEnabled = useTrellisEnabled(splitByLayout);
1198
1198
  const handleValueClick = (0, react_exports.useCallback)(
1199
- (ev) => handleValueClickCallback(
1200
- ev,
1201
- majorValue,
1202
- majorValueField,
1203
- trendValue,
1204
- onValueClick,
1199
+ (ev) => handleValueClickCallback(ev, majorValue, majorValueField, trendValue, onValueClick, {
1205
1200
  trellisEnabled,
1206
1201
  trellisSplitBy,
1207
1202
  trellisKey
1208
- ),
1203
+ }),
1209
1204
  [onValueClick, majorValue, majorValueField, trendValue, trellisEnabled, trellisSplitBy, trellisKey]
1210
1205
  );
1211
1206
  const renderVisualization = () => {
@@ -1232,7 +1227,13 @@ var SingleValueIcon = (_a) => {
1232
1227
  opacity: iconOpacity
1233
1228
  });
1234
1229
  } else {
1235
- let { showValue = true, trendDisplay, unit, underLabel, iconPosition } = props;
1230
+ let {
1231
+ showValue = true,
1232
+ trendDisplay = "absolute",
1233
+ unit,
1234
+ underLabel,
1235
+ iconPosition = "before"
1236
+ } = props;
1236
1237
  if (!isValidPosition(iconPosition)) {
1237
1238
  iconPosition = "before";
1238
1239
  }
@@ -1409,27 +1410,7 @@ SingleValueIcon.propTypes = {
1409
1410
  align: prop_types_default.string
1410
1411
  };
1411
1412
  SingleValueIcon.defaultProps = {
1412
- width: "100%",
1413
- height: 400,
1414
- majorValue: "N/A",
1415
- majorValueField: "",
1416
- trendDisplay: "absolute",
1417
- shouldAbbreviateTrendValue: false,
1418
- shouldAbbreviateMajorValue: false,
1419
- numberPrecision: 0,
1420
- shouldUseThousandSeparators: true,
1421
- unitPosition: "after",
1422
- icon: "default",
1423
- iconPosition: "before",
1424
- iconOpacity: 1,
1425
- showValue: true,
1426
- noDataSources: false,
1427
- noResult: false,
1428
- onValueClick: () => {
1429
- },
1430
- trellisKey: "",
1431
- trellisSplitBy: "",
1432
- align: "center"
1413
+ height: 400
1433
1414
  };
1434
1415
  var SingleValueIcon_default = SingleValueIcon;
1435
1416
 
@@ -1768,7 +1749,7 @@ var Cover = styled_components_default.div`
1768
1749
  bottom: 0;
1769
1750
  `;
1770
1751
  var Blocker = styled_components_default.div.attrs({
1771
- "data-splunk-visualization-version": "28.3.0 - 843e0f60b"
1752
+ "data-splunk-visualization-version": "28.5.0 - b192418b7"
1772
1753
  })`
1773
1754
  position: relative;
1774
1755
  width: 100%;
@@ -1858,7 +1839,7 @@ var withFixedSizeContainer = (Viz) => {
1858
1839
  FixSizeItem,
1859
1840
  {
1860
1841
  "data-test": "fix-size-item",
1861
- "data-splunk-visualization-version": "28.3.0 - 843e0f60b",
1842
+ "data-splunk-visualization-version": "28.5.0 - b192418b7",
1862
1843
  width,
1863
1844
  height,
1864
1845
  backgroundColor
@@ -1945,6 +1926,7 @@ var withPlaceholder = (Visualization, useIconPlaceholder = shouldShowIconPlaceho
1945
1926
  var withPlaceholder_default = withPlaceholder;
1946
1927
 
1947
1928
  // src/common/utils/dataUtils.ts
1929
+ var getFieldName = (field) => typeof field === "string" ? field : field.name;
1948
1930
  var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices) => {
1949
1931
  const dataLength = data.length;
1950
1932
  const downsampledIndices = [];
@@ -2061,9 +2043,9 @@ var tryToCoerceAllDisplayedFields = (ds, xField, yFields, fieldTypes, options) =
2061
2043
  let xColumn = [];
2062
2044
  const yColumns = [];
2063
2045
  const canDownsample = !ds.data.fields.some((field, index) => {
2064
- var _a, _b;
2065
- const fieldName = (_a = field.name) != null ? _a : field;
2066
- const fieldType = (_b = fieldTypes[index]) != null ? _b : "unknown";
2046
+ var _a;
2047
+ const fieldName = getFieldName(field);
2048
+ const fieldType = (_a = fieldTypes[index]) != null ? _a : "unknown";
2067
2049
  const column = ds.data.columns[index];
2068
2050
  let hasDisplayedColumnThatCantBeDownsampled = false;
2069
2051
  if (fieldName === xField) {
@@ -2350,7 +2332,7 @@ var trellisUtils_default = "default" in defaultImport39 ? defaultImport39.defaul
2350
2332
  var AGGREGATIONS = "aggregations";
2351
2333
  var dataSourcesSplitByAggregationsUnknown = (dataSource) => {
2352
2334
  var _a, _b, _c, _d;
2353
- const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
2335
+ const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
2354
2336
  const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
2355
2337
  let splitDataSources = null;
2356
2338
  let errorCode = null;
@@ -2371,7 +2353,7 @@ var dataSourcesSplitByAggregationsUnknown = (dataSource) => {
2371
2353
  }
2372
2354
  return { splitDataSources, errorCode };
2373
2355
  };
2374
- var toFieldEntries = (fields) => {
2356
+ var toFieldEntries = (fields = []) => {
2375
2357
  return fields.map((field) => {
2376
2358
  if (typeof field === "string") {
2377
2359
  return { name: field };
@@ -2386,7 +2368,7 @@ var dataSourcesSplitByAggregationsTimechartAndChart = (dataSource) => {
2386
2368
  let splitDataSources = null;
2387
2369
  let splitByFields = [];
2388
2370
  let errorCode = null;
2389
- if (typeof fields[0] !== "string") {
2371
+ if (fields.length > 0) {
2390
2372
  splitByFields = (0, trellisUtils_exports.extractDataSourceAggregationKeysChart)(fields);
2391
2373
  }
2392
2374
  if (splitByFields && splitByFields.length > 0) {
@@ -2424,12 +2406,12 @@ var dataSourcesSplitByAggregationsTimechartAndChart = (dataSource) => {
2424
2406
  };
2425
2407
  var dataSourcesSplitByAggregationsStats = (dataSource) => {
2426
2408
  var _a, _b, _c, _d;
2427
- const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
2409
+ const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
2428
2410
  const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
2429
2411
  let splitDataSources = null;
2430
2412
  let splitByFields = [];
2431
2413
  let errorCode = null;
2432
- if (typeof fields[0] !== "string") {
2414
+ if (fields.length > 0) {
2433
2415
  splitByFields = (0, trellisUtils_exports.extractDataSourceAggregationKeysStats)(fields);
2434
2416
  }
2435
2417
  if (splitByFields && splitByFields.length > 0) {
@@ -2453,12 +2435,12 @@ var dataSourcesSplitByAggregationsStats = (dataSource) => {
2453
2435
  };
2454
2436
  var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
2455
2437
  var _a, _b, _c, _d, _e;
2456
- const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
2438
+ const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
2457
2439
  const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
2458
2440
  let splitDataSources = null;
2459
2441
  let splitByFields = [];
2460
2442
  let errorCode = null;
2461
- if (typeof fields[0] !== "string") {
2443
+ if (fields.length > 0) {
2462
2444
  splitByFields = (0, trellisUtils_exports.extractSplitByFieldsChartFields)(fields);
2463
2445
  }
2464
2446
  if (splitByFields && splitByFields.indexOf(splitBy) > -1) {
@@ -2474,16 +2456,14 @@ var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
2474
2456
  splitDataSources[val] = (0, lodash_exports.cloneDeep)(
2475
2457
  (0, lodash_exports.omit)(dataSource, ["primary.data.fields", "primary.data.columns"])
2476
2458
  );
2477
- splitDataSources[val].primary.data.fields = [
2478
- { name: fields[0].name },
2479
- ...dataSourceKeys.map((k) => ({
2480
- name: k
2481
- }))
2482
- ];
2459
+ splitDataSources[val].primary.data.fields = [{ name: fields[0].name }];
2483
2460
  splitDataSources[val].primary.data.columns = [[...columns[0]]];
2484
2461
  dataSourceKeys.forEach((dsKey) => {
2485
2462
  fields.forEach((field, idx) => {
2486
2463
  if (field.data_source === dsKey && (field.splitby_value === val || field.name === val)) {
2464
+ splitDataSources[val].primary.data.fields.push({
2465
+ name: dsKey
2466
+ });
2487
2467
  splitDataSources[val].primary.data.columns.push([...columns[idx]]);
2488
2468
  }
2489
2469
  });
@@ -2496,12 +2476,12 @@ var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
2496
2476
  };
2497
2477
  var dataSourcesSplitByModeChart = (dataSource, splitBy) => {
2498
2478
  var _a, _b, _c, _d;
2499
- const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
2479
+ const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
2500
2480
  const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
2501
2481
  let splitDataSources = null;
2502
2482
  let splitByFields = [];
2503
2483
  let errorCode = null;
2504
- if (typeof fields[0] !== "string") {
2484
+ if (fields.length > 0) {
2505
2485
  splitByFields = (0, trellisUtils_exports.extractSplitByFieldsChartFields)(fields);
2506
2486
  }
2507
2487
  if (splitByFields && splitByFields.indexOf(splitBy) > -1) {
@@ -2589,17 +2569,15 @@ var dataSourcesSplitByModeChart = (dataSource, splitBy) => {
2589
2569
  };
2590
2570
  var dataSourcesSplitByModeStatsorUnknown = (dataSource, splitBy, splitMode) => {
2591
2571
  var _a, _b, _c, _d, _e, _f;
2592
- const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
2572
+ const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
2593
2573
  const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
2594
2574
  let splitDataSources = null;
2595
2575
  let splitByFields = [];
2596
2576
  let errorCode = null;
2597
- if (typeof fields[0] !== "string") {
2577
+ if (fields.length > 0) {
2598
2578
  splitByFields = splitMode !== trellisUtils_exports.UNKNOWN ? (0, trellisUtils_exports.extractSplitByFieldsForStats)(fields) : (0, trellisUtils_exports.extractSplitByFieldsForUnknown)(fields);
2599
2579
  }
2600
- const splitByIndex = fields == null ? void 0 : fields.findIndex(
2601
- (field) => field === splitBy || field.name === splitBy
2602
- );
2580
+ const splitByIndex = fields.findIndex((field) => field.name === splitBy);
2603
2581
  if (splitByFields && splitByFields.indexOf(splitBy) > -1) {
2604
2582
  const splitByColumn = (_f = (_e = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _e.data) == null ? void 0 : _f.columns[splitByIndex];
2605
2583
  splitDataSources = {};
@@ -2734,6 +2712,16 @@ var triangleEventAnnotationRenderer = ({
2734
2712
  eventColor: eventWithColor.color
2735
2713
  });
2736
2714
  };
2715
+ var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
2716
+ const rangeSelectEventHandler = eventHandlers.find(
2717
+ (eventHandler) => {
2718
+ var _a;
2719
+ return (_a = eventHandler.options.events) == null ? void 0 : _a.includes("range.select");
2720
+ }
2721
+ );
2722
+ const xAxisIsTime = xField === "_time";
2723
+ return !!rangeSelectEventHandler && xAxisIsTime;
2724
+ };
2737
2725
  var canvasSupportedTimeSeriesCharts = ["splunk.line"];
2738
2726
  var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
2739
2727
  return canvasSupportedTimeSeriesCharts.indexOf(vizConfigKey) > -1;
@@ -2754,17 +2742,34 @@ var filterChartDataFromInternalFields = (chartData) => {
2754
2742
  var convert2DArrayToNumbers = (arr) => {
2755
2743
  return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
2756
2744
  };
2757
- var SideLegendWidth = 75;
2758
- var commonLegendProps = { center: true, fontSize: 12, largerTiles: true, hideSeriesValue: true };
2745
+ var parseAxisValue = (val) => {
2746
+ if (val === void 0 || val === null || val === "auto" || val === "") {
2747
+ return void 0;
2748
+ }
2749
+ const num = typeof val === "number" ? val : Number.parseFloat(val);
2750
+ return Number.isNaN(num) ? void 0 : num;
2751
+ };
2752
+ var parseXAxisLineVisibility = (visibility) => {
2753
+ if (visibility === "hide") return false;
2754
+ if (visibility === "show") return true;
2755
+ return void 0;
2756
+ };
2759
2757
  var getLegend = (props) => {
2760
2758
  const legendPlacement = props == null ? void 0 : props.legendDisplay;
2759
+ const { isSeriesCompare, legendTruncation } = props;
2760
+ const commonLegendProps = {
2761
+ center: true,
2762
+ fontSize: 12,
2763
+ largerTiles: true,
2764
+ hideSeriesValue: !isSeriesCompare,
2765
+ // Show values if in seriesCompare mode
2766
+ legendTruncation
2767
+ };
2761
2768
  switch (legendPlacement) {
2762
2769
  case "off":
2763
2770
  return false;
2764
2771
  case "left":
2765
- return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
2766
- width: SideLegendWidth
2767
- }, commonLegendProps));
2772
+ return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
2768
2773
  case "bottom":
2769
2774
  return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
2770
2775
  wrap: true
@@ -2774,9 +2779,7 @@ var getLegend = (props) => {
2774
2779
  wrap: true
2775
2780
  }, commonLegendProps));
2776
2781
  default:
2777
- return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
2778
- width: SideLegendWidth
2779
- }, commonLegendProps));
2782
+ return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
2780
2783
  }
2781
2784
  };
2782
2785
  var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
@@ -2811,22 +2814,25 @@ var ellipsisAxisTitle = (axisTitle, containerSpacing, fontSize = 12) => {
2811
2814
  const end = axisTitle.slice(-halfChars);
2812
2815
  return `${start}...${end}`;
2813
2816
  };
2814
- var getFieldName = (field) => {
2817
+ var getFieldName2 = (field) => {
2815
2818
  const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
2816
2819
  return fieldName;
2817
2820
  };
2818
2821
  var getFieldNames = (fields) => {
2819
- return fields.map((field) => getFieldName(field));
2822
+ return fields.map((field) => getFieldName2(field));
2820
2823
  };
2821
- var getXScaleConfig = (label, xAxisLabelVisibility) => {
2824
+ var getXScaleConfig = (label, xAxisLabelVisibility, xAxisLabelRotation) => {
2822
2825
  const xConfig = { x: {} };
2823
2826
  xConfig.x.label = label;
2824
2827
  if (xAxisLabelVisibility === "hide") {
2825
2828
  xConfig.x.hideLabels = true;
2826
2829
  }
2830
+ if (xAxisLabelRotation !== void 0) {
2831
+ xConfig.x.labelRotation = xAxisLabelRotation;
2832
+ }
2827
2833
  return xConfig;
2828
2834
  };
2829
- var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility) => {
2835
+ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax) => {
2830
2836
  const scaleType = yAxisScale != null ? yAxisScale : "linear";
2831
2837
  const yConfig = { y: {} };
2832
2838
  yConfig.y.label = label;
@@ -2834,34 +2840,46 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
2834
2840
  if (yAxisAbbreviation !== "none") {
2835
2841
  yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
2836
2842
  }
2837
- if (yAxisAbbreviation === "none") {
2838
- yConfig.y.width = 55;
2839
- } else {
2843
+ if (yAxisAbbreviation !== "none") {
2840
2844
  yConfig.y.width = label && label.length > 0 ? 30 : 10;
2841
2845
  }
2842
2846
  if (yAxisLabelVisibility === "hide") {
2843
2847
  yConfig.y.hideLabels = true;
2844
2848
  }
2849
+ if (yAxisMin !== void 0 || yAxisMax !== void 0) {
2850
+ yConfig.y.range = (u, dataMin, dataMax) => {
2851
+ const min = yAxisMin != null ? yAxisMin : dataMin;
2852
+ const max = yAxisMax != null ? yAxisMax : dataMax;
2853
+ return [min, max];
2854
+ };
2855
+ }
2845
2856
  return yConfig;
2846
2857
  };
2847
- var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility) => {
2858
+ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility, y2AxisMin, y2AxisMax) => {
2848
2859
  const y2Config = { y2: {} };
2849
2860
  const scaleType = axisScale != null ? axisScale : "linear";
2850
2861
  y2Config.y2.label = label;
2851
2862
  y2Config.y2.side = "right";
2852
- y2Config.y2.showGrid = false;
2853
2863
  y2Config.y2.type = scaleType;
2854
2864
  if (axisAbbreviation !== "none") {
2855
2865
  y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
2866
+ y2Config.y2.width = label && label.length > 0 ? 50 : 10;
2856
2867
  } else if (roundAxisLabelsToInteger) {
2857
2868
  y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
2858
2869
  }
2859
2870
  if (y2AxisLabelVisibility === "hide") {
2860
2871
  y2Config.y2.hideLabels = true;
2861
2872
  }
2873
+ if (y2AxisMin !== void 0 || y2AxisMax !== void 0) {
2874
+ y2Config.y2.range = (u, dataMin, dataMax) => {
2875
+ const min = y2AxisMin != null ? y2AxisMin : dataMin;
2876
+ const max = y2AxisMax != null ? y2AxisMax : dataMax;
2877
+ return [min, max];
2878
+ };
2879
+ }
2862
2880
  return y2Config;
2863
2881
  };
2864
- var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay) => {
2882
+ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
2865
2883
  const seriesConfig = {};
2866
2884
  let spanGaps;
2867
2885
  let replaceNullsWithZero;
@@ -2888,6 +2906,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
2888
2906
  );
2889
2907
  if (shouldAssignToY2) {
2890
2908
  seriesConfig[field].overrides.scale = "y2";
2909
+ } else {
2910
+ seriesConfig[field].overrides.scale = "y";
2891
2911
  }
2892
2912
  }
2893
2913
  if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
@@ -2896,12 +2916,50 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
2896
2916
  if (markerDisplay !== void 0) {
2897
2917
  seriesConfig[field].markerDisplay = markerDisplay;
2898
2918
  }
2919
+ const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
2920
+ if (fieldDashStyle) {
2921
+ seriesConfig[field].lineDashStyle = fieldDashStyle;
2922
+ }
2923
+ const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
2924
+ const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
2925
+ if (fieldStepPosition && fieldStepPosition !== "off") {
2926
+ seriesConfig[field].stepPosition = fieldStepPosition;
2927
+ }
2899
2928
  if (replaceNullsWithZero !== void 0) {
2900
2929
  seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
2901
2930
  }
2902
2931
  });
2903
2932
  return seriesConfig;
2904
2933
  };
2934
+ var findRangeIndices = (xData, startValue, endValue) => {
2935
+ let startXIndex = -1;
2936
+ let endXIndex = -1;
2937
+ const xDataEpoch = xData.map((val) => {
2938
+ if (typeof val === "string") {
2939
+ return new Date(val).getTime() / 1e3;
2940
+ }
2941
+ return val;
2942
+ });
2943
+ for (let i = 0; i < xDataEpoch.length; i += 1) {
2944
+ if (xDataEpoch[i] >= startValue) {
2945
+ startXIndex = i;
2946
+ break;
2947
+ }
2948
+ }
2949
+ if (startXIndex === -1 && xDataEpoch.length > 0) {
2950
+ startXIndex = xDataEpoch.length - 1;
2951
+ }
2952
+ for (let i = xDataEpoch.length - 1; i >= 0; i -= 1) {
2953
+ if (xDataEpoch[i] <= endValue) {
2954
+ endXIndex = i;
2955
+ break;
2956
+ }
2957
+ }
2958
+ if (endXIndex === -1 && xDataEpoch.length > 0) {
2959
+ endXIndex = 0;
2960
+ }
2961
+ return { startXIndex, endXIndex };
2962
+ };
2905
2963
 
2906
2964
  // src/common/TimeSeriesChartWrapper.tsx
2907
2965
  var TimeSeriesChartContainer = styled_components_default.div`
@@ -2912,38 +2970,123 @@ var TimeSeriesChartContainer = styled_components_default.div`
2912
2970
  position: absolute !important; // This is needed for canvas element export pdf/png to work correctly
2913
2971
  }
2914
2972
  `;
2915
- var handleClick = (chartEvent, onClick) => {
2973
+ var appendTrellisToPayload = (payload, trellisKey, trellisSplitBy) => {
2974
+ const result = __spreadValues({}, payload);
2975
+ if (trellisSplitBy) {
2976
+ result["trellis.name"] = trellisSplitBy;
2977
+ }
2978
+ if (trellisKey) {
2979
+ result["trellis.value"] = trellisKey;
2980
+ }
2981
+ return result;
2982
+ };
2983
+ var hasMouseoverPayloadChanged = (currentPayload, previousPayload) => {
2984
+ if (!previousPayload) {
2985
+ return true;
2986
+ }
2987
+ if (currentPayload.index !== previousPayload.index) {
2988
+ return true;
2989
+ }
2990
+ if (currentPayload.seriesIndex !== previousPayload.seriesIndex) {
2991
+ return true;
2992
+ }
2993
+ if (currentPayload["trellis.name"] !== previousPayload["trellis.name"]) {
2994
+ return true;
2995
+ }
2996
+ if (currentPayload["trellis.value"] !== previousPayload["trellis.value"]) {
2997
+ return true;
2998
+ }
2999
+ return false;
3000
+ };
3001
+ var handleClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
2916
3002
  const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(chartEvent, "value", "seriesKey")), {
2917
3003
  name: chartEvent.seriesKey
2918
3004
  });
2919
3005
  delete payload.seriesKey;
2920
3006
  if (chartEvent.rowContext) {
2921
- Object.keys(chartEvent.rowContext).forEach((fieldName) => {
2922
- payload[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
2923
- });
3007
+ Object.assign(
3008
+ payload,
3009
+ Object.keys(chartEvent.rowContext).reduce((acc, fieldName) => {
3010
+ acc[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
3011
+ return acc;
3012
+ }, {})
3013
+ );
2924
3014
  }
3015
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
2925
3016
  if (onClick) {
2926
3017
  onClick({
2927
3018
  type: "point.click",
2928
3019
  originalEvent: chartEvent,
2929
- payload
3020
+ payload: updatedPayload
2930
3021
  });
2931
3022
  }
2932
3023
  };
2933
- var handleLegendClick = (chartEvent, onClick) => {
3024
+ var handleLegendClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
2934
3025
  const payload = {
2935
3026
  name: chartEvent
2936
3027
  };
3028
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
2937
3029
  if (onClick) {
2938
3030
  onClick({
2939
3031
  type: "legend.click",
2940
3032
  originalEvent: chartEvent,
2941
- payload
3033
+ payload: updatedPayload
2942
3034
  });
2943
3035
  }
2944
3036
  };
3037
+ var handleRangeSelection = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
3038
+ var _a;
3039
+ if (!rangeEvent) {
3040
+ return;
3041
+ }
3042
+ const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
3043
+ const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
3044
+ const payload = {
3045
+ startXIndex,
3046
+ startXValue: rangeEvent.start,
3047
+ endXIndex,
3048
+ endXValue: rangeEvent.end
3049
+ };
3050
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
3051
+ if (onSelect) {
3052
+ onSelect({
3053
+ type: "range.selectBeforeZoom",
3054
+ originalEvent: rangeEvent,
3055
+ payload: updatedPayload
3056
+ });
3057
+ }
3058
+ };
3059
+ var handleRangeZoom = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
3060
+ var _a;
3061
+ const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
3062
+ const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
3063
+ const payload = {
3064
+ startXIndex,
3065
+ startXValue: rangeEvent.start,
3066
+ endXIndex,
3067
+ endXValue: rangeEvent.end
3068
+ };
3069
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
3070
+ if (onSelect) {
3071
+ onSelect({
3072
+ type: "range.select",
3073
+ originalEvent: rangeEvent,
3074
+ payload: updatedPayload
3075
+ });
3076
+ }
3077
+ };
3078
+ var parseArrayOption = (value) => {
3079
+ if (Array.isArray(value)) {
3080
+ return value;
3081
+ }
3082
+ if (value) {
3083
+ return JSON.parse(value);
3084
+ }
3085
+ return void 0;
3086
+ };
2945
3087
  var TimeSeriesChartWrapper = (props) => {
2946
- const {
3088
+ var _b, _c, _d;
3089
+ const _a = props, {
2947
3090
  width,
2948
3091
  height,
2949
3092
  chartData,
@@ -2956,12 +3099,57 @@ var TimeSeriesChartWrapper = (props) => {
2956
3099
  markerDisplay,
2957
3100
  onClick,
2958
3101
  onPointMouseOver,
2959
- onPointMouseOut
2960
- } = props;
2961
- const {
3102
+ onPointMouseOut,
3103
+ onSelect,
3104
+ splitByLayout,
3105
+ trellisKey,
3106
+ trellisSplitBy,
2962
3107
  backgroundColor,
3108
+ defaultFontColor,
3109
+ additionalTooltipValues,
3110
+ xAxisLineVisibility: xAxisLineVisibility,
3111
+ yAxisLineVisibility,
3112
+ y2AxisLineVisibility,
3113
+ showYAxisWithZero: showYAxisWithZeroFromProps,
3114
+ showY2AxisWithZero: showY2AxisWithZeroFromProps
3115
+ } = _a, otherOptions = __objRest(_a, [
3116
+ "width",
3117
+ "height",
3118
+ "chartData",
3119
+ "options",
3120
+ "userLocale",
3121
+ "annotationX",
3122
+ "annotationLabel",
3123
+ "annotationColor",
3124
+ "legendDisplay",
3125
+ "markerDisplay",
3126
+ "onClick",
3127
+ "onPointMouseOver",
3128
+ "onPointMouseOut",
3129
+ "onSelect",
3130
+ "splitByLayout",
3131
+ "trellisKey",
3132
+ "trellisSplitBy",
3133
+ "backgroundColor",
3134
+ "defaultFontColor",
3135
+ "additionalTooltipValues",
3136
+ // Extract axis line visibility options from props
3137
+ "xAxisLineVisibility",
3138
+ "yAxisLineVisibility",
3139
+ "y2AxisLineVisibility",
3140
+ // Extract showYAxisWithZero directly from props for accelerated render mode
3141
+ "showYAxisWithZero",
3142
+ "showY2AxisWithZero"
3143
+ ]);
3144
+ const { eventHandlers, xField: xFieldFromProps } = otherOptions;
3145
+ const trellisEnabled = useTrellisEnabled(splitByLayout);
3146
+ const {
3147
+ backgroundColor: bgColorFromOptions,
2963
3148
  seriesColors: seriesColorsStr,
2964
3149
  fieldColors,
3150
+ legendLabels: legendLabelsStr,
3151
+ legendMode,
3152
+ legendTruncation,
2965
3153
  "axisTitleX.text": xAxisTitleText,
2966
3154
  "axisTitleY.text": yAxisTitleText,
2967
3155
  "axisTitleY2.text": y2AxisTitleText,
@@ -2969,8 +3157,12 @@ var TimeSeriesChartWrapper = (props) => {
2969
3157
  "axisTitleY.visibility": yAxisTitleVisibility,
2970
3158
  "axisTitleY2.visibility": y2AxisTitleVisibility,
2971
3159
  "axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
3160
+ "axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
3161
+ "axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
2972
3162
  "axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
3163
+ "axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
2973
3164
  "axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
3165
+ "axisLabelsY2.majorUnit": y2AxisMajorUnitFromSimpleXML,
2974
3166
  "axisY.abbreviation": yAxisAbbreviation,
2975
3167
  "axisY.scale": yAxisScale,
2976
3168
  "axisY2.abbreviation": y2AxisAbbreviation,
@@ -2980,10 +3172,73 @@ var TimeSeriesChartWrapper = (props) => {
2980
3172
  "axisLabelsY2.integerUnits": y2IntegerUnits,
2981
3173
  "chart.overlayFields": overlayFieldsStr,
2982
3174
  "chart.nullValueMode": nullValueMode,
2983
- lineWidth
3175
+ "chart.showDataLabels": showDataLabels,
3176
+ lineWidth,
3177
+ lineDashStyle,
3178
+ fieldDashStyles: lineDashStylesByFieldStr,
3179
+ stepPosition,
3180
+ fieldStepPositions: stepPositionsByFieldStr,
3181
+ yAxisMin: yAxisMinRaw,
3182
+ yAxisMax: yAxisMaxRaw,
3183
+ y2AxisMin: y2AxisMinRaw,
3184
+ y2AxisMax: y2AxisMaxRaw,
3185
+ showXMajorGridLines,
3186
+ showYMajorGridLines,
3187
+ showY2MajorGridLines,
3188
+ showYMinorGridLines,
3189
+ showY2MinorGridLines,
3190
+ showLineSmoothing,
3191
+ xAxisMajorTickVisibility,
3192
+ xAxisMajorTickSize,
3193
+ yAxisMajorTickVisibility,
3194
+ y2AxisMajorTickVisibility,
3195
+ yAxisMajorTickSize,
3196
+ y2AxisMajorTickSize,
3197
+ yAxisMajorTickInterval,
3198
+ y2AxisMajorTickInterval,
3199
+ yAxisMinorTickVisibility,
3200
+ y2AxisMinorTickVisibility,
3201
+ yAxisMinorTickSize,
3202
+ y2AxisMinorTickSize,
3203
+ showYAxisWithZero: showYAxisWithZeroFromOptions,
3204
+ showY2AxisWithZero: showY2AxisWithZeroFromOptions
2984
3205
  } = options;
3206
+ const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
3207
+ const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
3208
+ const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
3209
+ const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
3210
+ const showYMajorTicks = yAxisMajorTickVisibility === "show";
3211
+ const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
3212
+ const showYMinorTicks = yAxisMinorTickVisibility === "show";
3213
+ const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
3214
+ const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
3215
+ const showYAxisLine = yAxisLineVisibility === "show";
3216
+ const showY2AxisLine = y2AxisLineVisibility === "show";
3217
+ const yAxisMin = parseAxisValue(yAxisMinRaw);
3218
+ const yAxisMax = parseAxisValue(yAxisMaxRaw);
3219
+ const y2AxisMin = parseAxisValue(y2AxisMinRaw);
3220
+ const y2AxisMax = parseAxisValue(y2AxisMaxRaw);
3221
+ const parseTickInterval = (simpleXMLValue, canvasValue) => {
3222
+ if (simpleXMLValue) return Number(simpleXMLValue);
3223
+ if (canvasValue) return Number(canvasValue);
3224
+ return void 0;
3225
+ };
3226
+ const yAxisMajorTickIntervalNum = parseTickInterval(yAxisMajorUnitFromSimpleXML, yAxisMajorTickInterval);
3227
+ const y2AxisMajorTickIntervalNum = parseTickInterval(
3228
+ y2AxisMajorUnitFromSimpleXML,
3229
+ y2AxisMajorTickInterval
3230
+ );
3231
+ const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
3232
+ const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
3233
+ const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
3234
+ const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
3235
+ const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
2985
3236
  const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
2986
3237
  const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
3238
+ const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
3239
+ const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
3240
+ const legendLabels = parseArrayOption(legendLabelsStr);
3241
+ const bgColor = backgroundColor || bgColorFromOptions;
2987
3242
  const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
2988
3243
  const [containerHeight, setContainerHeight] = react_exports.useState(Number(props.height));
2989
3244
  const cachedHandleResize = react_exports.useCallback((w, h) => {
@@ -2994,31 +3249,64 @@ var TimeSeriesChartWrapper = (props) => {
2994
3249
  fields: chartData.fields,
2995
3250
  columns: chartData.seriesList
2996
3251
  });
2997
- const xField = getFieldName(filteredChartData.fields[0]);
3252
+ const xField = getFieldName2(filteredChartData.fields[0]);
2998
3253
  const yFields = getFieldNames(
2999
3254
  filteredChartData.fields.length > 1 ? filteredChartData.fields.slice(1) : []
3000
3255
  );
3001
- const y2Fields = y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [];
3002
- const overlayFields = overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [];
3256
+ const y2Fields = (0, react_exports.useMemo)(
3257
+ () => y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [],
3258
+ [y2FieldsStr]
3259
+ );
3260
+ const overlayFields = (0, react_exports.useMemo)(
3261
+ () => overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [],
3262
+ [overlayFieldsStr]
3263
+ );
3003
3264
  let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
3004
3265
  xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
3005
- let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFields, yAxisTitleVisibility);
3266
+ const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
3267
+ let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility);
3006
3268
  yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
3007
3269
  const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
3008
3270
  let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
3009
3271
  y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
3010
- const xScaleConfig = getXScaleConfig(xAxisTitle, xAxisLabelVisibility);
3011
- const yScaleConfig = getYScaleConfig(yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility);
3012
- let y2ScaleConfig = {};
3013
- if (y2Enabled) {
3014
- y2ScaleConfig = getY2ScaleConfig(
3015
- y2AxisTitle,
3016
- y2AxisAbbreviation,
3017
- y2AxisScale,
3018
- y2IntegerUnits,
3019
- y2AxisLabelVisibility
3020
- );
3021
- }
3272
+ const xScaleConfig = (0, react_exports.useMemo)(
3273
+ () => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
3274
+ [xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
3275
+ );
3276
+ const yScaleConfig = (0, react_exports.useMemo)(
3277
+ () => getYScaleConfig(
3278
+ yAxisTitle,
3279
+ yAxisAbbreviation,
3280
+ yAxisScale,
3281
+ yAxisLabelVisibility,
3282
+ yAxisMin,
3283
+ yAxisMax
3284
+ ),
3285
+ [yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax]
3286
+ );
3287
+ const y2ScaleConfig = (0, react_exports.useMemo)(() => {
3288
+ if (y2Enabled) {
3289
+ return getY2ScaleConfig(
3290
+ y2AxisTitle,
3291
+ y2AxisAbbreviation,
3292
+ y2AxisScale,
3293
+ y2IntegerUnits,
3294
+ y2AxisLabelVisibility,
3295
+ y2AxisMin,
3296
+ y2AxisMax
3297
+ );
3298
+ }
3299
+ return {};
3300
+ }, [
3301
+ y2Enabled,
3302
+ y2AxisTitle,
3303
+ y2AxisAbbreviation,
3304
+ y2AxisScale,
3305
+ y2IntegerUnits,
3306
+ y2AxisLabelVisibility,
3307
+ y2AxisMin,
3308
+ y2AxisMax
3309
+ ]);
3022
3310
  const uplotContainerElement = (0, react_exports.useRef)(null);
3023
3311
  const seriesDataFormatted = [
3024
3312
  filteredChartData.columns[0],
@@ -3034,9 +3322,25 @@ var TimeSeriesChartWrapper = (props) => {
3034
3322
  overlayFields,
3035
3323
  y2Enabled,
3036
3324
  nullValueMode,
3037
- markerDisplay
3325
+ markerDisplay,
3326
+ lineDashStyle,
3327
+ lineDashStylesByField,
3328
+ stepPosition,
3329
+ stepPositionsByField
3038
3330
  ),
3039
- [yFields, y2Fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay]
3331
+ [
3332
+ yFields,
3333
+ y2Fields,
3334
+ lineWidth,
3335
+ overlayFields,
3336
+ y2Enabled,
3337
+ nullValueMode,
3338
+ markerDisplay,
3339
+ lineDashStyle,
3340
+ lineDashStylesByField,
3341
+ stepPosition,
3342
+ stepPositionsByField
3343
+ ]
3040
3344
  );
3041
3345
  const chartingEventAnnotations = (0, react_exports.useMemo)(
3042
3346
  () => getAnnotationsForCanvas({
@@ -3050,25 +3354,59 @@ var TimeSeriesChartWrapper = (props) => {
3050
3354
  () => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
3051
3355
  [xScaleConfig, yScaleConfig, y2ScaleConfig]
3052
3356
  );
3053
- const legend = (0, react_exports.useMemo)(() => getLegend({ legendDisplay }), [legendDisplay]);
3357
+ const isSeriesCompare = legendMode === "seriesCompare";
3358
+ const legend = (0, react_exports.useMemo)(
3359
+ () => getLegend({
3360
+ legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
3361
+ isSeriesCompare,
3362
+ legendTruncation
3363
+ }),
3364
+ [legendDisplay, isSeriesCompare, legendTruncation]
3365
+ );
3054
3366
  const handleChartClick = react_exports.useCallback(
3055
3367
  (event) => {
3056
3368
  if (onClick) {
3057
- handleClick(event, onClick);
3369
+ handleClick(event, onClick, trellisKey, trellisSplitBy);
3058
3370
  }
3059
3371
  },
3060
- [onClick]
3372
+ [onClick, trellisKey, trellisSplitBy]
3061
3373
  );
3062
3374
  const handleChartLegendClick = react_exports.useCallback(
3063
3375
  (event) => {
3064
3376
  if (onClick) {
3065
- handleLegendClick(event, onClick);
3377
+ handleLegendClick(event, onClick, trellisKey, trellisSplitBy);
3066
3378
  }
3067
3379
  },
3068
- [onClick]
3380
+ [onClick, trellisKey, trellisSplitBy]
3381
+ );
3382
+ const handleChartRangeSelection = react_exports.useCallback(
3383
+ (range2) => {
3384
+ if (onSelect) {
3385
+ handleRangeSelection(range2, onSelect, chartData, trellisKey, trellisSplitBy);
3386
+ }
3387
+ },
3388
+ [onSelect, chartData, trellisKey, trellisSplitBy]
3389
+ );
3390
+ const handleChartRangeZoom = react_exports.useCallback(
3391
+ (range2) => {
3392
+ if (onSelect) {
3393
+ handleRangeZoom(range2, onSelect, chartData, trellisKey, trellisSplitBy);
3394
+ }
3395
+ },
3396
+ [onSelect, chartData, trellisKey, trellisSplitBy]
3397
+ );
3398
+ const xFieldToUse = xFieldFromProps || xField;
3399
+ const enableSearchZoom = react_exports.useMemo(
3400
+ () => shouldEnableSearchZoom(eventHandlers, xFieldToUse),
3401
+ [eventHandlers, xFieldToUse]
3069
3402
  );
3070
3403
  const lastPayloadRef = react_exports.useRef(null);
3071
3404
  const lastOriginalEventRef = react_exports.useRef(null);
3405
+ const previousMouseoverPayloadRef = react_exports.useRef(null);
3406
+ const additionalTooltipValuesRef = react_exports.useRef(additionalTooltipValues);
3407
+ react_exports.useEffect(() => {
3408
+ additionalTooltipValuesRef.current = additionalTooltipValues;
3409
+ }, [additionalTooltipValues]);
3072
3410
  const handleChartCrosshairChange = react_exports.useCallback(
3073
3411
  (event) => {
3074
3412
  if (onPointMouseOver || onPointMouseOut) {
@@ -3080,6 +3418,7 @@ var TimeSeriesChartWrapper = (props) => {
3080
3418
  payload: lastPayloadRef.current
3081
3419
  });
3082
3420
  }
3421
+ previousMouseoverPayloadRef.current = null;
3083
3422
  return;
3084
3423
  }
3085
3424
  const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
@@ -3087,25 +3426,36 @@ var TimeSeriesChartWrapper = (props) => {
3087
3426
  });
3088
3427
  delete payload.seriesKey;
3089
3428
  if (event.rowContext) {
3090
- Object.keys(event.rowContext).forEach((fieldName) => {
3091
- payload[`row.${fieldName}.value`] = event.rowContext[fieldName];
3092
- });
3429
+ Object.assign(
3430
+ payload,
3431
+ Object.keys(event.rowContext).reduce((acc, fieldName) => {
3432
+ acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
3433
+ return acc;
3434
+ }, {})
3435
+ );
3093
3436
  }
3094
- lastPayloadRef.current = payload;
3437
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
3438
+ if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
3439
+ return;
3440
+ }
3441
+ lastPayloadRef.current = updatedPayload;
3095
3442
  lastOriginalEventRef.current = event;
3443
+ previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
3096
3444
  if (onPointMouseOver) {
3097
3445
  onPointMouseOver({
3098
3446
  type: "point.mouseover",
3099
3447
  originalEvent: event,
3100
- payload
3448
+ payload: updatedPayload
3101
3449
  });
3102
3450
  }
3103
3451
  }
3104
3452
  },
3105
- [onPointMouseOver, onPointMouseOut]
3453
+ [onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
3106
3454
  );
3107
- const memoizedChart = (0, react_exports.useMemo)(
3108
- () => /* @__PURE__ */ react_exports.createElement(
3455
+ 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}`;
3456
+ const memoizedChart = (0, react_exports.useMemo)(() => {
3457
+ const computedOnRangeZoom = onSelect ? handleChartRangeZoom : void 0;
3458
+ return /* @__PURE__ */ react_exports.createElement(visualization_canvas_exports.RangeSelectionProvider, { key: dataKey }, /* @__PURE__ */ react_exports.createElement(
3109
3459
  visualization_canvas_exports.TimeSeriesChart,
3110
3460
  {
3111
3461
  data: chartData,
@@ -3115,49 +3465,121 @@ var TimeSeriesChartWrapper = (props) => {
3115
3465
  seriesColorsByField,
3116
3466
  seriesConfig: seriesOverrides,
3117
3467
  legend,
3468
+ legendLabels,
3469
+ legendTruncation,
3470
+ isSeriesCompare: legendMode === "seriesCompare",
3471
+ maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
3118
3472
  scaleConfig,
3119
3473
  timestampFormat: "expanded",
3120
3474
  onCrosshairClick: onClick ? handleChartClick : void 0,
3121
3475
  onCrosshairChange: onPointMouseOver || onPointMouseOut ? handleChartCrosshairChange : void 0,
3122
3476
  onSeriesClick: onClick ? handleChartLegendClick : void 0,
3477
+ onRangeSelection: handleChartRangeSelection,
3478
+ onRangeZoom: computedOnRangeZoom,
3479
+ serverSideZoom: enableSearchZoom,
3123
3480
  userLocale,
3124
3481
  events: chartingEventAnnotations,
3125
- eventsConfig: { renderer: triangleEventAnnotationRenderer }
3482
+ eventsConfig: { renderer: triangleEventAnnotationRenderer },
3483
+ additionalTooltipValuesRef,
3484
+ showXMajorGridLines,
3485
+ showYMajorGridLines,
3486
+ showY2MajorGridLines,
3487
+ showYMinorGridLines,
3488
+ showY2MinorGridLines,
3489
+ showLineSmoothing,
3490
+ dataValuesDisplay,
3491
+ showXMajorTicks,
3492
+ xAxisMajorTickSize: xAxisMajorTickSizeNum,
3493
+ showYMajorTicks,
3494
+ showY2MajorTicks,
3495
+ yAxisMajorTickSize: yAxisMajorTickSizeNum,
3496
+ y2AxisMajorTickSize: y2AxisMajorTickSizeNum,
3497
+ yAxisMajorTickInterval: yAxisMajorTickIntervalNum,
3498
+ y2AxisMajorTickInterval: y2AxisMajorTickIntervalNum,
3499
+ showYMinorTicks,
3500
+ showY2MinorTicks,
3501
+ yAxisMinorTickSize: yAxisMinorTickSizeNum,
3502
+ y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
3503
+ showYAxisWithZero,
3504
+ showY2AxisWithZero,
3505
+ showXAxisLine,
3506
+ showYAxisLine,
3507
+ showY2AxisLine,
3508
+ xAxisMaxLabelParts
3126
3509
  }
3127
- ),
3128
- [
3129
- chartData,
3130
- containerWidth,
3131
- containerHeight,
3132
- seriesColors,
3133
- seriesColorsByField,
3134
- seriesOverrides,
3135
- legend,
3136
- scaleConfig,
3137
- userLocale,
3138
- chartingEventAnnotations,
3139
- onClick,
3140
- handleChartClick,
3141
- onPointMouseOver,
3142
- onPointMouseOut,
3143
- handleChartCrosshairChange,
3144
- handleChartLegendClick
3145
- ]
3146
- );
3510
+ ));
3511
+ }, [
3512
+ onSelect,
3513
+ handleChartRangeZoom,
3514
+ dataKey,
3515
+ chartData,
3516
+ containerWidth,
3517
+ containerHeight,
3518
+ seriesColors,
3519
+ seriesColorsByField,
3520
+ seriesOverrides,
3521
+ legend,
3522
+ legendLabels,
3523
+ legendTruncation,
3524
+ scaleConfig,
3525
+ onClick,
3526
+ handleChartClick,
3527
+ onPointMouseOver,
3528
+ onPointMouseOut,
3529
+ handleChartCrosshairChange,
3530
+ handleChartLegendClick,
3531
+ handleChartRangeSelection,
3532
+ enableSearchZoom,
3533
+ userLocale,
3534
+ chartingEventAnnotations,
3535
+ showXMajorGridLines,
3536
+ showYMajorGridLines,
3537
+ showY2MajorGridLines,
3538
+ showYMinorGridLines,
3539
+ showY2MinorGridLines,
3540
+ showLineSmoothing,
3541
+ dataValuesDisplay,
3542
+ showXMajorTicks,
3543
+ xAxisMajorTickSizeNum,
3544
+ showYMajorTicks,
3545
+ showY2MajorTicks,
3546
+ yAxisMajorTickSizeNum,
3547
+ y2AxisMajorTickSizeNum,
3548
+ yAxisMajorTickIntervalNum,
3549
+ y2AxisMajorTickIntervalNum,
3550
+ showYMinorTicks,
3551
+ showY2MinorTicks,
3552
+ yAxisMinorTickSizeNum,
3553
+ y2AxisMinorTickSizeNum,
3554
+ showYAxisWithZero,
3555
+ showY2AxisWithZero,
3556
+ showXAxisLine,
3557
+ showYAxisLine,
3558
+ showY2AxisLine,
3559
+ legendMode,
3560
+ xAxisMaxLabelParts
3561
+ ]);
3147
3562
  const memoizedVisualization = (0, react_exports.useMemo)(() => {
3148
- return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor }, memoizedChart);
3149
- }, [backgroundColor, memoizedChart]);
3150
- return /* @__PURE__ */ react_exports.createElement(
3563
+ return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
3564
+ }, [bgColor, memoizedChart]);
3565
+ return /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, trellisEnabled && /* @__PURE__ */ react_exports.createElement(
3566
+ TrellisTitle,
3567
+ {
3568
+ trellisKey,
3569
+ backgroundColor: bgColor,
3570
+ fontColor: defaultFontColor
3571
+ }
3572
+ ), /* @__PURE__ */ react_exports.createElement(
3151
3573
  TimeSeriesChartContainer,
3152
3574
  {
3153
- height,
3575
+ height: trellisEnabled ? Number(height) - TRELLIS_TITLE_HEIGHT : height,
3154
3576
  width,
3155
3577
  ref: uplotContainerElement,
3156
3578
  "data-test": "timeseries-chart-wrapper"
3157
3579
  },
3158
3580
  /* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }),
3159
3581
  memoizedVisualization
3160
- );
3582
+ ));
3161
3583
  };
3162
3584
  var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
3163
3585
 
@@ -3474,6 +3896,15 @@ var defaultImport44 = __toESM(require("@splunk/visualizations-shared/configUtils
3474
3896
  __reExport(configUtils_exports, require("@splunk/visualizations-shared/configUtils"));
3475
3897
  var configUtils_default = "default" in defaultImport44 ? defaultImport44.default : defaultImport44;
3476
3898
 
3899
+ // esm-externals:@splunk/visualization-icons
3900
+ var visualization_icons_exports = {};
3901
+ __export(visualization_icons_exports, {
3902
+ default: () => visualization_icons_default
3903
+ });
3904
+ var defaultImport45 = __toESM(require("@splunk/visualization-icons"));
3905
+ __reExport(visualization_icons_exports, require("@splunk/visualization-icons"));
3906
+ var visualization_icons_default = "default" in defaultImport45 ? defaultImport45.default : defaultImport45;
3907
+
3477
3908
  // src/common/configContext/singleValueContext.ts
3478
3909
  var defaultContext = {
3479
3910
  trendColorConfig: [
@@ -3504,7 +3935,6 @@ var StaticMajorAndTrendLayout = [
3504
3935
  [
3505
3936
  {
3506
3937
  label: (0, i18n_exports._)("Unit position"),
3507
- // todo: we need a new editor combining unit and position
3508
3938
  option: "unitPosition",
3509
3939
  editor: "editor.select",
3510
3940
  editorProps: {
@@ -4167,7 +4597,7 @@ var config = {
4167
4597
  /**
4168
4598
  * viz icon
4169
4599
  */
4170
- icon: null,
4600
+ icon: visualization_icons_exports.SingleValue,
4171
4601
  dataContract,
4172
4602
  size,
4173
4603
  defaultContext,
@@ -4189,27 +4619,27 @@ var Paginator_exports = {};
4189
4619
  __export(Paginator_exports, {
4190
4620
  default: () => Paginator_default
4191
4621
  });
4192
- var defaultImport45 = __toESM(require("@splunk/react-ui/Paginator"));
4622
+ var defaultImport46 = __toESM(require("@splunk/react-ui/Paginator"));
4193
4623
  __reExport(Paginator_exports, require("@splunk/react-ui/Paginator"));
4194
- var Paginator_default = "default" in defaultImport45 ? defaultImport45.default : defaultImport45;
4624
+ var Paginator_default = "default" in defaultImport46 ? defaultImport46.default : defaultImport46;
4195
4625
 
4196
4626
  // esm-externals:@splunk/themes
4197
4627
  var themes_exports = {};
4198
4628
  __export(themes_exports, {
4199
4629
  default: () => themes_default
4200
4630
  });
4201
- var defaultImport46 = __toESM(require("@splunk/themes"));
4631
+ var defaultImport47 = __toESM(require("@splunk/themes"));
4202
4632
  __reExport(themes_exports, require("@splunk/themes"));
4203
- var themes_default = "default" in defaultImport46 ? defaultImport46.default : defaultImport46;
4633
+ var themes_default = "default" in defaultImport47 ? defaultImport47.default : defaultImport47;
4204
4634
 
4205
4635
  // esm-externals:@splunk/themes/useSplunkTheme
4206
4636
  var useSplunkTheme_exports = {};
4207
4637
  __export(useSplunkTheme_exports, {
4208
4638
  default: () => useSplunkTheme_default
4209
4639
  });
4210
- var defaultImport47 = __toESM(require("@splunk/themes/useSplunkTheme"));
4640
+ var defaultImport48 = __toESM(require("@splunk/themes/useSplunkTheme"));
4211
4641
  __reExport(useSplunkTheme_exports, require("@splunk/themes/useSplunkTheme"));
4212
- var useSplunkTheme_default = "default" in defaultImport47 ? defaultImport47.default : defaultImport47;
4642
+ var useSplunkTheme_default = "default" in defaultImport48 ? defaultImport48.default : defaultImport48;
4213
4643
 
4214
4644
  // src/common/hocs/withTrellis.tsx
4215
4645
  var TrellisContainer = styled_components_default.div`