@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/Timeline.js CHANGED
@@ -124,23 +124,41 @@ var defaultImport6 = __toESM(require("@splunk/visualization-color-palettes/edito
124
124
  __reExport(PresetPalettes_exports, require("@splunk/visualization-color-palettes/editors/PresetPalettes"));
125
125
  var PresetPalettes_default = "default" in defaultImport6 ? defaultImport6.default : defaultImport6;
126
126
 
127
+ // esm-externals:@splunk/visualization-icons
128
+ var visualization_icons_exports = {};
129
+ __export(visualization_icons_exports, {
130
+ default: () => visualization_icons_default
131
+ });
132
+ var defaultImport7 = __toESM(require("@splunk/visualization-icons"));
133
+ __reExport(visualization_icons_exports, require("@splunk/visualization-icons"));
134
+ var visualization_icons_default = "default" in defaultImport7 ? defaultImport7.default : defaultImport7;
135
+
136
+ // esm-externals:@splunk/visualization-icons/placeholders
137
+ var placeholders_exports = {};
138
+ __export(placeholders_exports, {
139
+ default: () => placeholders_default
140
+ });
141
+ var defaultImport8 = __toESM(require("@splunk/visualization-icons/placeholders"));
142
+ __reExport(placeholders_exports, require("@splunk/visualization-icons/placeholders"));
143
+ var placeholders_default = "default" in defaultImport8 ? defaultImport8.default : defaultImport8;
144
+
127
145
  // esm-externals:@splunk/ui-utils/i18n
128
146
  var i18n_exports = {};
129
147
  __export(i18n_exports, {
130
148
  default: () => i18n_default
131
149
  });
132
- var defaultImport7 = __toESM(require("@splunk/ui-utils/i18n"));
150
+ var defaultImport9 = __toESM(require("@splunk/ui-utils/i18n"));
133
151
  __reExport(i18n_exports, require("@splunk/ui-utils/i18n"));
134
- var i18n_default = "default" in defaultImport7 ? defaultImport7.default : defaultImport7;
152
+ var i18n_default = "default" in defaultImport9 ? defaultImport9.default : defaultImport9;
135
153
 
136
154
  // esm-externals:@splunk/visualizations-shared/configUtils
137
155
  var configUtils_exports = {};
138
156
  __export(configUtils_exports, {
139
157
  default: () => configUtils_default
140
158
  });
141
- var defaultImport8 = __toESM(require("@splunk/visualizations-shared/configUtils"));
159
+ var defaultImport10 = __toESM(require("@splunk/visualizations-shared/configUtils"));
142
160
  __reExport(configUtils_exports, require("@splunk/visualizations-shared/configUtils"));
143
- var configUtils_default = "default" in defaultImport8 ? defaultImport8.default : defaultImport8;
161
+ var configUtils_default = "default" in defaultImport10 ? defaultImport10.default : defaultImport10;
144
162
 
145
163
  // src/common/utils/configUtils.ts
146
164
  function enhanceConfig(vizConfig) {
@@ -174,18 +192,18 @@ var pick_exports = {};
174
192
  __export(pick_exports, {
175
193
  default: () => pick_default
176
194
  });
177
- var defaultImport9 = __toESM(require("@splunk/themes/pick"));
195
+ var defaultImport11 = __toESM(require("@splunk/themes/pick"));
178
196
  __reExport(pick_exports, require("@splunk/themes/pick"));
179
- var pick_default = "default" in defaultImport9 ? defaultImport9.default : defaultImport9;
197
+ var pick_default = "default" in defaultImport11 ? defaultImport11.default : defaultImport11;
180
198
 
181
199
  // esm-externals:@splunk/themes/variables
182
200
  var variables_exports = {};
183
201
  __export(variables_exports, {
184
202
  default: () => variables_default
185
203
  });
186
- var defaultImport10 = __toESM(require("@splunk/themes/variables"));
204
+ var defaultImport12 = __toESM(require("@splunk/themes/variables"));
187
205
  __reExport(variables_exports, require("@splunk/themes/variables"));
188
- var variables_default = "default" in defaultImport10 ? defaultImport10.default : defaultImport10;
206
+ var variables_default = "default" in defaultImport12 ? defaultImport12.default : defaultImport12;
189
207
 
190
208
  // src/common/ThemedDefaults.tsx
191
209
  var defaultBackgroundColor = (props) => pick_default({
@@ -428,7 +446,7 @@ var config = {
428
446
  /**
429
447
  * viz icon
430
448
  */
431
- icon: null,
449
+ icon: visualization_icons_exports.Timeline,
432
450
  dataContract,
433
451
  size,
434
452
  defaultContext,
@@ -446,7 +464,8 @@ var config = {
446
464
  }
447
465
  },
448
466
  supports: ["dynamic-options" /* DYNAMIC_OPTIONS */, "placeholder" /* PLACEHOLDER */, "events" /* EVENTS */],
449
- themes
467
+ themes,
468
+ placeholderIcon: placeholders_exports.Timeline
450
469
  };
451
470
  var config_default = enhanceConfig(config);
452
471
 
@@ -455,117 +474,117 @@ var react_exports = {};
455
474
  __export(react_exports, {
456
475
  default: () => react_default
457
476
  });
458
- var defaultImport11 = __toESM(require("react"));
477
+ var defaultImport13 = __toESM(require("react"));
459
478
  __reExport(react_exports, require("react"));
460
- var react_default = "default" in defaultImport11 ? defaultImport11.default : defaultImport11;
479
+ var react_default = "default" in defaultImport13 ? defaultImport13.default : defaultImport13;
461
480
 
462
481
  // esm-externals:@splunk/themes/getSettingsFromThemedProps
463
482
  var getSettingsFromThemedProps_exports = {};
464
483
  __export(getSettingsFromThemedProps_exports, {
465
484
  default: () => getSettingsFromThemedProps_default
466
485
  });
467
- var defaultImport12 = __toESM(require("@splunk/themes/getSettingsFromThemedProps"));
486
+ var defaultImport14 = __toESM(require("@splunk/themes/getSettingsFromThemedProps"));
468
487
  __reExport(getSettingsFromThemedProps_exports, require("@splunk/themes/getSettingsFromThemedProps"));
469
- var getSettingsFromThemedProps_default = "default" in defaultImport12 ? defaultImport12.default : defaultImport12;
488
+ var getSettingsFromThemedProps_default = "default" in defaultImport14 ? defaultImport14.default : defaultImport14;
470
489
 
471
490
  // esm-externals:@splunk/visualization-encoding/Options
472
491
  var Options_exports = {};
473
492
  __export(Options_exports, {
474
493
  default: () => Options_default
475
494
  });
476
- var defaultImport13 = __toESM(require("@splunk/visualization-encoding/Options"));
495
+ var defaultImport15 = __toESM(require("@splunk/visualization-encoding/Options"));
477
496
  __reExport(Options_exports, require("@splunk/visualization-encoding/Options"));
478
- var Options_default = "default" in defaultImport13 ? defaultImport13.default : defaultImport13;
497
+ var Options_default = "default" in defaultImport15 ? defaultImport15.default : defaultImport15;
479
498
 
480
499
  // esm-externals:@splunk/visualizations-shared/SanitizeProps
481
500
  var SanitizeProps_exports = {};
482
501
  __export(SanitizeProps_exports, {
483
502
  default: () => SanitizeProps_default
484
503
  });
485
- var defaultImport14 = __toESM(require("@splunk/visualizations-shared/SanitizeProps"));
504
+ var defaultImport16 = __toESM(require("@splunk/visualizations-shared/SanitizeProps"));
486
505
  __reExport(SanitizeProps_exports, require("@splunk/visualizations-shared/SanitizeProps"));
487
- var SanitizeProps_default = "default" in defaultImport14 ? defaultImport14.default : defaultImport14;
506
+ var SanitizeProps_default = "default" in defaultImport16 ? defaultImport16.default : defaultImport16;
488
507
 
489
508
  // esm-externals:@splunk/visualization-context/TimezoneContext
490
509
  var TimezoneContext_exports = {};
491
510
  __export(TimezoneContext_exports, {
492
511
  default: () => TimezoneContext_default
493
512
  });
494
- var defaultImport15 = __toESM(require("@splunk/visualization-context/TimezoneContext"));
513
+ var defaultImport17 = __toESM(require("@splunk/visualization-context/TimezoneContext"));
495
514
  __reExport(TimezoneContext_exports, require("@splunk/visualization-context/TimezoneContext"));
496
- var TimezoneContext_default = "default" in defaultImport15 ? defaultImport15.default : defaultImport15;
515
+ var TimezoneContext_default = "default" in defaultImport17 ? defaultImport17.default : defaultImport17;
497
516
 
498
517
  // esm-externals:@splunk/moment
499
518
  var moment_exports = {};
500
519
  __export(moment_exports, {
501
520
  default: () => moment_default
502
521
  });
503
- var defaultImport16 = __toESM(require("@splunk/moment"));
522
+ var defaultImport18 = __toESM(require("@splunk/moment"));
504
523
  __reExport(moment_exports, require("@splunk/moment"));
505
- var moment_default = "default" in defaultImport16 ? defaultImport16.default : defaultImport16;
524
+ var moment_default = "default" in defaultImport18 ? defaultImport18.default : defaultImport18;
506
525
 
507
526
  // esm-externals:@splunk/visualization-context/FeatureFlagContext
508
527
  var FeatureFlagContext_exports = {};
509
528
  __export(FeatureFlagContext_exports, {
510
529
  default: () => FeatureFlagContext_default
511
530
  });
512
- var defaultImport17 = __toESM(require("@splunk/visualization-context/FeatureFlagContext"));
531
+ var defaultImport19 = __toESM(require("@splunk/visualization-context/FeatureFlagContext"));
513
532
  __reExport(FeatureFlagContext_exports, require("@splunk/visualization-context/FeatureFlagContext"));
514
- var FeatureFlagContext_default = "default" in defaultImport17 ? defaultImport17.default : defaultImport17;
533
+ var FeatureFlagContext_default = "default" in defaultImport19 ? defaultImport19.default : defaultImport19;
515
534
 
516
535
  // esm-externals:styled-components
517
536
  var styled_components_exports = {};
518
537
  __export(styled_components_exports, {
519
538
  default: () => styled_components_default
520
539
  });
521
- var defaultImport18 = __toESM(require("styled-components"));
540
+ var defaultImport20 = __toESM(require("styled-components"));
522
541
  __reExport(styled_components_exports, require("styled-components"));
523
- var styled_components_default = "default" in defaultImport18 ? defaultImport18.default : defaultImport18;
542
+ var styled_components_default = "default" in defaultImport20 ? defaultImport20.default : defaultImport20;
524
543
 
525
544
  // esm-externals:@splunk/visualizations-shared/hocUtils
526
545
  var hocUtils_exports = {};
527
546
  __export(hocUtils_exports, {
528
547
  default: () => hocUtils_default
529
548
  });
530
- var defaultImport19 = __toESM(require("@splunk/visualizations-shared/hocUtils"));
549
+ var defaultImport21 = __toESM(require("@splunk/visualizations-shared/hocUtils"));
531
550
  __reExport(hocUtils_exports, require("@splunk/visualizations-shared/hocUtils"));
532
- var hocUtils_default = "default" in defaultImport19 ? defaultImport19.default : defaultImport19;
551
+ var hocUtils_default = "default" in defaultImport21 ? defaultImport21.default : defaultImport21;
533
552
 
534
553
  // esm-externals:@splunk/visualizations-shared/JSONSchemaUtils
535
554
  var JSONSchemaUtils_exports = {};
536
555
  __export(JSONSchemaUtils_exports, {
537
556
  default: () => JSONSchemaUtils_default
538
557
  });
539
- var defaultImport20 = __toESM(require("@splunk/visualizations-shared/JSONSchemaUtils"));
558
+ var defaultImport22 = __toESM(require("@splunk/visualizations-shared/JSONSchemaUtils"));
540
559
  __reExport(JSONSchemaUtils_exports, require("@splunk/visualizations-shared/JSONSchemaUtils"));
541
- var JSONSchemaUtils_default = "default" in defaultImport20 ? defaultImport20.default : defaultImport20;
560
+ var JSONSchemaUtils_default = "default" in defaultImport22 ? defaultImport22.default : defaultImport22;
542
561
 
543
562
  // esm-externals:@splunk/async-dynamic-options-evaluator
544
563
  var async_dynamic_options_evaluator_exports = {};
545
564
  __export(async_dynamic_options_evaluator_exports, {
546
565
  default: () => async_dynamic_options_evaluator_default
547
566
  });
548
- var defaultImport21 = __toESM(require("@splunk/async-dynamic-options-evaluator"));
567
+ var defaultImport23 = __toESM(require("@splunk/async-dynamic-options-evaluator"));
549
568
  __reExport(async_dynamic_options_evaluator_exports, require("@splunk/async-dynamic-options-evaluator"));
550
- var async_dynamic_options_evaluator_default = "default" in defaultImport21 ? defaultImport21.default : defaultImport21;
569
+ var async_dynamic_options_evaluator_default = "default" in defaultImport23 ? defaultImport23.default : defaultImport23;
551
570
 
552
571
  // esm-externals:@splunk/ui-utils/id
553
572
  var id_exports = {};
554
573
  __export(id_exports, {
555
574
  default: () => id_default
556
575
  });
557
- var defaultImport22 = __toESM(require("@splunk/ui-utils/id"));
576
+ var defaultImport24 = __toESM(require("@splunk/ui-utils/id"));
558
577
  __reExport(id_exports, require("@splunk/ui-utils/id"));
559
- var id_default = "default" in defaultImport22 ? defaultImport22.default : defaultImport22;
578
+ var id_default = "default" in defaultImport24 ? defaultImport24.default : defaultImport24;
560
579
 
561
580
  // esm-externals:prop-types
562
581
  var prop_types_exports = {};
563
582
  __export(prop_types_exports, {
564
583
  default: () => prop_types_default
565
584
  });
566
- var defaultImport23 = __toESM(require("prop-types"));
585
+ var defaultImport25 = __toESM(require("prop-types"));
567
586
  __reExport(prop_types_exports, require("prop-types"));
568
- var prop_types_default = "default" in defaultImport23 ? defaultImport23.default : defaultImport23;
587
+ var prop_types_default = "default" in defaultImport25 ? defaultImport25.default : defaultImport25;
569
588
 
570
589
  // src/common/interfaces/VizActionHandler.ts
571
590
  var DefaultVizActionHandler = class {
@@ -773,18 +792,18 @@ var Message_exports = {};
773
792
  __export(Message_exports, {
774
793
  default: () => Message_default
775
794
  });
776
- var defaultImport24 = __toESM(require("@splunk/visualizations-shared/Message"));
795
+ var defaultImport26 = __toESM(require("@splunk/visualizations-shared/Message"));
777
796
  __reExport(Message_exports, require("@splunk/visualizations-shared/Message"));
778
- var Message_default = "default" in defaultImport24 ? defaultImport24.default : defaultImport24;
797
+ var Message_default = "default" in defaultImport26 ? defaultImport26.default : defaultImport26;
779
798
 
780
799
  // esm-externals:@splunk/visualizations-shared/SizeAwareWrapper
781
800
  var SizeAwareWrapper_exports = {};
782
801
  __export(SizeAwareWrapper_exports, {
783
802
  default: () => SizeAwareWrapper_default
784
803
  });
785
- var defaultImport25 = __toESM(require("@splunk/visualizations-shared/SizeAwareWrapper"));
804
+ var defaultImport27 = __toESM(require("@splunk/visualizations-shared/SizeAwareWrapper"));
786
805
  __reExport(SizeAwareWrapper_exports, require("@splunk/visualizations-shared/SizeAwareWrapper"));
787
- var SizeAwareWrapper_default = "default" in defaultImport25 ? defaultImport25.default : defaultImport25;
806
+ var SizeAwareWrapper_default = "default" in defaultImport27 ? defaultImport27.default : defaultImport27;
788
807
 
789
808
  // src/common/components/MissingPropsMessage.tsx
790
809
  var isMissing = (v) => {
@@ -839,7 +858,7 @@ var Cover = styled_components_default.div`
839
858
  bottom: 0;
840
859
  `;
841
860
  var Blocker = styled_components_default.div.attrs({
842
- "data-splunk-visualization-version": "28.3.0 - 843e0f60b"
861
+ "data-splunk-visualization-version": "28.5.0 - b192418b7"
843
862
  })`
844
863
  position: relative;
845
864
  width: 100%;
@@ -861,9 +880,9 @@ var style_exports = {};
861
880
  __export(style_exports, {
862
881
  default: () => style_default
863
882
  });
864
- var defaultImport26 = __toESM(require("@splunk/visualizations-shared/style"));
883
+ var defaultImport28 = __toESM(require("@splunk/visualizations-shared/style"));
865
884
  __reExport(style_exports, require("@splunk/visualizations-shared/style"));
866
- var style_default = "default" in defaultImport26 ? defaultImport26.default : defaultImport26;
885
+ var style_default = "default" in defaultImport28 ? defaultImport28.default : defaultImport28;
867
886
 
868
887
  // src/common/hocs/FixedSizeContainer.tsx
869
888
  var Item = styled_components_default.div.attrs(({ width }) => ({
@@ -920,7 +939,7 @@ var withFixedSizeContainer = (Viz) => {
920
939
  FixSizeItem,
921
940
  {
922
941
  "data-test": "fix-size-item",
923
- "data-splunk-visualization-version": "28.3.0 - 843e0f60b",
942
+ "data-splunk-visualization-version": "28.5.0 - b192418b7",
924
943
  width,
925
944
  height,
926
945
  backgroundColor
@@ -1011,11 +1030,12 @@ var numberUtils_exports = {};
1011
1030
  __export(numberUtils_exports, {
1012
1031
  default: () => numberUtils_default
1013
1032
  });
1014
- var defaultImport27 = __toESM(require("@splunk/visualizations-shared/numberUtils"));
1033
+ var defaultImport29 = __toESM(require("@splunk/visualizations-shared/numberUtils"));
1015
1034
  __reExport(numberUtils_exports, require("@splunk/visualizations-shared/numberUtils"));
1016
- var numberUtils_default = "default" in defaultImport27 ? defaultImport27.default : defaultImport27;
1035
+ var numberUtils_default = "default" in defaultImport29 ? defaultImport29.default : defaultImport29;
1017
1036
 
1018
1037
  // src/common/utils/dataUtils.ts
1038
+ var getFieldName = (field) => typeof field === "string" ? field : field.name;
1019
1039
  var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices) => {
1020
1040
  const dataLength = data.length;
1021
1041
  const downsampledIndices = [];
@@ -1132,9 +1152,9 @@ var tryToCoerceAllDisplayedFields = (ds, xField, yFields, fieldTypes, options) =
1132
1152
  let xColumn = [];
1133
1153
  const yColumns = [];
1134
1154
  const canDownsample = !ds.data.fields.some((field, index) => {
1135
- var _a, _b;
1136
- const fieldName = (_a = field.name) != null ? _a : field;
1137
- const fieldType = (_b = fieldTypes[index]) != null ? _b : "unknown";
1155
+ var _a;
1156
+ const fieldName = getFieldName(field);
1157
+ const fieldType = (_a = fieldTypes[index]) != null ? _a : "unknown";
1138
1158
  const column = ds.data.columns[index];
1139
1159
  let hasDisplayedColumnThatCantBeDownsampled = false;
1140
1160
  if (fieldName === xField) {
@@ -1393,9 +1413,9 @@ var FeatureFlags_exports = {};
1393
1413
  __export(FeatureFlags_exports, {
1394
1414
  default: () => FeatureFlags_default
1395
1415
  });
1396
- var defaultImport28 = __toESM(require("@splunk/visualization-context/FeatureFlags"));
1416
+ var defaultImport30 = __toESM(require("@splunk/visualization-context/FeatureFlags"));
1397
1417
  __reExport(FeatureFlags_exports, require("@splunk/visualization-context/FeatureFlags"));
1398
- var FeatureFlags_default = "default" in defaultImport28 ? defaultImport28.default : defaultImport28;
1418
+ var FeatureFlags_default = "default" in defaultImport30 ? defaultImport30.default : defaultImport30;
1399
1419
 
1400
1420
  // src/common/utils/featureFlagUtils.ts
1401
1421
  var getFeatureFlag = (context, flagName) => {
@@ -1413,9 +1433,9 @@ var trellisUtils_exports = {};
1413
1433
  __export(trellisUtils_exports, {
1414
1434
  default: () => trellisUtils_default
1415
1435
  });
1416
- var defaultImport29 = __toESM(require("@splunk/visualizations-shared/trellisUtils"));
1436
+ var defaultImport31 = __toESM(require("@splunk/visualizations-shared/trellisUtils"));
1417
1437
  __reExport(trellisUtils_exports, require("@splunk/visualizations-shared/trellisUtils"));
1418
- var trellisUtils_default = "default" in defaultImport29 ? defaultImport29.default : defaultImport29;
1438
+ var trellisUtils_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
1419
1439
 
1420
1440
  // src/common/utils/trellisUtils.ts
1421
1441
  var turnOffLegendDisplayWhenTrellisIsOn = (isTrellisOn, options) => {
@@ -1432,9 +1452,9 @@ var visualization_canvas_exports = {};
1432
1452
  __export(visualization_canvas_exports, {
1433
1453
  default: () => visualization_canvas_default
1434
1454
  });
1435
- var defaultImport30 = __toESM(require("@splunk/visualization-canvas"));
1455
+ var defaultImport32 = __toESM(require("@splunk/visualization-canvas"));
1436
1456
  __reExport(visualization_canvas_exports, require("@splunk/visualization-canvas"));
1437
- var visualization_canvas_default = "default" in defaultImport30 ? defaultImport30.default : defaultImport30;
1457
+ var visualization_canvas_default = "default" in defaultImport32 ? defaultImport32.default : defaultImport32;
1438
1458
 
1439
1459
  // src/common/components/VizStyleWrapper.jsx
1440
1460
  var VizStyleWrapper = styled_components_default.div.attrs(({ dataTestKey }) => ({
@@ -1456,9 +1476,9 @@ var Triangle_exports = {};
1456
1476
  __export(Triangle_exports, {
1457
1477
  default: () => Triangle_default
1458
1478
  });
1459
- var defaultImport31 = __toESM(require("@splunk/react-icons/Triangle"));
1479
+ var defaultImport33 = __toESM(require("@splunk/react-icons/Triangle"));
1460
1480
  __reExport(Triangle_exports, require("@splunk/react-icons/Triangle"));
1461
- var Triangle_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
1481
+ var Triangle_default = "default" in defaultImport33 ? defaultImport33.default : defaultImport33;
1462
1482
 
1463
1483
  // src/common/chartingUtils.ts
1464
1484
  var DEFAULT_LINE_WIDTH = 2;
@@ -1487,6 +1507,16 @@ var triangleEventAnnotationRenderer = ({
1487
1507
  eventColor: eventWithColor.color
1488
1508
  });
1489
1509
  };
1510
+ var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
1511
+ const rangeSelectEventHandler = eventHandlers.find(
1512
+ (eventHandler) => {
1513
+ var _a;
1514
+ return (_a = eventHandler.options.events) == null ? void 0 : _a.includes("range.select");
1515
+ }
1516
+ );
1517
+ const xAxisIsTime = xField === "_time";
1518
+ return !!rangeSelectEventHandler && xAxisIsTime;
1519
+ };
1490
1520
  var canvasSupportedTimeSeriesCharts = ["splunk.line"];
1491
1521
  var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
1492
1522
  return canvasSupportedTimeSeriesCharts.indexOf(vizConfigKey) > -1;
@@ -1507,17 +1537,34 @@ var filterChartDataFromInternalFields = (chartData) => {
1507
1537
  var convert2DArrayToNumbers = (arr) => {
1508
1538
  return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
1509
1539
  };
1510
- var SideLegendWidth = 75;
1511
- var commonLegendProps = { center: true, fontSize: 12, largerTiles: true, hideSeriesValue: true };
1540
+ var parseAxisValue = (val) => {
1541
+ if (val === void 0 || val === null || val === "auto" || val === "") {
1542
+ return void 0;
1543
+ }
1544
+ const num = typeof val === "number" ? val : Number.parseFloat(val);
1545
+ return Number.isNaN(num) ? void 0 : num;
1546
+ };
1547
+ var parseXAxisLineVisibility = (visibility) => {
1548
+ if (visibility === "hide") return false;
1549
+ if (visibility === "show") return true;
1550
+ return void 0;
1551
+ };
1512
1552
  var getLegend = (props) => {
1513
1553
  const legendPlacement = props == null ? void 0 : props.legendDisplay;
1554
+ const { isSeriesCompare, legendTruncation } = props;
1555
+ const commonLegendProps = {
1556
+ center: true,
1557
+ fontSize: 12,
1558
+ largerTiles: true,
1559
+ hideSeriesValue: !isSeriesCompare,
1560
+ // Show values if in seriesCompare mode
1561
+ legendTruncation
1562
+ };
1514
1563
  switch (legendPlacement) {
1515
1564
  case "off":
1516
1565
  return false;
1517
1566
  case "left":
1518
- return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
1519
- width: SideLegendWidth
1520
- }, commonLegendProps));
1567
+ return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
1521
1568
  case "bottom":
1522
1569
  return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
1523
1570
  wrap: true
@@ -1527,9 +1574,7 @@ var getLegend = (props) => {
1527
1574
  wrap: true
1528
1575
  }, commonLegendProps));
1529
1576
  default:
1530
- return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
1531
- width: SideLegendWidth
1532
- }, commonLegendProps));
1577
+ return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
1533
1578
  }
1534
1579
  };
1535
1580
  var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
@@ -1564,22 +1609,25 @@ var ellipsisAxisTitle = (axisTitle, containerSpacing, fontSize = 12) => {
1564
1609
  const end = axisTitle.slice(-halfChars);
1565
1610
  return `${start}...${end}`;
1566
1611
  };
1567
- var getFieldName = (field) => {
1612
+ var getFieldName2 = (field) => {
1568
1613
  const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
1569
1614
  return fieldName;
1570
1615
  };
1571
1616
  var getFieldNames = (fields) => {
1572
- return fields.map((field) => getFieldName(field));
1617
+ return fields.map((field) => getFieldName2(field));
1573
1618
  };
1574
- var getXScaleConfig = (label, xAxisLabelVisibility) => {
1619
+ var getXScaleConfig = (label, xAxisLabelVisibility, xAxisLabelRotation) => {
1575
1620
  const xConfig = { x: {} };
1576
1621
  xConfig.x.label = label;
1577
1622
  if (xAxisLabelVisibility === "hide") {
1578
1623
  xConfig.x.hideLabels = true;
1579
1624
  }
1625
+ if (xAxisLabelRotation !== void 0) {
1626
+ xConfig.x.labelRotation = xAxisLabelRotation;
1627
+ }
1580
1628
  return xConfig;
1581
1629
  };
1582
- var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility) => {
1630
+ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax) => {
1583
1631
  const scaleType = yAxisScale != null ? yAxisScale : "linear";
1584
1632
  const yConfig = { y: {} };
1585
1633
  yConfig.y.label = label;
@@ -1587,34 +1635,46 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
1587
1635
  if (yAxisAbbreviation !== "none") {
1588
1636
  yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
1589
1637
  }
1590
- if (yAxisAbbreviation === "none") {
1591
- yConfig.y.width = 55;
1592
- } else {
1638
+ if (yAxisAbbreviation !== "none") {
1593
1639
  yConfig.y.width = label && label.length > 0 ? 30 : 10;
1594
1640
  }
1595
1641
  if (yAxisLabelVisibility === "hide") {
1596
1642
  yConfig.y.hideLabels = true;
1597
1643
  }
1644
+ if (yAxisMin !== void 0 || yAxisMax !== void 0) {
1645
+ yConfig.y.range = (u, dataMin, dataMax) => {
1646
+ const min = yAxisMin != null ? yAxisMin : dataMin;
1647
+ const max = yAxisMax != null ? yAxisMax : dataMax;
1648
+ return [min, max];
1649
+ };
1650
+ }
1598
1651
  return yConfig;
1599
1652
  };
1600
- var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility) => {
1653
+ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility, y2AxisMin, y2AxisMax) => {
1601
1654
  const y2Config = { y2: {} };
1602
1655
  const scaleType = axisScale != null ? axisScale : "linear";
1603
1656
  y2Config.y2.label = label;
1604
1657
  y2Config.y2.side = "right";
1605
- y2Config.y2.showGrid = false;
1606
1658
  y2Config.y2.type = scaleType;
1607
1659
  if (axisAbbreviation !== "none") {
1608
1660
  y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
1661
+ y2Config.y2.width = label && label.length > 0 ? 50 : 10;
1609
1662
  } else if (roundAxisLabelsToInteger) {
1610
1663
  y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
1611
1664
  }
1612
1665
  if (y2AxisLabelVisibility === "hide") {
1613
1666
  y2Config.y2.hideLabels = true;
1614
1667
  }
1668
+ if (y2AxisMin !== void 0 || y2AxisMax !== void 0) {
1669
+ y2Config.y2.range = (u, dataMin, dataMax) => {
1670
+ const min = y2AxisMin != null ? y2AxisMin : dataMin;
1671
+ const max = y2AxisMax != null ? y2AxisMax : dataMax;
1672
+ return [min, max];
1673
+ };
1674
+ }
1615
1675
  return y2Config;
1616
1676
  };
1617
- var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay) => {
1677
+ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
1618
1678
  const seriesConfig = {};
1619
1679
  let spanGaps;
1620
1680
  let replaceNullsWithZero;
@@ -1641,6 +1701,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
1641
1701
  );
1642
1702
  if (shouldAssignToY2) {
1643
1703
  seriesConfig[field].overrides.scale = "y2";
1704
+ } else {
1705
+ seriesConfig[field].overrides.scale = "y";
1644
1706
  }
1645
1707
  }
1646
1708
  if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
@@ -1649,12 +1711,92 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
1649
1711
  if (markerDisplay !== void 0) {
1650
1712
  seriesConfig[field].markerDisplay = markerDisplay;
1651
1713
  }
1714
+ const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
1715
+ if (fieldDashStyle) {
1716
+ seriesConfig[field].lineDashStyle = fieldDashStyle;
1717
+ }
1718
+ const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
1719
+ const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
1720
+ if (fieldStepPosition && fieldStepPosition !== "off") {
1721
+ seriesConfig[field].stepPosition = fieldStepPosition;
1722
+ }
1652
1723
  if (replaceNullsWithZero !== void 0) {
1653
1724
  seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
1654
1725
  }
1655
1726
  });
1656
1727
  return seriesConfig;
1657
1728
  };
1729
+ var findRangeIndices = (xData, startValue, endValue) => {
1730
+ let startXIndex = -1;
1731
+ let endXIndex = -1;
1732
+ const xDataEpoch = xData.map((val) => {
1733
+ if (typeof val === "string") {
1734
+ return new Date(val).getTime() / 1e3;
1735
+ }
1736
+ return val;
1737
+ });
1738
+ for (let i = 0; i < xDataEpoch.length; i += 1) {
1739
+ if (xDataEpoch[i] >= startValue) {
1740
+ startXIndex = i;
1741
+ break;
1742
+ }
1743
+ }
1744
+ if (startXIndex === -1 && xDataEpoch.length > 0) {
1745
+ startXIndex = xDataEpoch.length - 1;
1746
+ }
1747
+ for (let i = xDataEpoch.length - 1; i >= 0; i -= 1) {
1748
+ if (xDataEpoch[i] <= endValue) {
1749
+ endXIndex = i;
1750
+ break;
1751
+ }
1752
+ }
1753
+ if (endXIndex === -1 && xDataEpoch.length > 0) {
1754
+ endXIndex = 0;
1755
+ }
1756
+ return { startXIndex, endXIndex };
1757
+ };
1758
+
1759
+ // src/common/hooks/useTrellisEnabled.ts
1760
+ var useTrellisFeatureFlagOn = () => {
1761
+ const context = (0, react_exports.useContext)(FeatureFlagContext_default);
1762
+ return Boolean(context == null ? void 0 : context.visualizations_enableTrellis);
1763
+ };
1764
+ var useTrellisEnabled = (layoutType = visualization_schemas_exports.LAYOUT_TYPE.Off) => {
1765
+ const trellisFeatureEnabled = useTrellisFeatureFlagOn();
1766
+ return trellisFeatureEnabled && layoutType === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
1767
+ };
1768
+
1769
+ // src/common/components/TrellisTitle.tsx
1770
+ var TRELLIS_TITLE_HEIGHT = 28;
1771
+ var TrellisTitleText = styled_components_default.div`
1772
+ margin-left: 10px;
1773
+ margin-right: 10px;
1774
+ padding-top: 8px;
1775
+ text-overflow: ellipsis;
1776
+ white-space: nowrap;
1777
+ overflow: hidden;
1778
+ `;
1779
+ var TrellisTitleDiv = styled_components_default.div`
1780
+ height: ${TRELLIS_TITLE_HEIGHT}px;
1781
+ font-size: 14px;
1782
+ font-weight: 700;
1783
+ color: ${(props) => props.fontColor};
1784
+ background-color: ${(props) => props.backgroundColor};
1785
+ box-shadow: 0 1px ${(props) => props.backgroundColor}; // this is added to avoid a 1px gap between title and viz divs that showed up intermittently because of pixel rounding error in chrome.
1786
+ `;
1787
+ var TrellisTitle = (props) => {
1788
+ const titleText = String(props.trellisKey).toString();
1789
+ return /* @__PURE__ */ react_exports.createElement(
1790
+ TrellisTitleDiv,
1791
+ {
1792
+ fontColor: props.fontColor,
1793
+ backgroundColor: props.backgroundColor,
1794
+ "data-test": "trellis-title",
1795
+ title: titleText
1796
+ },
1797
+ /* @__PURE__ */ react_exports.createElement(TrellisTitleText, null, titleText)
1798
+ );
1799
+ };
1658
1800
 
1659
1801
  // src/common/TimeSeriesChartWrapper.tsx
1660
1802
  var TimeSeriesChartContainer = styled_components_default.div`
@@ -1665,38 +1807,123 @@ var TimeSeriesChartContainer = styled_components_default.div`
1665
1807
  position: absolute !important; // This is needed for canvas element export pdf/png to work correctly
1666
1808
  }
1667
1809
  `;
1668
- var handleClick = (chartEvent, onClick) => {
1810
+ var appendTrellisToPayload = (payload, trellisKey, trellisSplitBy) => {
1811
+ const result = __spreadValues({}, payload);
1812
+ if (trellisSplitBy) {
1813
+ result["trellis.name"] = trellisSplitBy;
1814
+ }
1815
+ if (trellisKey) {
1816
+ result["trellis.value"] = trellisKey;
1817
+ }
1818
+ return result;
1819
+ };
1820
+ var hasMouseoverPayloadChanged = (currentPayload, previousPayload) => {
1821
+ if (!previousPayload) {
1822
+ return true;
1823
+ }
1824
+ if (currentPayload.index !== previousPayload.index) {
1825
+ return true;
1826
+ }
1827
+ if (currentPayload.seriesIndex !== previousPayload.seriesIndex) {
1828
+ return true;
1829
+ }
1830
+ if (currentPayload["trellis.name"] !== previousPayload["trellis.name"]) {
1831
+ return true;
1832
+ }
1833
+ if (currentPayload["trellis.value"] !== previousPayload["trellis.value"]) {
1834
+ return true;
1835
+ }
1836
+ return false;
1837
+ };
1838
+ var handleClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
1669
1839
  const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(chartEvent, "value", "seriesKey")), {
1670
1840
  name: chartEvent.seriesKey
1671
1841
  });
1672
1842
  delete payload.seriesKey;
1673
1843
  if (chartEvent.rowContext) {
1674
- Object.keys(chartEvent.rowContext).forEach((fieldName) => {
1675
- payload[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
1676
- });
1844
+ Object.assign(
1845
+ payload,
1846
+ Object.keys(chartEvent.rowContext).reduce((acc, fieldName) => {
1847
+ acc[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
1848
+ return acc;
1849
+ }, {})
1850
+ );
1677
1851
  }
1852
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
1678
1853
  if (onClick) {
1679
1854
  onClick({
1680
1855
  type: "point.click",
1681
1856
  originalEvent: chartEvent,
1682
- payload
1857
+ payload: updatedPayload
1683
1858
  });
1684
1859
  }
1685
1860
  };
1686
- var handleLegendClick = (chartEvent, onClick) => {
1861
+ var handleLegendClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
1687
1862
  const payload = {
1688
1863
  name: chartEvent
1689
1864
  };
1865
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
1690
1866
  if (onClick) {
1691
1867
  onClick({
1692
1868
  type: "legend.click",
1693
1869
  originalEvent: chartEvent,
1694
- payload
1870
+ payload: updatedPayload
1871
+ });
1872
+ }
1873
+ };
1874
+ var handleRangeSelection = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
1875
+ var _a;
1876
+ if (!rangeEvent) {
1877
+ return;
1878
+ }
1879
+ const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
1880
+ const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
1881
+ const payload = {
1882
+ startXIndex,
1883
+ startXValue: rangeEvent.start,
1884
+ endXIndex,
1885
+ endXValue: rangeEvent.end
1886
+ };
1887
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
1888
+ if (onSelect) {
1889
+ onSelect({
1890
+ type: "range.selectBeforeZoom",
1891
+ originalEvent: rangeEvent,
1892
+ payload: updatedPayload
1695
1893
  });
1696
1894
  }
1697
1895
  };
1896
+ var handleRangeZoom = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
1897
+ var _a;
1898
+ const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
1899
+ const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
1900
+ const payload = {
1901
+ startXIndex,
1902
+ startXValue: rangeEvent.start,
1903
+ endXIndex,
1904
+ endXValue: rangeEvent.end
1905
+ };
1906
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
1907
+ if (onSelect) {
1908
+ onSelect({
1909
+ type: "range.select",
1910
+ originalEvent: rangeEvent,
1911
+ payload: updatedPayload
1912
+ });
1913
+ }
1914
+ };
1915
+ var parseArrayOption = (value) => {
1916
+ if (Array.isArray(value)) {
1917
+ return value;
1918
+ }
1919
+ if (value) {
1920
+ return JSON.parse(value);
1921
+ }
1922
+ return void 0;
1923
+ };
1698
1924
  var TimeSeriesChartWrapper = (props) => {
1699
- const {
1925
+ var _b, _c, _d;
1926
+ const _a = props, {
1700
1927
  width,
1701
1928
  height,
1702
1929
  chartData,
@@ -1709,12 +1936,57 @@ var TimeSeriesChartWrapper = (props) => {
1709
1936
  markerDisplay,
1710
1937
  onClick,
1711
1938
  onPointMouseOver,
1712
- onPointMouseOut
1713
- } = props;
1714
- const {
1939
+ onPointMouseOut,
1940
+ onSelect,
1941
+ splitByLayout,
1942
+ trellisKey,
1943
+ trellisSplitBy,
1715
1944
  backgroundColor,
1945
+ defaultFontColor,
1946
+ additionalTooltipValues,
1947
+ xAxisLineVisibility: xAxisLineVisibility,
1948
+ yAxisLineVisibility,
1949
+ y2AxisLineVisibility,
1950
+ showYAxisWithZero: showYAxisWithZeroFromProps,
1951
+ showY2AxisWithZero: showY2AxisWithZeroFromProps
1952
+ } = _a, otherOptions = __objRest(_a, [
1953
+ "width",
1954
+ "height",
1955
+ "chartData",
1956
+ "options",
1957
+ "userLocale",
1958
+ "annotationX",
1959
+ "annotationLabel",
1960
+ "annotationColor",
1961
+ "legendDisplay",
1962
+ "markerDisplay",
1963
+ "onClick",
1964
+ "onPointMouseOver",
1965
+ "onPointMouseOut",
1966
+ "onSelect",
1967
+ "splitByLayout",
1968
+ "trellisKey",
1969
+ "trellisSplitBy",
1970
+ "backgroundColor",
1971
+ "defaultFontColor",
1972
+ "additionalTooltipValues",
1973
+ // Extract axis line visibility options from props
1974
+ "xAxisLineVisibility",
1975
+ "yAxisLineVisibility",
1976
+ "y2AxisLineVisibility",
1977
+ // Extract showYAxisWithZero directly from props for accelerated render mode
1978
+ "showYAxisWithZero",
1979
+ "showY2AxisWithZero"
1980
+ ]);
1981
+ const { eventHandlers, xField: xFieldFromProps } = otherOptions;
1982
+ const trellisEnabled = useTrellisEnabled(splitByLayout);
1983
+ const {
1984
+ backgroundColor: bgColorFromOptions,
1716
1985
  seriesColors: seriesColorsStr,
1717
1986
  fieldColors,
1987
+ legendLabels: legendLabelsStr,
1988
+ legendMode,
1989
+ legendTruncation,
1718
1990
  "axisTitleX.text": xAxisTitleText,
1719
1991
  "axisTitleY.text": yAxisTitleText,
1720
1992
  "axisTitleY2.text": y2AxisTitleText,
@@ -1722,8 +1994,12 @@ var TimeSeriesChartWrapper = (props) => {
1722
1994
  "axisTitleY.visibility": yAxisTitleVisibility,
1723
1995
  "axisTitleY2.visibility": y2AxisTitleVisibility,
1724
1996
  "axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
1997
+ "axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
1998
+ "axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
1725
1999
  "axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
2000
+ "axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
1726
2001
  "axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
2002
+ "axisLabelsY2.majorUnit": y2AxisMajorUnitFromSimpleXML,
1727
2003
  "axisY.abbreviation": yAxisAbbreviation,
1728
2004
  "axisY.scale": yAxisScale,
1729
2005
  "axisY2.abbreviation": y2AxisAbbreviation,
@@ -1733,10 +2009,73 @@ var TimeSeriesChartWrapper = (props) => {
1733
2009
  "axisLabelsY2.integerUnits": y2IntegerUnits,
1734
2010
  "chart.overlayFields": overlayFieldsStr,
1735
2011
  "chart.nullValueMode": nullValueMode,
1736
- lineWidth
2012
+ "chart.showDataLabels": showDataLabels,
2013
+ lineWidth,
2014
+ lineDashStyle,
2015
+ fieldDashStyles: lineDashStylesByFieldStr,
2016
+ stepPosition,
2017
+ fieldStepPositions: stepPositionsByFieldStr,
2018
+ yAxisMin: yAxisMinRaw,
2019
+ yAxisMax: yAxisMaxRaw,
2020
+ y2AxisMin: y2AxisMinRaw,
2021
+ y2AxisMax: y2AxisMaxRaw,
2022
+ showXMajorGridLines,
2023
+ showYMajorGridLines,
2024
+ showY2MajorGridLines,
2025
+ showYMinorGridLines,
2026
+ showY2MinorGridLines,
2027
+ showLineSmoothing,
2028
+ xAxisMajorTickVisibility,
2029
+ xAxisMajorTickSize,
2030
+ yAxisMajorTickVisibility,
2031
+ y2AxisMajorTickVisibility,
2032
+ yAxisMajorTickSize,
2033
+ y2AxisMajorTickSize,
2034
+ yAxisMajorTickInterval,
2035
+ y2AxisMajorTickInterval,
2036
+ yAxisMinorTickVisibility,
2037
+ y2AxisMinorTickVisibility,
2038
+ yAxisMinorTickSize,
2039
+ y2AxisMinorTickSize,
2040
+ showYAxisWithZero: showYAxisWithZeroFromOptions,
2041
+ showY2AxisWithZero: showY2AxisWithZeroFromOptions
1737
2042
  } = options;
2043
+ const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
2044
+ const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
2045
+ const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
2046
+ const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
2047
+ const showYMajorTicks = yAxisMajorTickVisibility === "show";
2048
+ const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
2049
+ const showYMinorTicks = yAxisMinorTickVisibility === "show";
2050
+ const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
2051
+ const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
2052
+ const showYAxisLine = yAxisLineVisibility === "show";
2053
+ const showY2AxisLine = y2AxisLineVisibility === "show";
2054
+ const yAxisMin = parseAxisValue(yAxisMinRaw);
2055
+ const yAxisMax = parseAxisValue(yAxisMaxRaw);
2056
+ const y2AxisMin = parseAxisValue(y2AxisMinRaw);
2057
+ const y2AxisMax = parseAxisValue(y2AxisMaxRaw);
2058
+ const parseTickInterval = (simpleXMLValue, canvasValue) => {
2059
+ if (simpleXMLValue) return Number(simpleXMLValue);
2060
+ if (canvasValue) return Number(canvasValue);
2061
+ return void 0;
2062
+ };
2063
+ const yAxisMajorTickIntervalNum = parseTickInterval(yAxisMajorUnitFromSimpleXML, yAxisMajorTickInterval);
2064
+ const y2AxisMajorTickIntervalNum = parseTickInterval(
2065
+ y2AxisMajorUnitFromSimpleXML,
2066
+ y2AxisMajorTickInterval
2067
+ );
2068
+ const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
2069
+ const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
2070
+ const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
2071
+ const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
2072
+ const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
1738
2073
  const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
1739
2074
  const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
2075
+ const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
2076
+ const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
2077
+ const legendLabels = parseArrayOption(legendLabelsStr);
2078
+ const bgColor = backgroundColor || bgColorFromOptions;
1740
2079
  const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
1741
2080
  const [containerHeight, setContainerHeight] = react_exports.useState(Number(props.height));
1742
2081
  const cachedHandleResize = react_exports.useCallback((w, h) => {
@@ -1747,31 +2086,64 @@ var TimeSeriesChartWrapper = (props) => {
1747
2086
  fields: chartData.fields,
1748
2087
  columns: chartData.seriesList
1749
2088
  });
1750
- const xField = getFieldName(filteredChartData.fields[0]);
2089
+ const xField = getFieldName2(filteredChartData.fields[0]);
1751
2090
  const yFields = getFieldNames(
1752
2091
  filteredChartData.fields.length > 1 ? filteredChartData.fields.slice(1) : []
1753
2092
  );
1754
- const y2Fields = y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [];
1755
- const overlayFields = overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [];
2093
+ const y2Fields = (0, react_exports.useMemo)(
2094
+ () => y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [],
2095
+ [y2FieldsStr]
2096
+ );
2097
+ const overlayFields = (0, react_exports.useMemo)(
2098
+ () => overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [],
2099
+ [overlayFieldsStr]
2100
+ );
1756
2101
  let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
1757
2102
  xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
1758
- let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFields, yAxisTitleVisibility);
2103
+ const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
2104
+ let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility);
1759
2105
  yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
1760
2106
  const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
1761
2107
  let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
1762
2108
  y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
1763
- const xScaleConfig = getXScaleConfig(xAxisTitle, xAxisLabelVisibility);
1764
- const yScaleConfig = getYScaleConfig(yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility);
1765
- let y2ScaleConfig = {};
1766
- if (y2Enabled) {
1767
- y2ScaleConfig = getY2ScaleConfig(
1768
- y2AxisTitle,
1769
- y2AxisAbbreviation,
1770
- y2AxisScale,
1771
- y2IntegerUnits,
1772
- y2AxisLabelVisibility
1773
- );
1774
- }
2109
+ const xScaleConfig = (0, react_exports.useMemo)(
2110
+ () => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
2111
+ [xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
2112
+ );
2113
+ const yScaleConfig = (0, react_exports.useMemo)(
2114
+ () => getYScaleConfig(
2115
+ yAxisTitle,
2116
+ yAxisAbbreviation,
2117
+ yAxisScale,
2118
+ yAxisLabelVisibility,
2119
+ yAxisMin,
2120
+ yAxisMax
2121
+ ),
2122
+ [yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax]
2123
+ );
2124
+ const y2ScaleConfig = (0, react_exports.useMemo)(() => {
2125
+ if (y2Enabled) {
2126
+ return getY2ScaleConfig(
2127
+ y2AxisTitle,
2128
+ y2AxisAbbreviation,
2129
+ y2AxisScale,
2130
+ y2IntegerUnits,
2131
+ y2AxisLabelVisibility,
2132
+ y2AxisMin,
2133
+ y2AxisMax
2134
+ );
2135
+ }
2136
+ return {};
2137
+ }, [
2138
+ y2Enabled,
2139
+ y2AxisTitle,
2140
+ y2AxisAbbreviation,
2141
+ y2AxisScale,
2142
+ y2IntegerUnits,
2143
+ y2AxisLabelVisibility,
2144
+ y2AxisMin,
2145
+ y2AxisMax
2146
+ ]);
1775
2147
  const uplotContainerElement = (0, react_exports.useRef)(null);
1776
2148
  const seriesDataFormatted = [
1777
2149
  filteredChartData.columns[0],
@@ -1787,9 +2159,25 @@ var TimeSeriesChartWrapper = (props) => {
1787
2159
  overlayFields,
1788
2160
  y2Enabled,
1789
2161
  nullValueMode,
1790
- markerDisplay
2162
+ markerDisplay,
2163
+ lineDashStyle,
2164
+ lineDashStylesByField,
2165
+ stepPosition,
2166
+ stepPositionsByField
1791
2167
  ),
1792
- [yFields, y2Fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay]
2168
+ [
2169
+ yFields,
2170
+ y2Fields,
2171
+ lineWidth,
2172
+ overlayFields,
2173
+ y2Enabled,
2174
+ nullValueMode,
2175
+ markerDisplay,
2176
+ lineDashStyle,
2177
+ lineDashStylesByField,
2178
+ stepPosition,
2179
+ stepPositionsByField
2180
+ ]
1793
2181
  );
1794
2182
  const chartingEventAnnotations = (0, react_exports.useMemo)(
1795
2183
  () => getAnnotationsForCanvas({
@@ -1803,25 +2191,59 @@ var TimeSeriesChartWrapper = (props) => {
1803
2191
  () => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
1804
2192
  [xScaleConfig, yScaleConfig, y2ScaleConfig]
1805
2193
  );
1806
- const legend = (0, react_exports.useMemo)(() => getLegend({ legendDisplay }), [legendDisplay]);
2194
+ const isSeriesCompare = legendMode === "seriesCompare";
2195
+ const legend = (0, react_exports.useMemo)(
2196
+ () => getLegend({
2197
+ legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
2198
+ isSeriesCompare,
2199
+ legendTruncation
2200
+ }),
2201
+ [legendDisplay, isSeriesCompare, legendTruncation]
2202
+ );
1807
2203
  const handleChartClick = react_exports.useCallback(
1808
2204
  (event) => {
1809
2205
  if (onClick) {
1810
- handleClick(event, onClick);
2206
+ handleClick(event, onClick, trellisKey, trellisSplitBy);
1811
2207
  }
1812
2208
  },
1813
- [onClick]
2209
+ [onClick, trellisKey, trellisSplitBy]
1814
2210
  );
1815
2211
  const handleChartLegendClick = react_exports.useCallback(
1816
2212
  (event) => {
1817
2213
  if (onClick) {
1818
- handleLegendClick(event, onClick);
2214
+ handleLegendClick(event, onClick, trellisKey, trellisSplitBy);
1819
2215
  }
1820
2216
  },
1821
- [onClick]
2217
+ [onClick, trellisKey, trellisSplitBy]
2218
+ );
2219
+ const handleChartRangeSelection = react_exports.useCallback(
2220
+ (range2) => {
2221
+ if (onSelect) {
2222
+ handleRangeSelection(range2, onSelect, chartData, trellisKey, trellisSplitBy);
2223
+ }
2224
+ },
2225
+ [onSelect, chartData, trellisKey, trellisSplitBy]
2226
+ );
2227
+ const handleChartRangeZoom = react_exports.useCallback(
2228
+ (range2) => {
2229
+ if (onSelect) {
2230
+ handleRangeZoom(range2, onSelect, chartData, trellisKey, trellisSplitBy);
2231
+ }
2232
+ },
2233
+ [onSelect, chartData, trellisKey, trellisSplitBy]
2234
+ );
2235
+ const xFieldToUse = xFieldFromProps || xField;
2236
+ const enableSearchZoom = react_exports.useMemo(
2237
+ () => shouldEnableSearchZoom(eventHandlers, xFieldToUse),
2238
+ [eventHandlers, xFieldToUse]
1822
2239
  );
1823
2240
  const lastPayloadRef = react_exports.useRef(null);
1824
2241
  const lastOriginalEventRef = react_exports.useRef(null);
2242
+ const previousMouseoverPayloadRef = react_exports.useRef(null);
2243
+ const additionalTooltipValuesRef = react_exports.useRef(additionalTooltipValues);
2244
+ react_exports.useEffect(() => {
2245
+ additionalTooltipValuesRef.current = additionalTooltipValues;
2246
+ }, [additionalTooltipValues]);
1825
2247
  const handleChartCrosshairChange = react_exports.useCallback(
1826
2248
  (event) => {
1827
2249
  if (onPointMouseOver || onPointMouseOut) {
@@ -1833,6 +2255,7 @@ var TimeSeriesChartWrapper = (props) => {
1833
2255
  payload: lastPayloadRef.current
1834
2256
  });
1835
2257
  }
2258
+ previousMouseoverPayloadRef.current = null;
1836
2259
  return;
1837
2260
  }
1838
2261
  const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
@@ -1840,25 +2263,36 @@ var TimeSeriesChartWrapper = (props) => {
1840
2263
  });
1841
2264
  delete payload.seriesKey;
1842
2265
  if (event.rowContext) {
1843
- Object.keys(event.rowContext).forEach((fieldName) => {
1844
- payload[`row.${fieldName}.value`] = event.rowContext[fieldName];
1845
- });
2266
+ Object.assign(
2267
+ payload,
2268
+ Object.keys(event.rowContext).reduce((acc, fieldName) => {
2269
+ acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
2270
+ return acc;
2271
+ }, {})
2272
+ );
2273
+ }
2274
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
2275
+ if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
2276
+ return;
1846
2277
  }
1847
- lastPayloadRef.current = payload;
2278
+ lastPayloadRef.current = updatedPayload;
1848
2279
  lastOriginalEventRef.current = event;
2280
+ previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
1849
2281
  if (onPointMouseOver) {
1850
2282
  onPointMouseOver({
1851
2283
  type: "point.mouseover",
1852
2284
  originalEvent: event,
1853
- payload
2285
+ payload: updatedPayload
1854
2286
  });
1855
2287
  }
1856
2288
  }
1857
2289
  },
1858
- [onPointMouseOver, onPointMouseOut]
2290
+ [onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
1859
2291
  );
1860
- const memoizedChart = (0, react_exports.useMemo)(
1861
- () => /* @__PURE__ */ react_exports.createElement(
2292
+ 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}`;
2293
+ const memoizedChart = (0, react_exports.useMemo)(() => {
2294
+ const computedOnRangeZoom = onSelect ? handleChartRangeZoom : void 0;
2295
+ return /* @__PURE__ */ react_exports.createElement(visualization_canvas_exports.RangeSelectionProvider, { key: dataKey }, /* @__PURE__ */ react_exports.createElement(
1862
2296
  visualization_canvas_exports.TimeSeriesChart,
1863
2297
  {
1864
2298
  data: chartData,
@@ -1868,49 +2302,121 @@ var TimeSeriesChartWrapper = (props) => {
1868
2302
  seriesColorsByField,
1869
2303
  seriesConfig: seriesOverrides,
1870
2304
  legend,
2305
+ legendLabels,
2306
+ legendTruncation,
2307
+ isSeriesCompare: legendMode === "seriesCompare",
2308
+ maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
1871
2309
  scaleConfig,
1872
2310
  timestampFormat: "expanded",
1873
2311
  onCrosshairClick: onClick ? handleChartClick : void 0,
1874
2312
  onCrosshairChange: onPointMouseOver || onPointMouseOut ? handleChartCrosshairChange : void 0,
1875
2313
  onSeriesClick: onClick ? handleChartLegendClick : void 0,
2314
+ onRangeSelection: handleChartRangeSelection,
2315
+ onRangeZoom: computedOnRangeZoom,
2316
+ serverSideZoom: enableSearchZoom,
1876
2317
  userLocale,
1877
2318
  events: chartingEventAnnotations,
1878
- eventsConfig: { renderer: triangleEventAnnotationRenderer }
2319
+ eventsConfig: { renderer: triangleEventAnnotationRenderer },
2320
+ additionalTooltipValuesRef,
2321
+ showXMajorGridLines,
2322
+ showYMajorGridLines,
2323
+ showY2MajorGridLines,
2324
+ showYMinorGridLines,
2325
+ showY2MinorGridLines,
2326
+ showLineSmoothing,
2327
+ dataValuesDisplay,
2328
+ showXMajorTicks,
2329
+ xAxisMajorTickSize: xAxisMajorTickSizeNum,
2330
+ showYMajorTicks,
2331
+ showY2MajorTicks,
2332
+ yAxisMajorTickSize: yAxisMajorTickSizeNum,
2333
+ y2AxisMajorTickSize: y2AxisMajorTickSizeNum,
2334
+ yAxisMajorTickInterval: yAxisMajorTickIntervalNum,
2335
+ y2AxisMajorTickInterval: y2AxisMajorTickIntervalNum,
2336
+ showYMinorTicks,
2337
+ showY2MinorTicks,
2338
+ yAxisMinorTickSize: yAxisMinorTickSizeNum,
2339
+ y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
2340
+ showYAxisWithZero,
2341
+ showY2AxisWithZero,
2342
+ showXAxisLine,
2343
+ showYAxisLine,
2344
+ showY2AxisLine,
2345
+ xAxisMaxLabelParts
1879
2346
  }
1880
- ),
1881
- [
1882
- chartData,
1883
- containerWidth,
1884
- containerHeight,
1885
- seriesColors,
1886
- seriesColorsByField,
1887
- seriesOverrides,
1888
- legend,
1889
- scaleConfig,
1890
- userLocale,
1891
- chartingEventAnnotations,
1892
- onClick,
1893
- handleChartClick,
1894
- onPointMouseOver,
1895
- onPointMouseOut,
1896
- handleChartCrosshairChange,
1897
- handleChartLegendClick
1898
- ]
1899
- );
2347
+ ));
2348
+ }, [
2349
+ onSelect,
2350
+ handleChartRangeZoom,
2351
+ dataKey,
2352
+ chartData,
2353
+ containerWidth,
2354
+ containerHeight,
2355
+ seriesColors,
2356
+ seriesColorsByField,
2357
+ seriesOverrides,
2358
+ legend,
2359
+ legendLabels,
2360
+ legendTruncation,
2361
+ scaleConfig,
2362
+ onClick,
2363
+ handleChartClick,
2364
+ onPointMouseOver,
2365
+ onPointMouseOut,
2366
+ handleChartCrosshairChange,
2367
+ handleChartLegendClick,
2368
+ handleChartRangeSelection,
2369
+ enableSearchZoom,
2370
+ userLocale,
2371
+ chartingEventAnnotations,
2372
+ showXMajorGridLines,
2373
+ showYMajorGridLines,
2374
+ showY2MajorGridLines,
2375
+ showYMinorGridLines,
2376
+ showY2MinorGridLines,
2377
+ showLineSmoothing,
2378
+ dataValuesDisplay,
2379
+ showXMajorTicks,
2380
+ xAxisMajorTickSizeNum,
2381
+ showYMajorTicks,
2382
+ showY2MajorTicks,
2383
+ yAxisMajorTickSizeNum,
2384
+ y2AxisMajorTickSizeNum,
2385
+ yAxisMajorTickIntervalNum,
2386
+ y2AxisMajorTickIntervalNum,
2387
+ showYMinorTicks,
2388
+ showY2MinorTicks,
2389
+ yAxisMinorTickSizeNum,
2390
+ y2AxisMinorTickSizeNum,
2391
+ showYAxisWithZero,
2392
+ showY2AxisWithZero,
2393
+ showXAxisLine,
2394
+ showYAxisLine,
2395
+ showY2AxisLine,
2396
+ legendMode,
2397
+ xAxisMaxLabelParts
2398
+ ]);
1900
2399
  const memoizedVisualization = (0, react_exports.useMemo)(() => {
1901
- return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor }, memoizedChart);
1902
- }, [backgroundColor, memoizedChart]);
1903
- return /* @__PURE__ */ react_exports.createElement(
2400
+ return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
2401
+ }, [bgColor, memoizedChart]);
2402
+ return /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, trellisEnabled && /* @__PURE__ */ react_exports.createElement(
2403
+ TrellisTitle,
2404
+ {
2405
+ trellisKey,
2406
+ backgroundColor: bgColor,
2407
+ fontColor: defaultFontColor
2408
+ }
2409
+ ), /* @__PURE__ */ react_exports.createElement(
1904
2410
  TimeSeriesChartContainer,
1905
2411
  {
1906
- height,
2412
+ height: trellisEnabled ? Number(height) - TRELLIS_TITLE_HEIGHT : height,
1907
2413
  width,
1908
2414
  ref: uplotContainerElement,
1909
2415
  "data-test": "timeseries-chart-wrapper"
1910
2416
  },
1911
2417
  /* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }),
1912
2418
  memoizedVisualization
1913
- );
2419
+ ));
1914
2420
  };
1915
2421
  var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
1916
2422
 
@@ -2205,21 +2711,58 @@ var config_exports = {};
2205
2711
  __export(config_exports, {
2206
2712
  default: () => config_default2
2207
2713
  });
2208
- var defaultImport32 = __toESM(require("@splunk/splunk-utils/config"));
2714
+ var defaultImport34 = __toESM(require("@splunk/splunk-utils/config"));
2209
2715
  __reExport(config_exports, require("@splunk/splunk-utils/config"));
2210
- var config_default2 = "default" in defaultImport32 ? defaultImport32.default : defaultImport32;
2716
+ var config_default2 = "default" in defaultImport34 ? defaultImport34.default : defaultImport34;
2211
2717
 
2212
2718
  // esm-externals:@splunk/themes
2213
2719
  var themes_exports = {};
2214
2720
  __export(themes_exports, {
2215
2721
  default: () => themes_default
2216
2722
  });
2217
- var defaultImport33 = __toESM(require("@splunk/themes"));
2723
+ var defaultImport35 = __toESM(require("@splunk/themes"));
2218
2724
  __reExport(themes_exports, require("@splunk/themes"));
2219
- var themes_default = "default" in defaultImport33 ? defaultImport33.default : defaultImport33;
2725
+ var themes_default = "default" in defaultImport35 ? defaultImport35.default : defaultImport35;
2220
2726
 
2221
- // src/common/utils/styleUtils.ts
2727
+ // src/common/utils/textUtils.ts
2222
2728
  var VIZ_FONT_FAMILY = "'Splunk Platform Sans', 'Splunk Data Sans', Roboto, Droid, 'Helvetica Neue', Helvetica, Arial, sans-serif";
2729
+ var truncateText = (text, maxWidth, truncationType, font = `10px ${VIZ_FONT_FAMILY}`) => {
2730
+ const canvas = document.createElement("canvas");
2731
+ const context = canvas.getContext("2d");
2732
+ if (!context) return text;
2733
+ context.font = font;
2734
+ const ellipsis = "...";
2735
+ const ellipsisWidth = context.measureText(ellipsis).width;
2736
+ const fullTextWidth = context.measureText(text).width;
2737
+ if (fullTextWidth <= maxWidth) {
2738
+ return text;
2739
+ }
2740
+ if (truncationType === "ellipsisEnd") {
2741
+ for (let i = text.length - 1; i > 0; i -= 1) {
2742
+ const truncatedText = text.slice(0, i) + ellipsis;
2743
+ if (context.measureText(truncatedText).width <= maxWidth) {
2744
+ return truncatedText;
2745
+ }
2746
+ }
2747
+ } else if (truncationType === "ellipsisStart") {
2748
+ for (let i = 0; i < text.length; i += 1) {
2749
+ const truncatedText = ellipsis + text.slice(i);
2750
+ if (context.measureText(truncatedText).width <= maxWidth) {
2751
+ return truncatedText;
2752
+ }
2753
+ }
2754
+ } else if (truncationType === "ellipsisMiddle") {
2755
+ for (let i = 0; i < text.length / 2; i += 1) {
2756
+ const left = text.slice(0, Math.floor(text.length / 2) - i);
2757
+ const right = text.slice(Math.ceil(text.length / 2) + i);
2758
+ const truncatedText = left + ellipsis + right;
2759
+ if (context.measureText(left).width + ellipsisWidth + context.measureText(right).width <= maxWidth) {
2760
+ return truncatedText;
2761
+ }
2762
+ }
2763
+ }
2764
+ return ellipsis;
2765
+ };
2223
2766
 
2224
2767
  // src/Timeline/PureTimeline/src/utils/timelineUtils.ts
2225
2768
  function hexToRgba(hex, opacity = 1) {
@@ -2253,6 +2796,33 @@ function getAlternateColor(hex, percent) {
2253
2796
  const bLight = lighten(b);
2254
2797
  return `rgba(${rLight}, ${gLight}, ${bLight}, 1)`;
2255
2798
  }
2799
+ function assignCategoryColor(categoryValue, categoricalColors, seriesColors, defaultColor) {
2800
+ if (categoryValue && !categoricalColors.has(categoryValue)) {
2801
+ const colorIndex = categoricalColors.size;
2802
+ const colors = Array.isArray(seriesColors) ? seriesColors : [];
2803
+ const assignedColor = colors[colorIndex % colors.length] || defaultColor;
2804
+ categoricalColors.set(categoryValue, assignedColor);
2805
+ }
2806
+ }
2807
+ function getEventColor(dataColors, index, categoryValue, categoricalColors, defaultColor) {
2808
+ const colors = Array.isArray(dataColors) ? dataColors : [];
2809
+ if (colors.length > 0) {
2810
+ return colors[index] || defaultColor;
2811
+ }
2812
+ if (categoryValue) {
2813
+ return categoricalColors.get(categoryValue) || defaultColor;
2814
+ }
2815
+ return defaultColor;
2816
+ }
2817
+ function updateTimeDifferences(timeDifferences, lastValidStart, currentStart) {
2818
+ if (lastValidStart !== null && !Number.isNaN(currentStart)) {
2819
+ const timeDiff = currentStart - lastValidStart;
2820
+ if (!Number.isNaN(timeDiff)) {
2821
+ timeDifferences.push(timeDiff);
2822
+ }
2823
+ }
2824
+ return !Number.isNaN(currentStart) ? currentStart : lastValidStart;
2825
+ }
2256
2826
  var toTimestamp = (dateStr, timezone = {}) => {
2257
2827
  try {
2258
2828
  let dateTime;
@@ -2294,22 +2864,19 @@ function mapDataToTimeline(mapDataToTimelineType) {
2294
2864
  const lanesSet = /* @__PURE__ */ new Set();
2295
2865
  const laneSeriesMap = /* @__PURE__ */ new Map();
2296
2866
  const timeDifferences = [];
2867
+ let lastValidStart = null;
2868
+ if (!x || !y || !Array.isArray(x) || !Array.isArray(y)) {
2869
+ return { laneSeries: [], lanes: [], categoricalColors, tickInterval: "1mo", hasInvalidData: true };
2870
+ }
2297
2871
  for (let i = 0; i < Math.min(x.length, resultLimit); i += 1) {
2298
2872
  const lane = y[i];
2873
+ if (lane === void 0 || lane === null || typeof lane === "object") {
2874
+ continue;
2875
+ }
2299
2876
  lanesSet.add(lane);
2300
- let color = defaultColor;
2301
2877
  const categoryValue = ((_a = category[i]) == null ? void 0 : _a.toString()) || null;
2302
- if (categoryValue && !categoricalColors.has(categoryValue)) {
2303
- const colorIndex = categoricalColors.size;
2304
- const assignedColor = seriesColors[colorIndex % seriesColors.length] || defaultColor;
2305
- categoricalColors.set(categoryValue, assignedColor);
2306
- }
2307
- if (dataColors && (dataColors == null ? void 0 : dataColors.length) > 0) {
2308
- const assignedDataColor = dataColors[i];
2309
- color = assignedDataColor || defaultColor;
2310
- } else if (categoryValue) {
2311
- color = categoricalColors.get(categoryValue);
2312
- }
2878
+ assignCategoryColor(categoryValue, categoricalColors, seriesColors, defaultColor);
2879
+ const color = getEventColor(dataColors, i, categoryValue, categoricalColors, defaultColor);
2313
2880
  const start = toTimestamp(x[i].toString(), timezone);
2314
2881
  const durationValue = duration[i] || 0;
2315
2882
  const end = start + durationValue;
@@ -2326,11 +2893,7 @@ function mapDataToTimeline(mapDataToTimelineType) {
2326
2893
  color,
2327
2894
  additionalTooltipValue
2328
2895
  });
2329
- if (i > 0) {
2330
- const prevStart = toTimestamp(x[i - 1].toString(), timezone);
2331
- const timeDiff = start - prevStart;
2332
- timeDifferences.push(timeDiff);
2333
- }
2896
+ lastValidStart = updateTimeDifferences(timeDifferences, lastValidStart, start);
2334
2897
  }
2335
2898
  const lanes = Array.from(lanesSet);
2336
2899
  const laneSeries = lanes.map((lane) => {
@@ -2347,72 +2910,21 @@ function mapDataToTimeline(mapDataToTimelineType) {
2347
2910
  return { laneSeries, lanes, categoricalColors, tickInterval };
2348
2911
  }
2349
2912
  var drawRoundedRect = (ctx, x, y, width, height, radius) => {
2913
+ const r = Math.min(radius, width / 2, height / 2);
2350
2914
  ctx.beginPath();
2351
- ctx.moveTo(x + radius, y);
2352
- ctx.lineTo(x + width - radius, y);
2353
- ctx.quadraticCurveTo(x + width, y, x + width, y + radius);
2354
- ctx.lineTo(x + width, y + height - radius);
2355
- ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height);
2356
- ctx.lineTo(x + radius, y + height);
2357
- ctx.quadraticCurveTo(x, y + height, x, y + height - radius);
2358
- ctx.lineTo(x, y + radius);
2359
- ctx.quadraticCurveTo(x, y, x + radius, y);
2915
+ ctx.moveTo(x + r, y);
2916
+ ctx.lineTo(x + width - r, y);
2917
+ ctx.quadraticCurveTo(x + width, y, x + width, y + r);
2918
+ ctx.lineTo(x + width, y + height - r);
2919
+ ctx.quadraticCurveTo(x + width, y + height, x + width - r, y + height);
2920
+ ctx.lineTo(x + r, y + height);
2921
+ ctx.quadraticCurveTo(x, y + height, x, y + height - r);
2922
+ ctx.lineTo(x, y + r);
2923
+ ctx.quadraticCurveTo(x, y, x + r, y);
2360
2924
  ctx.closePath();
2361
2925
  ctx.fill();
2362
2926
  ctx.stroke();
2363
2927
  };
2364
- var truncators = {
2365
- ellipsisEnd: ({ context, ellipsis, maxWidth, text }) => {
2366
- for (let i = text.length - 1; i > 0; i -= 1) {
2367
- const truncatedText = text.slice(0, i) + ellipsis;
2368
- if (context.measureText(truncatedText).width <= maxWidth) {
2369
- return truncatedText;
2370
- }
2371
- }
2372
- return null;
2373
- },
2374
- ellipsisStart: ({ context, ellipsis, maxWidth, text }) => {
2375
- for (let i = 0; i < text.length; i += 1) {
2376
- const truncatedText = ellipsis + text.slice(i);
2377
- if (context.measureText(truncatedText).width <= maxWidth) {
2378
- return truncatedText;
2379
- }
2380
- }
2381
- return null;
2382
- },
2383
- ellipsisMiddle: ({ context, ellipsis, ellipsisWidth, maxWidth, text }) => {
2384
- const halfLength = text.length / 2;
2385
- for (let i = 0; i < halfLength; i += 1) {
2386
- const left = text.slice(0, Math.floor(halfLength) - i);
2387
- const right = text.slice(Math.ceil(halfLength) + i);
2388
- if (context.measureText(left).width + ellipsisWidth + context.measureText(right).width <= maxWidth) {
2389
- return `${left}${ellipsis}${right}`;
2390
- }
2391
- }
2392
- return null;
2393
- }
2394
- };
2395
- var truncateText = (text, maxWidth, truncationType, font = `10px ${VIZ_FONT_FAMILY}`) => {
2396
- var _a;
2397
- const canvas = document.createElement("canvas");
2398
- const context = canvas.getContext("2d");
2399
- if (!context) return text;
2400
- context.font = font;
2401
- const ellipsis = "...";
2402
- const ellipsisWidth = context.measureText(ellipsis).width;
2403
- if (context.measureText(text).width <= maxWidth) {
2404
- return text;
2405
- }
2406
- const params = {
2407
- ellipsis,
2408
- ellipsisWidth,
2409
- maxWidth,
2410
- text,
2411
- context
2412
- };
2413
- const truncated = (_a = truncators[truncationType]) == null ? void 0 : _a.call(truncators, params);
2414
- return truncated != null ? truncated : ellipsis;
2415
- };
2416
2928
  var getTickInterval = (averageDiff) => {
2417
2929
  if (averageDiff < 6e4) {
2418
2930
  return "1s";
@@ -2508,18 +3020,18 @@ var uplot_react_exports = {};
2508
3020
  __export(uplot_react_exports, {
2509
3021
  default: () => uplot_react_default
2510
3022
  });
2511
- var defaultImport34 = __toESM(require("uplot-react"));
3023
+ var defaultImport36 = __toESM(require("uplot-react"));
2512
3024
  __reExport(uplot_react_exports, require("uplot-react"));
2513
- var uplot_react_default = "default" in defaultImport34 ? defaultImport34.default : defaultImport34;
3025
+ var uplot_react_default = "default" in defaultImport36 ? defaultImport36.default : defaultImport36;
2514
3026
 
2515
3027
  // esm-externals:@splunk/visualization-context/ZoomContext
2516
3028
  var ZoomContext_exports = {};
2517
3029
  __export(ZoomContext_exports, {
2518
3030
  default: () => ZoomContext_default
2519
3031
  });
2520
- var defaultImport35 = __toESM(require("@splunk/visualization-context/ZoomContext"));
3032
+ var defaultImport37 = __toESM(require("@splunk/visualization-context/ZoomContext"));
2521
3033
  __reExport(ZoomContext_exports, require("@splunk/visualization-context/ZoomContext"));
2522
- var ZoomContext_default = "default" in defaultImport35 ? defaultImport35.default : defaultImport35;
3034
+ var ZoomContext_default = "default" in defaultImport37 ? defaultImport37.default : defaultImport37;
2523
3035
 
2524
3036
  // src/Timeline/PureTimeline/src/CursorPlugin.tsx
2525
3037
  var FIXED_LANE_HEIGHT = 32;
@@ -2568,21 +3080,16 @@ var CursorPlugin = (props) => {
2568
3080
  init: (u) => {
2569
3081
  const chartContainer = u.root;
2570
3082
  chartContainer.addEventListener("click", handleClick2);
2571
- const pointerLeaveHandler = (e) => {
3083
+ const pointerExitHandler = (e) => {
2572
3084
  if (!chartContainer.contains(e.relatedTarget)) {
2573
3085
  handleMouseLeave(u);
2574
3086
  }
2575
3087
  };
2576
- chartContainer.addEventListener("pointerleave", pointerLeaveHandler);
2577
- const pointerOutHandler = (e) => {
2578
- if (!chartContainer.contains(e.relatedTarget)) {
2579
- handleMouseLeave(u);
2580
- }
2581
- };
2582
- document.addEventListener("pointerout", pointerOutHandler, true);
3088
+ chartContainer.addEventListener("pointerleave", pointerExitHandler);
3089
+ document.addEventListener("pointerout", pointerExitHandler, true);
2583
3090
  return () => {
2584
- chartContainer.removeEventListener("pointerleave", pointerLeaveHandler);
2585
- document.removeEventListener("pointerout", pointerOutHandler, true);
3091
+ chartContainer.removeEventListener("pointerleave", pointerExitHandler);
3092
+ document.removeEventListener("pointerout", pointerExitHandler, true);
2586
3093
  chartContainer.removeEventListener("click", handleClick2);
2587
3094
  };
2588
3095
  },
@@ -2894,7 +3401,7 @@ var TimelinePlugin = ({
2894
3401
  const FIXED_LANE_HEIGHT2 = 32;
2895
3402
  const AXIS_COLOR = backgroundColor;
2896
3403
  const ALTERNATE_COLOR = getAlternateColor(backgroundColor, 0.1);
2897
- const MIN_BAR_WIDTH2 = 20;
3404
+ const MIN_BAR_WIDTH2 = 1;
2898
3405
  const LANE_SCALE_FACTOR = 0.85;
2899
3406
  let dpr = window.devicePixelRatio || 1;
2900
3407
  const redrawChart = (u) => {
@@ -2960,6 +3467,13 @@ var TimelinePlugin = ({
2960
3467
  ctx.strokeStyle = strokeColor;
2961
3468
  ctx.lineWidth = 1;
2962
3469
  ctx.stroke();
3470
+ } else if (barWidth <= 1) {
3471
+ ctx.beginPath();
3472
+ ctx.moveTo(xStart, yBarTop);
3473
+ ctx.lineTo(xStart, yBarTop + barHeight);
3474
+ ctx.strokeStyle = strokeColor;
3475
+ ctx.lineWidth = 1;
3476
+ ctx.stroke();
2963
3477
  } else {
2964
3478
  ctx.fillStyle = fillColor;
2965
3479
  ctx.strokeStyle = strokeColor;
@@ -3140,6 +3654,9 @@ var TimelineYAxis = ({
3140
3654
  const theme = (0, themes_exports.useSplunkTheme)();
3141
3655
  const lanePadding = 16;
3142
3656
  return /* @__PURE__ */ react_exports.createElement(YAxisContainer, { "data-test": "timeline-yaxis-container", height, width: yAxisLabelWidth }, lanes.map((lane, index) => {
3657
+ if (lane === void 0 || lane === null || typeof lane === "object") {
3658
+ return null;
3659
+ }
3143
3660
  let laneTextColor = theme.contentColorDefault;
3144
3661
  const isHovering = highlightedLane !== null;
3145
3662
  const isMuted = highlightedLane !== lane;
@@ -3317,9 +3834,9 @@ var useSplunkTheme_exports = {};
3317
3834
  __export(useSplunkTheme_exports, {
3318
3835
  default: () => useSplunkTheme_default
3319
3836
  });
3320
- var defaultImport36 = __toESM(require("@splunk/themes/useSplunkTheme"));
3837
+ var defaultImport38 = __toESM(require("@splunk/themes/useSplunkTheme"));
3321
3838
  __reExport(useSplunkTheme_exports, require("@splunk/themes/useSplunkTheme"));
3322
- var useSplunkTheme_default = "default" in defaultImport36 ? defaultImport36.default : defaultImport36;
3839
+ var useSplunkTheme_default = "default" in defaultImport38 ? defaultImport38.default : defaultImport38;
3323
3840
 
3324
3841
  // src/Timeline/PureTimeline/src/TimelineTooltip.tsx
3325
3842
  var TooltipContainer = styled_components_default.div`
@@ -3409,9 +3926,9 @@ var uPlot_min_exports = {};
3409
3926
  __export(uPlot_min_exports, {
3410
3927
  default: () => uPlot_min_default
3411
3928
  });
3412
- var defaultImport37 = __toESM(require("uplot/dist/uPlot.min.css"));
3929
+ var defaultImport39 = __toESM(require("uplot/dist/uPlot.min.css"));
3413
3930
  __reExport(uPlot_min_exports, require("uplot/dist/uPlot.min.css"));
3414
- var uPlot_min_default = "default" in defaultImport37 ? defaultImport37.default : defaultImport37;
3931
+ var uPlot_min_default = "default" in defaultImport39 ? defaultImport39.default : defaultImport39;
3415
3932
 
3416
3933
  // src/Timeline/PureTimeline/src/TimelineUplot.tsx
3417
3934
  var TimelineUplotContainer = styled_components_default.div`
@@ -3644,7 +4161,7 @@ var PureTimeline = (_a) => {
3644
4161
  const showLegend = (!dataColors || (dataColors == null ? void 0 : dataColors.length) === 0) && (category == null ? void 0 : category.length) > 0 && (legendDisplay === "right" || legendDisplay === "bottom");
3645
4162
  const timezone = react_exports.useContext(TimezoneContext_default);
3646
4163
  const theme = (0, themes_exports.useSplunkTheme)();
3647
- const { laneSeries, lanes, categoricalColors, tickInterval } = mapDataToTimeline({
4164
+ const { laneSeries, lanes, categoricalColors, tickInterval, hasInvalidData } = mapDataToTimeline({
3648
4165
  resultLimit,
3649
4166
  x,
3650
4167
  y,
@@ -3655,6 +4172,27 @@ var PureTimeline = (_a) => {
3655
4172
  additionalTooltipValues,
3656
4173
  timezone
3657
4174
  });
4175
+ if (hasInvalidData) {
4176
+ return /* @__PURE__ */ react_exports.createElement(
4177
+ TimelineContainer,
4178
+ {
4179
+ "data-test": "timeline-container",
4180
+ backgroundColor: backgroundColor || theme.backgroundColorPage,
4181
+ width,
4182
+ height,
4183
+ "data-test-data-colors": JSON.stringify(dataColors)
4184
+ },
4185
+ /* @__PURE__ */ react_exports.createElement(
4186
+ Message_default,
4187
+ {
4188
+ width,
4189
+ height,
4190
+ level: "error",
4191
+ message: "Incompatible data format. Please check your data source configuration."
4192
+ }
4193
+ )
4194
+ );
4195
+ }
3658
4196
  const handleLaneClick = (laneValue) => {
3659
4197
  onLaneClick({
3660
4198
  type: "lane.click",