@splunk/visualizations 28.6.0 → 28.8.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 (501) hide show
  1. package/Area.js +2 -2
  2. package/Area.js.map +2 -2
  3. package/Bar.js +2 -2
  4. package/Bar.js.map +2 -2
  5. package/Bubble.js +2 -2
  6. package/Bubble.js.map +2 -2
  7. package/CHANGELOG.external.md +45 -50
  8. package/ChoroplethSvg.js +2 -2
  9. package/ChoroplethSvg.js.map +2 -2
  10. package/Column.js +2 -2
  11. package/Column.js.map +2 -2
  12. package/Ellipse.js +2 -2
  13. package/Ellipse.js.map +2 -2
  14. package/Events/PureEvents/FieldSummaryTooltip.d.ts +8 -31
  15. package/Events/PureEvents/FieldSummaryTooltip.d.ts.map +1 -1
  16. package/Events/PureEvents/PureEvents.d.ts.map +1 -1
  17. package/Events/PureEvents/TimeControlsPopover.d.ts +6 -25
  18. package/Events/PureEvents/TimeControlsPopover.d.ts.map +1 -1
  19. package/Events.js +27 -101
  20. package/Events.js.map +2 -2
  21. package/FillerGauge.js +10 -5
  22. package/FillerGauge.js.map +2 -2
  23. package/Image.js +2 -2
  24. package/Image.js.map +2 -2
  25. package/Line.js +2 -2
  26. package/Line.js.map +2 -2
  27. package/LinkGraph.js +2 -2
  28. package/LinkGraph.js.map +2 -2
  29. package/Map/Map.d.ts +1 -0
  30. package/Map/Map.d.ts.map +1 -1
  31. package/Map/PureMap/BubbleLayer.d.ts +22 -4
  32. package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
  33. package/Map/PureMap/ChoroplethLayer.d.ts +9 -1
  34. package/Map/PureMap/ChoroplethLayer.d.ts.map +1 -1
  35. package/Map/PureMap/ClusterLayer.d.ts +3 -1
  36. package/Map/PureMap/ClusterLayer.d.ts.map +1 -1
  37. package/Map/PureMap/LocalChoroplethLayer.d.ts +1 -0
  38. package/Map/PureMap/LocalChoroplethLayer.d.ts.map +1 -1
  39. package/Map/PureMap/MapContext.d.ts +13 -0
  40. package/Map/PureMap/MapContext.d.ts.map +1 -0
  41. package/Map/PureMap/MarkerLayer.d.ts +19 -2
  42. package/Map/PureMap/MarkerLayer.d.ts.map +1 -1
  43. package/Map/PureMap/MarkerWrapper.d.ts +3 -2
  44. package/Map/PureMap/MarkerWrapper.d.ts.map +1 -1
  45. package/Map/PureMap/PureMap.d.ts +1 -0
  46. package/Map/PureMap/PureMap.d.ts.map +1 -1
  47. package/Map/PureMap/PureMapContainer.d.ts.map +1 -1
  48. package/Map/PureMap/Tooltip.d.ts +6 -1
  49. package/Map/PureMap/Tooltip.d.ts.map +1 -1
  50. package/Map/PureMap/keyboardConstants.d.ts +11 -0
  51. package/Map/PureMap/keyboardConstants.d.ts.map +1 -0
  52. package/Map/PureMap/useRovingTabindex.d.ts +18 -0
  53. package/Map/PureMap/useRovingTabindex.d.ts.map +1 -0
  54. package/Map.js +1317 -478
  55. package/Map.js.map +4 -4
  56. package/Markdown/Markdown.d.ts.map +1 -1
  57. package/Markdown.config.js +1 -1
  58. package/Markdown.config.js.map +1 -1
  59. package/Markdown.js +24 -7
  60. package/Markdown.js.map +2 -2
  61. package/MarkerGauge.js +10 -5
  62. package/MarkerGauge.js.map +2 -2
  63. package/NetworkGraph/NetworkGraph.d.ts +2 -5
  64. package/NetworkGraph/NetworkGraph.d.ts.map +1 -1
  65. package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts.map +1 -1
  66. package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts +1 -0
  67. package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts.map +1 -1
  68. package/NetworkGraph/PureNetworkGraph/components/Node.d.ts +1 -0
  69. package/NetworkGraph/PureNetworkGraph/components/Node.d.ts.map +1 -1
  70. package/NetworkGraph/PureNetworkGraph/components/Tooltip.d.ts +1 -1
  71. package/NetworkGraph/PureNetworkGraph/components/Tooltip.d.ts.map +1 -1
  72. package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts +1 -0
  73. package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts.map +1 -1
  74. package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts +23 -0
  75. package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -1
  76. package/NetworkGraph.config.js +2 -0
  77. package/NetworkGraph.config.js.map +2 -2
  78. package/NetworkGraph.js +353 -40
  79. package/NetworkGraph.js.map +4 -4
  80. package/ParallelCoordinates.js +2 -2
  81. package/ParallelCoordinates.js.map +2 -2
  82. package/Pie.js +2 -2
  83. package/Pie.js.map +2 -2
  84. package/ProcessTree/ProcessTree.d.ts +3 -1
  85. package/ProcessTree/ProcessTree.d.ts.map +1 -1
  86. package/ProcessTree/PureProcessTree/PureProcessTree.d.ts +1 -0
  87. package/ProcessTree/PureProcessTree/PureProcessTree.d.ts.map +1 -1
  88. package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts +2 -0
  89. package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts.map +1 -1
  90. package/ProcessTree/PureProcessTree/components/ProcessTreeRightPanel.d.ts.map +1 -1
  91. package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts +3 -1
  92. package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts.map +1 -1
  93. package/ProcessTree/PureProcessTree/mockdata/data.d.ts.map +1 -1
  94. package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts +3 -1
  95. package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts.map +1 -1
  96. package/ProcessTree.js +101 -31
  97. package/ProcessTree.js.map +3 -3
  98. package/Punchcard.js +2 -2
  99. package/Punchcard.js.map +2 -2
  100. package/README.md +2 -0
  101. package/Rectangle.js +2 -2
  102. package/Rectangle.js.map +2 -2
  103. package/RichText/PureRichText/Editor/EditorPanel.d.ts.map +1 -1
  104. package/RichText/PureRichText/InnerEditor.d.ts +10 -0
  105. package/RichText/PureRichText/InnerEditor.d.ts.map +1 -1
  106. package/RichText/PureRichText/PureRichText.d.ts +17 -0
  107. package/RichText/PureRichText/PureRichText.d.ts.map +1 -1
  108. package/RichText/PureRichText/PureRichTextContext.d.ts.map +1 -1
  109. package/RichText/PureRichText/hooks/useContentSave.d.ts +6 -0
  110. package/RichText/PureRichText/hooks/useContentSave.d.ts.map +1 -1
  111. package/RichText/PureRichText/hooks/useContentSync.d.ts +13 -1
  112. package/RichText/PureRichText/hooks/useContentSync.d.ts.map +1 -1
  113. package/RichText/PureRichText/hooks/useDashboardKeyboardNav.d.ts.map +1 -1
  114. package/RichText/PureRichText/hooks/useEditorSetup.d.ts.map +1 -1
  115. package/RichText/PureRichText/hooks/useFakeHighlight.d.ts +1 -16
  116. package/RichText/PureRichText/hooks/useFakeHighlight.d.ts.map +1 -1
  117. package/RichText/PureRichText/hooks/useTokenMap.d.ts +37 -35
  118. package/RichText/PureRichText/hooks/useTokenMap.d.ts.map +1 -1
  119. package/RichText/PureRichText/renderers/LeafRenderer.d.ts +0 -4
  120. package/RichText/PureRichText/renderers/LeafRenderer.d.ts.map +1 -1
  121. package/RichText/PureRichText/types.d.ts +15 -0
  122. package/RichText/PureRichText/types.d.ts.map +1 -1
  123. package/RichText/PureRichText/utils/slateUtils.d.ts.map +1 -1
  124. package/RichText/RichText.d.ts +2 -0
  125. package/RichText/RichText.d.ts.map +1 -1
  126. package/RichText/config.d.ts.map +1 -1
  127. package/RichText.config.js +14 -1
  128. package/RichText.config.js.map +2 -2
  129. package/RichText.js +733 -263
  130. package/RichText.js.map +4 -4
  131. package/Sankey.js +2 -2
  132. package/Sankey.js.map +2 -2
  133. package/Scatter.js +2 -2
  134. package/Scatter.js.map +2 -2
  135. package/SingleValue.js +368 -471
  136. package/SingleValue.js.map +4 -4
  137. package/SingleValueIcon.js +2 -2
  138. package/SingleValueIcon.js.map +2 -2
  139. package/SingleValueRadial.js +2 -2
  140. package/SingleValueRadial.js.map +2 -2
  141. package/SparkLine/SparkLine.d.ts +57 -0
  142. package/SparkLine/SparkLine.d.ts.map +1 -0
  143. package/SparkLine/index.d.ts +1 -1
  144. package/SparkLine/index.d.ts.map +1 -1
  145. package/SparkLine.js +384 -485
  146. package/SparkLine.js.map +4 -4
  147. package/Table/PureTable.d.ts +2 -0
  148. package/Table/PureTable.d.ts.map +1 -1
  149. package/Table/config.d.ts.map +1 -1
  150. package/Table/hooks.d.ts +1 -1
  151. package/Table/hooks.d.ts.map +1 -1
  152. package/Table.config.js +7 -0
  153. package/Table.config.js.map +2 -2
  154. package/Table.js +480 -500
  155. package/Table.js.map +4 -4
  156. package/Timeline/PureTimeline/PureTimeline.d.ts +6 -5
  157. package/Timeline/PureTimeline/PureTimeline.d.ts.map +1 -1
  158. package/Timeline/PureTimeline/src/CursorPlugin.d.ts +1 -0
  159. package/Timeline/PureTimeline/src/CursorPlugin.d.ts.map +1 -1
  160. package/Timeline/PureTimeline/src/TimelineLegend.d.ts +10 -7
  161. package/Timeline/PureTimeline/src/TimelineLegend.d.ts.map +1 -1
  162. package/Timeline/PureTimeline/src/TimelineTooltip.d.ts +5 -1
  163. package/Timeline/PureTimeline/src/TimelineTooltip.d.ts.map +1 -1
  164. package/Timeline/PureTimeline/src/TimelineUplot.d.ts +19 -2
  165. package/Timeline/PureTimeline/src/TimelineUplot.d.ts.map +1 -1
  166. package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
  167. package/Timeline/PureTimeline/src/XAxisPlugin.d.ts +1 -0
  168. package/Timeline/PureTimeline/src/XAxisPlugin.d.ts.map +1 -1
  169. package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +8 -0
  170. package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
  171. package/Timeline.js +449 -211
  172. package/Timeline.js.map +4 -4
  173. package/Treemap/PureTreemap/components/PureTreemap.d.ts +42 -0
  174. package/Treemap/PureTreemap/components/PureTreemap.d.ts.map +1 -0
  175. package/Treemap/PureTreemap/components/TreemapBreadcrumb.d.ts +10 -0
  176. package/Treemap/PureTreemap/components/TreemapBreadcrumb.d.ts.map +1 -0
  177. package/Treemap/PureTreemap/components/TreemapChildCell.d.ts +28 -0
  178. package/Treemap/PureTreemap/components/TreemapChildCell.d.ts.map +1 -0
  179. package/Treemap/PureTreemap/components/TreemapHeader.d.ts +19 -0
  180. package/Treemap/PureTreemap/components/TreemapHeader.d.ts.map +1 -0
  181. package/Treemap/PureTreemap/components/TreemapHoverTarget.d.ts +17 -0
  182. package/Treemap/PureTreemap/components/TreemapHoverTarget.d.ts.map +1 -0
  183. package/Treemap/PureTreemap/components/TreemapLegend.d.ts +20 -0
  184. package/Treemap/PureTreemap/components/TreemapLegend.d.ts.map +1 -0
  185. package/Treemap/PureTreemap/components/TreemapNode.d.ts +5 -0
  186. package/Treemap/PureTreemap/components/TreemapNode.d.ts.map +1 -0
  187. package/Treemap/PureTreemap/components/TreemapParentNode.d.ts +10 -0
  188. package/Treemap/PureTreemap/components/TreemapParentNode.d.ts.map +1 -0
  189. package/Treemap/PureTreemap/components/TreemapStandaloneNode.d.ts +6 -0
  190. package/Treemap/PureTreemap/components/TreemapStandaloneNode.d.ts.map +1 -0
  191. package/Treemap/PureTreemap/components/TreemapTooltip.d.ts +17 -0
  192. package/Treemap/PureTreemap/components/TreemapTooltip.d.ts.map +1 -0
  193. package/Treemap/PureTreemap/mockdata/data.d.ts +90 -0
  194. package/Treemap/PureTreemap/mockdata/data.d.ts.map +1 -0
  195. package/Treemap/PureTreemap/utils/treemapColorUtils.d.ts +67 -0
  196. package/Treemap/PureTreemap/utils/treemapColorUtils.d.ts.map +1 -0
  197. package/Treemap/PureTreemap/utils/treemapDataColorUtils.d.ts +5 -0
  198. package/Treemap/PureTreemap/utils/treemapDataColorUtils.d.ts.map +1 -0
  199. package/Treemap/PureTreemap/utils/treemapDataUtils.d.ts +14 -0
  200. package/Treemap/PureTreemap/utils/treemapDataUtils.d.ts.map +1 -0
  201. package/Treemap/PureTreemap/utils/treemapLayout.d.ts +49 -0
  202. package/Treemap/PureTreemap/utils/treemapLayout.d.ts.map +1 -0
  203. package/Treemap/PureTreemap/utils/treemapNodeUtils.d.ts +81 -0
  204. package/Treemap/PureTreemap/utils/treemapNodeUtils.d.ts.map +1 -0
  205. package/Treemap/PureTreemap/utils/treemapTypes.d.ts +37 -0
  206. package/Treemap/PureTreemap/utils/treemapTypes.d.ts.map +1 -0
  207. package/Treemap/PureTreemap/utils/treemapUtils.d.ts +76 -0
  208. package/Treemap/PureTreemap/utils/treemapUtils.d.ts.map +1 -0
  209. package/Treemap/Treemap.d.ts +12 -0
  210. package/Treemap/Treemap.d.ts.map +1 -0
  211. package/Treemap/config.d.ts +4 -0
  212. package/Treemap/config.d.ts.map +1 -0
  213. package/Treemap/index.d.ts +3 -0
  214. package/Treemap/index.d.ts.map +1 -0
  215. package/Treemap.config.js +465 -0
  216. package/Treemap.config.js.map +7 -0
  217. package/Treemap.js +6233 -0
  218. package/Treemap.js.map +7 -0
  219. package/common/DocExampleWithVizSandbox.js.map +2 -2
  220. package/common/GaugeMajorTicks.js.map +2 -2
  221. package/common/GaugeValueMarker.js +1 -0
  222. package/common/GaugeValueMarker.js.map +2 -2
  223. package/common/OptionsDoc.js.map +1 -1
  224. package/common/OverviewDoc.js.map +2 -2
  225. package/common/docUtils.d.ts.map +1 -1
  226. package/common/docUtils.js +1 -8
  227. package/common/docUtils.js.map +2 -2
  228. package/common/gaugeUtils.d.ts.map +1 -1
  229. package/common/gaugeUtils.js +7 -3
  230. package/common/gaugeUtils.js.map +2 -2
  231. package/common/hocs/FixedSizeContainer.d.ts.map +1 -1
  232. package/common/hooks/useDynamicHeight.d.ts +67 -0
  233. package/common/hooks/useDynamicHeight.d.ts.map +1 -0
  234. package/common/interfaces/VizCategory.d.ts +2 -1
  235. package/common/interfaces/VizCategory.d.ts.map +1 -1
  236. package/common/utils/mapUtils.js +512 -179
  237. package/common/utils/mapUtils.js.map +4 -4
  238. package/common/utils/shadowDomUtils.d.ts +2 -0
  239. package/common/utils/shadowDomUtils.d.ts.map +1 -0
  240. package/common/utils/shadowDomUtils.js +39 -0
  241. package/common/utils/shadowDomUtils.js.map +7 -0
  242. package/common/withDashboardViz.js +2 -2
  243. package/common/withDashboardViz.js.map +2 -2
  244. package/docs-llm/INDEX.md +119 -0
  245. package/docs-llm/area/examples-json.md +3854 -0
  246. package/docs-llm/area/examples-react.md +2816 -0
  247. package/docs-llm/area/options.md +97 -0
  248. package/docs-llm/area/overview.md +27 -0
  249. package/docs-llm/bar/examples-json.md +3380 -0
  250. package/docs-llm/bar/examples-react.md +2352 -0
  251. package/docs-llm/bar/options.md +89 -0
  252. package/docs-llm/bar/overview.md +25 -0
  253. package/docs-llm/bubble/examples-json.md +4082 -0
  254. package/docs-llm/bubble/examples-react.md +3977 -0
  255. package/docs-llm/bubble/options.md +62 -0
  256. package/docs-llm/bubble/overview.md +26 -0
  257. package/docs-llm/choropleth-svg/examples-json.md +397 -0
  258. package/docs-llm/choropleth-svg/examples-react.md +389 -0
  259. package/docs-llm/choropleth-svg/options.md +15 -0
  260. package/docs-llm/choropleth-svg/overview.md +23 -0
  261. package/docs-llm/column/examples-json.md +3898 -0
  262. package/docs-llm/column/examples-react.md +2653 -0
  263. package/docs-llm/column/options.md +94 -0
  264. package/docs-llm/column/overview.md +31 -0
  265. package/docs-llm/dsl/examples-json.md +43 -0
  266. package/docs-llm/dsl/examples-react.md +78 -0
  267. package/docs-llm/dsl/formatters/format-by-type-examples-json.md +58 -0
  268. package/docs-llm/dsl/formatters/format-by-type-examples-react.md +43 -0
  269. package/docs-llm/dsl/formatters/format-by-type.md +38 -0
  270. package/docs-llm/dsl/formatters/frame-examples-json.md +42 -0
  271. package/docs-llm/dsl/formatters/frame-examples-react.md +24 -0
  272. package/docs-llm/dsl/formatters/frame.md +6 -0
  273. package/docs-llm/dsl/formatters/gradient-examples-json.md +98 -0
  274. package/docs-llm/dsl/formatters/gradient-examples-react.md +44 -0
  275. package/docs-llm/dsl/formatters/gradient.md +23 -0
  276. package/docs-llm/dsl/formatters/lerp-examples-json.md +40 -0
  277. package/docs-llm/dsl/formatters/lerp-examples-react.md +28 -0
  278. package/docs-llm/dsl/formatters/lerp.md +19 -0
  279. package/docs-llm/dsl/formatters/match-value-examples-json.md +65 -0
  280. package/docs-llm/dsl/formatters/match-value-examples-react.md +37 -0
  281. package/docs-llm/dsl/formatters/match-value.md +13 -0
  282. package/docs-llm/dsl/formatters/max-contrast-examples-json.md +39 -0
  283. package/docs-llm/dsl/formatters/max-contrast-examples-react.md +27 -0
  284. package/docs-llm/dsl/formatters/max-contrast.md +9 -0
  285. package/docs-llm/dsl/formatters/multi-format-examples-json.md +67 -0
  286. package/docs-llm/dsl/formatters/multi-format-examples-react.md +49 -0
  287. package/docs-llm/dsl/formatters/multi-format.md +12 -0
  288. package/docs-llm/dsl/formatters/objects-examples-json.md +49 -0
  289. package/docs-llm/dsl/formatters/objects-examples-react.md +37 -0
  290. package/docs-llm/dsl/formatters/objects.md +3 -0
  291. package/docs-llm/dsl/formatters/pick-examples-json.md +59 -0
  292. package/docs-llm/dsl/formatters/pick-examples-react.md +30 -0
  293. package/docs-llm/dsl/formatters/pick.md +9 -0
  294. package/docs-llm/dsl/formatters/prefix-examples-json.md +29 -0
  295. package/docs-llm/dsl/formatters/prefix-examples-react.md +19 -0
  296. package/docs-llm/dsl/formatters/prefix.md +3 -0
  297. package/docs-llm/dsl/formatters/prepend-examples-json.md +51 -0
  298. package/docs-llm/dsl/formatters/prepend-examples-react.md +33 -0
  299. package/docs-llm/dsl/formatters/prepend.md +9 -0
  300. package/docs-llm/dsl/formatters/range-value-examples-json.md +48 -0
  301. package/docs-llm/dsl/formatters/range-value-examples-react.md +34 -0
  302. package/docs-llm/dsl/formatters/range-value.md +15 -0
  303. package/docs-llm/dsl/formatters/set-color-channel-examples-json.md +40 -0
  304. package/docs-llm/dsl/formatters/set-color-channel-examples-react.md +31 -0
  305. package/docs-llm/dsl/formatters/set-color-channel.md +9 -0
  306. package/docs-llm/dsl/formatters/suffix-examples-json.md +29 -0
  307. package/docs-llm/dsl/formatters/suffix-examples-react.md +19 -0
  308. package/docs-llm/dsl/formatters/suffix.md +3 -0
  309. package/docs-llm/dsl/formatters/type-examples-json.md +37 -0
  310. package/docs-llm/dsl/formatters/type-examples-react.md +20 -0
  311. package/docs-llm/dsl/formatters/type.md +3 -0
  312. package/docs-llm/dsl/overview.md +41 -0
  313. package/docs-llm/dsl/selectors/abs.md +7 -0
  314. package/docs-llm/dsl/selectors/ceil.md +7 -0
  315. package/docs-llm/dsl/selectors/data-frame-average-examples-json.md +41 -0
  316. package/docs-llm/dsl/selectors/data-frame-average-examples-react.md +36 -0
  317. package/docs-llm/dsl/selectors/data-frame-average.md +7 -0
  318. package/docs-llm/dsl/selectors/data-frame-count-examples-json.md +41 -0
  319. package/docs-llm/dsl/selectors/data-frame-count-examples-react.md +36 -0
  320. package/docs-llm/dsl/selectors/data-frame-count.md +7 -0
  321. package/docs-llm/dsl/selectors/data-frame-examples-json.md +830 -0
  322. package/docs-llm/dsl/selectors/data-frame-examples-react.md +929 -0
  323. package/docs-llm/dsl/selectors/data-frame-get-field-examples-json.md +89 -0
  324. package/docs-llm/dsl/selectors/data-frame-get-field-examples-react.md +124 -0
  325. package/docs-llm/dsl/selectors/data-frame-get-field.md +5 -0
  326. package/docs-llm/dsl/selectors/data-frame-get-raw-value.md +5 -0
  327. package/docs-llm/dsl/selectors/data-frame-get-type.md +5 -0
  328. package/docs-llm/dsl/selectors/data-frame-get-value.md +5 -0
  329. package/docs-llm/dsl/selectors/data-frame-max-examples-json.md +51 -0
  330. package/docs-llm/dsl/selectors/data-frame-max-examples-react.md +41 -0
  331. package/docs-llm/dsl/selectors/data-frame-max.md +7 -0
  332. package/docs-llm/dsl/selectors/data-frame-min-examples-json.md +51 -0
  333. package/docs-llm/dsl/selectors/data-frame-min-examples-react.md +41 -0
  334. package/docs-llm/dsl/selectors/data-frame-min.md +7 -0
  335. package/docs-llm/dsl/selectors/data-frame-percentile-examples-json.md +41 -0
  336. package/docs-llm/dsl/selectors/data-frame-percentile-examples-react.md +36 -0
  337. package/docs-llm/dsl/selectors/data-frame-percentile.md +8 -0
  338. package/docs-llm/dsl/selectors/data-frame-set-value.md +5 -0
  339. package/docs-llm/dsl/selectors/data-frame-sum-examples-json.md +51 -0
  340. package/docs-llm/dsl/selectors/data-frame-sum-examples-react.md +41 -0
  341. package/docs-llm/dsl/selectors/data-frame-sum.md +7 -0
  342. package/docs-llm/dsl/selectors/data-frame.md +4 -0
  343. package/docs-llm/dsl/selectors/data-point-get-field.md +5 -0
  344. package/docs-llm/dsl/selectors/data-point-get-raw-value.md +4 -0
  345. package/docs-llm/dsl/selectors/data-point-get-type.md +5 -0
  346. package/docs-llm/dsl/selectors/data-point-get-value.md +5 -0
  347. package/docs-llm/dsl/selectors/data-point-set-value.md +4 -0
  348. package/docs-llm/dsl/selectors/data-point.md +5 -0
  349. package/docs-llm/dsl/selectors/data-series-average.md +22 -0
  350. package/docs-llm/dsl/selectors/data-series-count.md +14 -0
  351. package/docs-llm/dsl/selectors/data-series-get-field.md +5 -0
  352. package/docs-llm/dsl/selectors/data-series-get-raw-value.md +4 -0
  353. package/docs-llm/dsl/selectors/data-series-get-type.md +5 -0
  354. package/docs-llm/dsl/selectors/data-series-get-value.md +4 -0
  355. package/docs-llm/dsl/selectors/data-series-max.md +5 -0
  356. package/docs-llm/dsl/selectors/data-series-min.md +5 -0
  357. package/docs-llm/dsl/selectors/data-series-percentile.md +17 -0
  358. package/docs-llm/dsl/selectors/data-series-set-value.md +4 -0
  359. package/docs-llm/dsl/selectors/data-series-sum.md +24 -0
  360. package/docs-llm/dsl/selectors/data-series.md +4 -0
  361. package/docs-llm/dsl/selectors/delta.md +7 -0
  362. package/docs-llm/dsl/selectors/divide.md +8 -0
  363. package/docs-llm/dsl/selectors/first-point.md +5 -0
  364. package/docs-llm/dsl/selectors/floor.md +7 -0
  365. package/docs-llm/dsl/selectors/frame-by-series-index-range-examples-json.md +89 -0
  366. package/docs-llm/dsl/selectors/frame-by-series-index-range-examples-react.md +88 -0
  367. package/docs-llm/dsl/selectors/frame-by-series-index-range.md +10 -0
  368. package/docs-llm/dsl/selectors/frame-by-series-indexes-examples-json.md +88 -0
  369. package/docs-llm/dsl/selectors/frame-by-series-indexes-examples-react.md +87 -0
  370. package/docs-llm/dsl/selectors/frame-by-series-indexes.md +9 -0
  371. package/docs-llm/dsl/selectors/frame-by-series-names-examples-json.md +89 -0
  372. package/docs-llm/dsl/selectors/frame-by-series-names-examples-react.md +88 -0
  373. package/docs-llm/dsl/selectors/frame-by-series-names-or-indexes-examples-json.md +89 -0
  374. package/docs-llm/dsl/selectors/frame-by-series-names-or-indexes-examples-react.md +88 -0
  375. package/docs-llm/dsl/selectors/frame-by-series-names-or-indexes.md +9 -0
  376. package/docs-llm/dsl/selectors/frame-by-series-names.md +9 -0
  377. package/docs-llm/dsl/selectors/frame-by-series-types-examples-json.md +89 -0
  378. package/docs-llm/dsl/selectors/frame-by-series-types-examples-react.md +88 -0
  379. package/docs-llm/dsl/selectors/frame-by-series-types.md +9 -0
  380. package/docs-llm/dsl/selectors/frame-without-internal-fields-examples-json.md +137 -0
  381. package/docs-llm/dsl/selectors/frame-without-internal-fields-examples-react.md +135 -0
  382. package/docs-llm/dsl/selectors/frame-without-internal-fields-except-examples-json.md +157 -0
  383. package/docs-llm/dsl/selectors/frame-without-internal-fields-except-examples-react.md +155 -0
  384. package/docs-llm/dsl/selectors/frame-without-internal-fields-except.md +21 -0
  385. package/docs-llm/dsl/selectors/frame-without-internal-fields.md +17 -0
  386. package/docs-llm/dsl/selectors/frame-without-series-names.md +8 -0
  387. package/docs-llm/dsl/selectors/last-point.md +5 -0
  388. package/docs-llm/dsl/selectors/minus.md +8 -0
  389. package/docs-llm/dsl/selectors/multiply.md +8 -0
  390. package/docs-llm/dsl/selectors/plus.md +8 -0
  391. package/docs-llm/dsl/selectors/point-by-index.md +6 -0
  392. package/docs-llm/dsl/selectors/points-by-indexes.md +6 -0
  393. package/docs-llm/dsl/selectors/round.md +7 -0
  394. package/docs-llm/dsl/selectors/series-by-index-examples-json.md +49 -0
  395. package/docs-llm/dsl/selectors/series-by-index-examples-react.md +39 -0
  396. package/docs-llm/dsl/selectors/series-by-index.md +8 -0
  397. package/docs-llm/dsl/selectors/series-by-name-examples-json.md +49 -0
  398. package/docs-llm/dsl/selectors/series-by-name-examples-react.md +39 -0
  399. package/docs-llm/dsl/selectors/series-by-name.md +8 -0
  400. package/docs-llm/dsl/selectors/series-by-prioritized-types-examples-json.md +47 -0
  401. package/docs-llm/dsl/selectors/series-by-prioritized-types-examples-react.md +39 -0
  402. package/docs-llm/dsl/selectors/series-by-prioritized-types.md +10 -0
  403. package/docs-llm/dsl/selectors/series-by-type-examples-json.md +49 -0
  404. package/docs-llm/dsl/selectors/series-by-type-examples-react.md +39 -0
  405. package/docs-llm/dsl/selectors/series-by-type.md +10 -0
  406. package/docs-llm/dsl/selectors/series-by-types.md +6 -0
  407. package/docs-llm/ellipse/examples-json.md +5 -0
  408. package/docs-llm/ellipse/examples-react.md +5 -0
  409. package/docs-llm/ellipse/options.md +16 -0
  410. package/docs-llm/ellipse/overview.md +5 -0
  411. package/docs-llm/events/examples-json.md +705 -0
  412. package/docs-llm/events/examples-react.md +536 -0
  413. package/docs-llm/events/options.md +18 -0
  414. package/docs-llm/events/overview.md +5 -0
  415. package/docs-llm/filler-gauge/examples-json.md +376 -0
  416. package/docs-llm/filler-gauge/examples-react.md +274 -0
  417. package/docs-llm/filler-gauge/options.md +26 -0
  418. package/docs-llm/filler-gauge/overview.md +5 -0
  419. package/docs-llm/image/examples-json.md +39 -0
  420. package/docs-llm/image/examples-react.md +65 -0
  421. package/docs-llm/image/options.md +13 -0
  422. package/docs-llm/image/overview.md +5 -0
  423. package/docs-llm/line/examples-json.md +3724 -0
  424. package/docs-llm/line/examples-react.md +2683 -0
  425. package/docs-llm/line/options.md +95 -0
  426. package/docs-llm/line/overview.md +29 -0
  427. package/docs-llm/link-graph/examples-json.md +5 -0
  428. package/docs-llm/link-graph/examples-react.md +5 -0
  429. package/docs-llm/link-graph/options.md +26 -0
  430. package/docs-llm/link-graph/overview.md +16 -0
  431. package/docs-llm/map/examples-json.md +13973 -0
  432. package/docs-llm/map/examples-react.md +6154 -0
  433. package/docs-llm/map/options.md +22 -0
  434. package/docs-llm/map/overview.md +32 -0
  435. package/docs-llm/markdown/examples-json.md +63 -0
  436. package/docs-llm/markdown/examples-react.md +98 -0
  437. package/docs-llm/markdown/options.md +17 -0
  438. package/docs-llm/markdown/overview.md +5 -0
  439. package/docs-llm/marker-gauge/examples-json.md +436 -0
  440. package/docs-llm/marker-gauge/examples-react.md +367 -0
  441. package/docs-llm/marker-gauge/options.md +26 -0
  442. package/docs-llm/marker-gauge/overview.md +5 -0
  443. package/docs-llm/network-graph/examples-json.md +8843 -0
  444. package/docs-llm/network-graph/examples-react.md +7339 -0
  445. package/docs-llm/network-graph/options.md +50 -0
  446. package/docs-llm/network-graph/overview.md +28 -0
  447. package/docs-llm/parallel-coordinates/examples-json.md +8376 -0
  448. package/docs-llm/parallel-coordinates/examples-react.md +2771 -0
  449. package/docs-llm/parallel-coordinates/options.md +14 -0
  450. package/docs-llm/parallel-coordinates/overview.md +22 -0
  451. package/docs-llm/pie/examples-json.md +851 -0
  452. package/docs-llm/pie/examples-react.md +606 -0
  453. package/docs-llm/pie/options.md +34 -0
  454. package/docs-llm/pie/overview.md +23 -0
  455. package/docs-llm/process-tree/options.md +32 -0
  456. package/docs-llm/punchcard/examples-json.md +6134 -0
  457. package/docs-llm/punchcard/examples-react.md +4562 -0
  458. package/docs-llm/punchcard/options.md +33 -0
  459. package/docs-llm/punchcard/overview.md +5 -0
  460. package/docs-llm/pure-rich-text/options.md +29 -0
  461. package/docs-llm/rectangle/examples-json.md +5 -0
  462. package/docs-llm/rectangle/examples-react.md +5 -0
  463. package/docs-llm/rectangle/options.md +19 -0
  464. package/docs-llm/rectangle/overview.md +5 -0
  465. package/docs-llm/rich-text/examples-json.md +96 -0
  466. package/docs-llm/rich-text/examples-react.md +119 -0
  467. package/docs-llm/rich-text/options.md +29 -0
  468. package/docs-llm/rich-text/overview.md +5 -0
  469. package/docs-llm/sankey/examples-json.md +844 -0
  470. package/docs-llm/sankey/examples-react.md +546 -0
  471. package/docs-llm/sankey/options.md +19 -0
  472. package/docs-llm/sankey/overview.md +24 -0
  473. package/docs-llm/scatter/examples-json.md +4012 -0
  474. package/docs-llm/scatter/examples-react.md +3914 -0
  475. package/docs-llm/scatter/options.md +68 -0
  476. package/docs-llm/scatter/overview.md +25 -0
  477. package/docs-llm/single-value/examples-json.md +2613 -0
  478. package/docs-llm/single-value/examples-react.md +2296 -0
  479. package/docs-llm/single-value/options.md +49 -0
  480. package/docs-llm/single-value/overview.md +23 -0
  481. package/docs-llm/single-value-icon/examples-json.md +1686 -0
  482. package/docs-llm/single-value-icon/examples-react.md +1573 -0
  483. package/docs-llm/single-value-icon/options.md +43 -0
  484. package/docs-llm/single-value-icon/overview.md +5 -0
  485. package/docs-llm/single-value-radial/examples-json.md +1178 -0
  486. package/docs-llm/single-value-radial/examples-react.md +1028 -0
  487. package/docs-llm/single-value-radial/options.md +41 -0
  488. package/docs-llm/single-value-radial/overview.md +5 -0
  489. package/docs-llm/table/examples-json.md +5 -0
  490. package/docs-llm/table/examples-react.md +5 -0
  491. package/docs-llm/table/options.md +26 -0
  492. package/docs-llm/table/overview.md +24 -0
  493. package/docs-llm/timeline/examples-json.md +5 -0
  494. package/docs-llm/timeline/examples-react.md +5 -0
  495. package/docs-llm/timeline/options.md +27 -0
  496. package/docs-llm/timeline/overview.md +24 -0
  497. package/docs-llm/treemap/examples-json.md +5 -0
  498. package/docs-llm/treemap/examples-react.md +5 -0
  499. package/docs-llm/treemap/options.md +26 -0
  500. package/docs-llm/treemap/overview.md +27 -0
  501. package/package.json +33 -28
@@ -0,0 +1,2296 @@
1
+ # Single Value Examples
2
+
3
+ **Component Reference:** Single Value or @splunk/visualizations/SingleValue
4
+
5
+ ## Basic Single Value
6
+
7
+ - **Key:** Basic
8
+
9
+ ```jsx
10
+ import React from 'react';
11
+ import SingleValue from '@splunk/visualizations/SingleValue';
12
+
13
+ export default () => (
14
+ <SingleValue
15
+ options={{}}
16
+ dataSources={{
17
+ primary: {
18
+ data: {
19
+ columns: [
20
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
21
+ [
22
+ '2018-08-19T00:00:00.000+00:00',
23
+ '2018-08-20T00:00:00.000+00:00',
24
+ '2018-08-21T00:00:00.000+00:00',
25
+ '2018-08-22T00:00:00.000+00:00',
26
+ '2018-08-23T00:00:00.000+00:00',
27
+ '2018-08-24T00:00:00.000+00:00',
28
+ '2018-08-25T00:00:00.000+00:00',
29
+ '2018-08-26T00:00:00.000+00:00',
30
+ ],
31
+ ],
32
+ fields: [
33
+ {
34
+ name: 'foo',
35
+ },
36
+ {
37
+ name: '_time',
38
+ },
39
+ ],
40
+ },
41
+ meta: {},
42
+ },
43
+ }}
44
+ />
45
+ );
46
+ ```
47
+
48
+ ## Basic - With Event Handlers
49
+
50
+ - **Key:** Event Handlers
51
+
52
+ ```jsx
53
+ import React from 'react';
54
+ import SingleValue from '@splunk/visualizations/SingleValue';
55
+
56
+ export default () => (
57
+ <SingleValue
58
+ hasEventHandlers
59
+ dataSources={{
60
+ primary: {
61
+ data: {
62
+ columns: [
63
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
64
+ [
65
+ '2018-08-19T00:00:00.000+00:00',
66
+ '2018-08-20T00:00:00.000+00:00',
67
+ '2018-08-21T00:00:00.000+00:00',
68
+ '2018-08-22T00:00:00.000+00:00',
69
+ '2018-08-23T00:00:00.000+00:00',
70
+ '2018-08-24T00:00:00.000+00:00',
71
+ '2018-08-25T00:00:00.000+00:00',
72
+ '2018-08-26T00:00:00.000+00:00',
73
+ ],
74
+ ],
75
+ fields: [
76
+ {
77
+ name: 'foo',
78
+ },
79
+ {
80
+ name: '_time',
81
+ },
82
+ ],
83
+ },
84
+ meta: {},
85
+ },
86
+ }}
87
+ />
88
+ );
89
+ ```
90
+
91
+ ## Background Color - Red
92
+
93
+ - **Key:** Background Color
94
+
95
+ ```jsx
96
+ import React from 'react';
97
+ import SingleValue from '@splunk/visualizations/SingleValue';
98
+
99
+ export default () => (
100
+ <SingleValue
101
+ options={{
102
+ backgroundColor: '#FF0000',
103
+ }}
104
+ dataSources={{
105
+ primary: {
106
+ data: {
107
+ columns: [
108
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
109
+ [
110
+ '2018-08-19T00:00:00.000+00:00',
111
+ '2018-08-20T00:00:00.000+00:00',
112
+ '2018-08-21T00:00:00.000+00:00',
113
+ '2018-08-22T00:00:00.000+00:00',
114
+ '2018-08-23T00:00:00.000+00:00',
115
+ '2018-08-24T00:00:00.000+00:00',
116
+ '2018-08-25T00:00:00.000+00:00',
117
+ '2018-08-26T00:00:00.000+00:00',
118
+ ],
119
+ ],
120
+ fields: [
121
+ {
122
+ name: 'foo',
123
+ },
124
+ {
125
+ name: '_time',
126
+ },
127
+ ],
128
+ },
129
+ meta: {},
130
+ },
131
+ }}
132
+ />
133
+ );
134
+ ```
135
+
136
+ ## Background Color - Based on Major Value
137
+
138
+ - **Key:** Background Color From Major Value
139
+
140
+ ```jsx
141
+ import React from 'react';
142
+ import SingleValue from '@splunk/visualizations/SingleValue';
143
+
144
+ export default () => (
145
+ <SingleValue
146
+ context={{
147
+ backgroundColorThresholds: [
148
+ {
149
+ from: 1321,
150
+ value: '#00FFFF',
151
+ },
152
+ {
153
+ to: 1321,
154
+ value: '#FF00FF',
155
+ },
156
+ ],
157
+ }}
158
+ options={{
159
+ majorValue: '> sparklineValues | lastPoint()',
160
+ backgroundColor: '> majorValue | rangeValue(backgroundColorThresholds)',
161
+ }}
162
+ dataSources={{
163
+ primary: {
164
+ data: {
165
+ columns: [
166
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
167
+ [
168
+ '2018-08-19T00:00:00.000+00:00',
169
+ '2018-08-20T00:00:00.000+00:00',
170
+ '2018-08-21T00:00:00.000+00:00',
171
+ '2018-08-22T00:00:00.000+00:00',
172
+ '2018-08-23T00:00:00.000+00:00',
173
+ '2018-08-24T00:00:00.000+00:00',
174
+ '2018-08-25T00:00:00.000+00:00',
175
+ '2018-08-26T00:00:00.000+00:00',
176
+ ],
177
+ ],
178
+ fields: [
179
+ {
180
+ name: 'foo',
181
+ },
182
+ {
183
+ name: '_time',
184
+ },
185
+ ],
186
+ },
187
+ meta: {},
188
+ },
189
+ }}
190
+ />
191
+ );
192
+ ```
193
+
194
+ ## Background Color - Based on Trend Value
195
+
196
+ - **Key:** Background Color From Trend Value
197
+
198
+ ```jsx
199
+ import React from 'react';
200
+ import SingleValue from '@splunk/visualizations/SingleValue';
201
+
202
+ export default () => (
203
+ <SingleValue
204
+ context={{
205
+ backgroundColorThresholds: [
206
+ {
207
+ from: 391,
208
+ value: '#00FFFF',
209
+ },
210
+ {
211
+ to: 391,
212
+ value: '#0080FF',
213
+ },
214
+ ],
215
+ }}
216
+ options={{
217
+ trendValue: '> sparklineValues | delta(-2)',
218
+ backgroundColor: '> trendValue | rangeValue(backgroundColorThresholds)',
219
+ }}
220
+ dataSources={{
221
+ primary: {
222
+ data: {
223
+ columns: [
224
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
225
+ [
226
+ '2018-08-19T00:00:00.000+00:00',
227
+ '2018-08-20T00:00:00.000+00:00',
228
+ '2018-08-21T00:00:00.000+00:00',
229
+ '2018-08-22T00:00:00.000+00:00',
230
+ '2018-08-23T00:00:00.000+00:00',
231
+ '2018-08-24T00:00:00.000+00:00',
232
+ '2018-08-25T00:00:00.000+00:00',
233
+ '2018-08-26T00:00:00.000+00:00',
234
+ ],
235
+ ],
236
+ fields: [
237
+ {
238
+ name: 'foo',
239
+ },
240
+ {
241
+ name: '_time',
242
+ },
243
+ ],
244
+ },
245
+ meta: {},
246
+ },
247
+ }}
248
+ />
249
+ );
250
+ ```
251
+
252
+ ## Background Color - Based on Data Series Color
253
+
254
+ - **Key:** Colordataseries
255
+
256
+ ```jsx
257
+ import React from 'react';
258
+ import SingleValue from '@splunk/visualizations/SingleValue';
259
+
260
+ export default () => (
261
+ <SingleValue
262
+ options={{
263
+ backgroundColor: '> primary | seriesByName("bar") | lastPoint()',
264
+ }}
265
+ dataSources={{
266
+ primary: {
267
+ data: {
268
+ columns: [
269
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
270
+ [
271
+ '#FF0000',
272
+ '#00FFFF',
273
+ '#0000FF',
274
+ '#800080',
275
+ '#FFFF00',
276
+ '#FFA500',
277
+ '#A52A2A',
278
+ '#008000',
279
+ ],
280
+ ],
281
+ fields: [
282
+ {
283
+ name: 'foo',
284
+ },
285
+ {
286
+ name: 'bar',
287
+ },
288
+ ],
289
+ },
290
+ meta: {},
291
+ },
292
+ }}
293
+ />
294
+ );
295
+ ```
296
+
297
+ ## Major Color - Green
298
+
299
+ - **Key:** Major Color
300
+
301
+ ```jsx
302
+ import React from 'react';
303
+ import SingleValue from '@splunk/visualizations/SingleValue';
304
+
305
+ export default () => (
306
+ <SingleValue
307
+ options={{
308
+ majorColor: '#008000',
309
+ }}
310
+ dataSources={{
311
+ primary: {
312
+ data: {
313
+ columns: [
314
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
315
+ [
316
+ '2018-08-19T00:00:00.000+00:00',
317
+ '2018-08-20T00:00:00.000+00:00',
318
+ '2018-08-21T00:00:00.000+00:00',
319
+ '2018-08-22T00:00:00.000+00:00',
320
+ '2018-08-23T00:00:00.000+00:00',
321
+ '2018-08-24T00:00:00.000+00:00',
322
+ '2018-08-25T00:00:00.000+00:00',
323
+ '2018-08-26T00:00:00.000+00:00',
324
+ ],
325
+ ],
326
+ fields: [
327
+ {
328
+ name: 'foo',
329
+ },
330
+ {
331
+ name: '_time',
332
+ },
333
+ ],
334
+ },
335
+ meta: {},
336
+ },
337
+ }}
338
+ />
339
+ );
340
+ ```
341
+
342
+ ## Major Color - Based on Last Major Value
343
+
344
+ - **Key:** Majorcolorusinglastmajorvalue
345
+
346
+ ```jsx
347
+ import React from 'react';
348
+ import SingleValue from '@splunk/visualizations/SingleValue';
349
+
350
+ export default () => (
351
+ <SingleValue
352
+ context={{
353
+ majorColorThresholds: [
354
+ {
355
+ from: 3201,
356
+ value: '#00FFFF',
357
+ },
358
+ {
359
+ to: 3201,
360
+ value: '#FF00FF',
361
+ },
362
+ ],
363
+ }}
364
+ options={{
365
+ majorValue: '> primary | seriesByIndex(0) | lastPoint()',
366
+ trendValue: '> primary | seriesByIndex(0) | delta(-2)',
367
+ majorColor: '> majorValue | rangeValue(majorColorThresholds)',
368
+ }}
369
+ dataSources={{
370
+ primary: {
371
+ data: {
372
+ columns: [
373
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
374
+ [
375
+ '2018-08-19T00:00:00.000+00:00',
376
+ '2018-08-20T00:00:00.000+00:00',
377
+ '2018-08-21T00:00:00.000+00:00',
378
+ '2018-08-22T00:00:00.000+00:00',
379
+ '2018-08-23T00:00:00.000+00:00',
380
+ '2018-08-24T00:00:00.000+00:00',
381
+ '2018-08-25T00:00:00.000+00:00',
382
+ '2018-08-26T00:00:00.000+00:00',
383
+ ],
384
+ ],
385
+ fields: [
386
+ {
387
+ name: 'foo',
388
+ },
389
+ {
390
+ name: '_time',
391
+ },
392
+ ],
393
+ },
394
+ meta: {},
395
+ },
396
+ }}
397
+ />
398
+ );
399
+ ```
400
+
401
+ ## Major Color - Based on Trend Value
402
+
403
+ - **Key:** Major Color From Trend Value
404
+
405
+ ```jsx
406
+ import React from 'react';
407
+ import SingleValue from '@splunk/visualizations/SingleValue';
408
+
409
+ export default () => (
410
+ <SingleValue
411
+ context={{
412
+ majorColorThresholds: [
413
+ {
414
+ from: 389,
415
+ value: '#00FFFF',
416
+ },
417
+ {
418
+ to: 389,
419
+ value: '#FF00FF',
420
+ },
421
+ ],
422
+ }}
423
+ options={{
424
+ sparklineValues: '> primary | seriesByIndex(0)',
425
+ majorValue: '> sparklineValues | lastPoint()',
426
+ trendValue: '> sparklineValues | delta(-2)',
427
+ majorColor: '> trendValue | rangeValue(majorColorThresholds)',
428
+ }}
429
+ dataSources={{
430
+ primary: {
431
+ data: {
432
+ columns: [
433
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
434
+ [
435
+ '2018-08-19T00:00:00.000+00:00',
436
+ '2018-08-20T00:00:00.000+00:00',
437
+ '2018-08-21T00:00:00.000+00:00',
438
+ '2018-08-22T00:00:00.000+00:00',
439
+ '2018-08-23T00:00:00.000+00:00',
440
+ '2018-08-24T00:00:00.000+00:00',
441
+ '2018-08-25T00:00:00.000+00:00',
442
+ '2018-08-26T00:00:00.000+00:00',
443
+ ],
444
+ ],
445
+ fields: [
446
+ {
447
+ name: 'foo',
448
+ },
449
+ {
450
+ name: '_time',
451
+ },
452
+ ],
453
+ },
454
+ meta: {},
455
+ },
456
+ }}
457
+ />
458
+ );
459
+ ```
460
+
461
+ ## Major Font Size - 40, Trend Font Size - 30
462
+
463
+ - **Key:** Custom Font Sizes
464
+
465
+ ```jsx
466
+ import React from 'react';
467
+ import SingleValue from '@splunk/visualizations/SingleValue';
468
+
469
+ export default () => (
470
+ <SingleValue
471
+ options={{
472
+ majorFontSize: 40,
473
+ trendFontSize: 30,
474
+ }}
475
+ dataSources={{
476
+ primary: {
477
+ data: {
478
+ columns: [
479
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
480
+ [
481
+ '2018-08-19T00:00:00.000+00:00',
482
+ '2018-08-20T00:00:00.000+00:00',
483
+ '2018-08-21T00:00:00.000+00:00',
484
+ '2018-08-22T00:00:00.000+00:00',
485
+ '2018-08-23T00:00:00.000+00:00',
486
+ '2018-08-24T00:00:00.000+00:00',
487
+ '2018-08-25T00:00:00.000+00:00',
488
+ '2018-08-26T00:00:00.000+00:00',
489
+ ],
490
+ ],
491
+ fields: [
492
+ {
493
+ name: 'foo',
494
+ },
495
+ {
496
+ name: '_time',
497
+ },
498
+ ],
499
+ },
500
+ meta: {},
501
+ },
502
+ }}
503
+ />
504
+ );
505
+ ```
506
+
507
+ ## Major Value - Based on Foo Field
508
+
509
+ - **Key:** Majorvaluefoo
510
+
511
+ ```jsx
512
+ import React from 'react';
513
+ import SingleValue from '@splunk/visualizations/SingleValue';
514
+
515
+ export default () => (
516
+ <SingleValue
517
+ options={{
518
+ majorValue: '> primary | seriesByName("foo") | lastPoint()',
519
+ }}
520
+ dataSources={{
521
+ primary: {
522
+ data: {
523
+ columns: [
524
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
525
+ [
526
+ '2018-08-19T00:00:00.000+00:00',
527
+ '2018-08-20T00:00:00.000+00:00',
528
+ '2018-08-21T00:00:00.000+00:00',
529
+ '2018-08-22T00:00:00.000+00:00',
530
+ '2018-08-23T00:00:00.000+00:00',
531
+ '2018-08-24T00:00:00.000+00:00',
532
+ '2018-08-25T00:00:00.000+00:00',
533
+ '2018-08-26T00:00:00.000+00:00',
534
+ ],
535
+ ],
536
+ fields: [
537
+ {
538
+ name: 'foo',
539
+ },
540
+ {
541
+ name: '_time',
542
+ },
543
+ ],
544
+ },
545
+ meta: {},
546
+ },
547
+ }}
548
+ />
549
+ );
550
+ ```
551
+
552
+ ## Major Value and Trend Value - Based on majorValueDisplay
553
+
554
+ - **Key:** Majorvaluebasedonmajorvaluedisplay
555
+
556
+ ```jsx
557
+ import React from 'react';
558
+ import SingleValue from '@splunk/visualizations/SingleValue';
559
+
560
+ export default () => (
561
+ <SingleValue
562
+ options={{
563
+ trendValue: '> primary | seriesByName("ingested_bytes") | delta(-2)',
564
+ trendDisplay: 'percent',
565
+ majorValue: '> primary | seriesByName("ingested_bytes") | lastPoint()',
566
+ majorValueDisplay: '> majorValue | formatByType(byteFormatConfig)',
567
+ }}
568
+ context={{
569
+ byteFormatConfig: {
570
+ number: {
571
+ output: 'byte',
572
+ base: 'decimal',
573
+ mantissa: 2,
574
+ },
575
+ },
576
+ }}
577
+ dataSources={{
578
+ primary: {
579
+ requestParams: { offset: 0, count: 20 },
580
+ data: {
581
+ columns: [['154305299', '126949782']],
582
+ fields: [
583
+ {
584
+ name: 'ingested_bytes',
585
+ },
586
+ ],
587
+ },
588
+ meta: {},
589
+ },
590
+ }}
591
+ />
592
+ );
593
+ ```
594
+
595
+ ## Major Value - Using Sum of Data Series
596
+
597
+ - **Key:** Major Value Sum
598
+
599
+ ```jsx
600
+ import React from 'react';
601
+ import SingleValue from '@splunk/visualizations/SingleValue';
602
+
603
+ export default () => (
604
+ <SingleValue
605
+ options={{
606
+ majorValue: '> primary | seriesByName("count") | sum()',
607
+ underLabel: 'Total Events',
608
+ trendDisplay: 'off',
609
+ }}
610
+ dataSources={{
611
+ primary: {
612
+ data: {
613
+ columns: [
614
+ ['12', '115', '393', '260', '584'],
615
+ [
616
+ '2018-05-02T18:10:46.000-07:00',
617
+ '2018-05-02T18:11:47.000-07:00',
618
+ '2018-05-02T18:12:48.000-07:00',
619
+ '2018-05-02T18:13:49.000-07:00',
620
+ '2018-05-02T18:15:50.000-07:00',
621
+ ],
622
+ ],
623
+ fields: [
624
+ {
625
+ name: 'count',
626
+ },
627
+ {
628
+ name: '_time',
629
+ },
630
+ ],
631
+ },
632
+ meta: {},
633
+ },
634
+ }}
635
+ />
636
+ );
637
+ ```
638
+
639
+ ## Major Value - Based on Bar Field
640
+
641
+ - **Key:** Major Value Bar
642
+
643
+ ```jsx
644
+ import React from 'react';
645
+ import SingleValue from '@splunk/visualizations/SingleValue';
646
+
647
+ export default () => (
648
+ <SingleValue
649
+ options={{
650
+ majorValue: '> primary | seriesByName("bar") | lastPoint()',
651
+ }}
652
+ dataSources={{
653
+ primary: {
654
+ data: {
655
+ columns: [
656
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
657
+ ['1', '2', '3', '4', '5', '6', '7', '3200'],
658
+ ],
659
+ fields: [
660
+ {
661
+ name: 'foo',
662
+ },
663
+ {
664
+ name: 'bar',
665
+ },
666
+ ],
667
+ },
668
+ meta: {},
669
+ },
670
+ }}
671
+ />
672
+ );
673
+ ```
674
+
675
+ ## Number Precision - 2
676
+
677
+ - **Key:** Precision
678
+
679
+ ```jsx
680
+ import React from 'react';
681
+ import SingleValue from '@splunk/visualizations/SingleValue';
682
+
683
+ export default () => (
684
+ <SingleValue
685
+ options={{
686
+ numberPrecision: 2,
687
+ }}
688
+ dataSources={{
689
+ primary: {
690
+ data: {
691
+ columns: [
692
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
693
+ [
694
+ '2018-08-19T00:00:00.000+00:00',
695
+ '2018-08-20T00:00:00.000+00:00',
696
+ '2018-08-21T00:00:00.000+00:00',
697
+ '2018-08-22T00:00:00.000+00:00',
698
+ '2018-08-23T00:00:00.000+00:00',
699
+ '2018-08-24T00:00:00.000+00:00',
700
+ '2018-08-25T00:00:00.000+00:00',
701
+ '2018-08-26T00:00:00.000+00:00',
702
+ ],
703
+ ],
704
+ fields: [
705
+ {
706
+ name: 'foo',
707
+ },
708
+ {
709
+ name: '_time',
710
+ },
711
+ ],
712
+ },
713
+ meta: {},
714
+ },
715
+ }}
716
+ />
717
+ );
718
+ ```
719
+
720
+ ## Should Abbreviate Trend Value - False, default
721
+
722
+ - **Key:** No Trend Unit
723
+
724
+ ```jsx
725
+ import React from 'react';
726
+ import SingleValue from '@splunk/visualizations/SingleValue';
727
+
728
+ export default () => (
729
+ <SingleValue
730
+ options={{}}
731
+ dataSources={{
732
+ primary: {
733
+ data: {
734
+ columns: [
735
+ ['1', '62', '103', '308', '587', '876', '930', '13200'],
736
+ [
737
+ '2018-08-19T00:00:00.000+00:00',
738
+ '2018-08-20T00:00:00.000+00:00',
739
+ '2018-08-21T00:00:00.000+00:00',
740
+ '2018-08-22T00:00:00.000+00:00',
741
+ '2018-08-23T00:00:00.000+00:00',
742
+ '2018-08-24T00:00:00.000+00:00',
743
+ '2018-08-25T00:00:00.000+00:00',
744
+ '2018-08-26T00:00:00.000+00:00',
745
+ ],
746
+ ],
747
+ fields: [
748
+ {
749
+ name: 'foo',
750
+ },
751
+ {
752
+ name: '_time',
753
+ },
754
+ ],
755
+ },
756
+ meta: {},
757
+ },
758
+ }}
759
+ />
760
+ );
761
+ ```
762
+
763
+ ## Should Abbreviate Trend Value - True
764
+
765
+ - **Key:** Trend Unit
766
+
767
+ ```jsx
768
+ import React from 'react';
769
+ import SingleValue from '@splunk/visualizations/SingleValue';
770
+
771
+ export default () => (
772
+ <SingleValue
773
+ options={{
774
+ shouldAbbreviateTrendValue: true,
775
+ }}
776
+ dataSources={{
777
+ primary: {
778
+ data: {
779
+ columns: [
780
+ ['1', '62', '103', '308', '587', '876', '930', '13200'],
781
+ [
782
+ '2018-08-19T00:00:00.000+00:00',
783
+ '2018-08-20T00:00:00.000+00:00',
784
+ '2018-08-21T00:00:00.000+00:00',
785
+ '2018-08-22T00:00:00.000+00:00',
786
+ '2018-08-23T00:00:00.000+00:00',
787
+ '2018-08-24T00:00:00.000+00:00',
788
+ '2018-08-25T00:00:00.000+00:00',
789
+ '2018-08-26T00:00:00.000+00:00',
790
+ ],
791
+ ],
792
+ fields: [
793
+ {
794
+ name: 'foo',
795
+ },
796
+ {
797
+ name: '_time',
798
+ },
799
+ ],
800
+ },
801
+ meta: {},
802
+ },
803
+ }}
804
+ />
805
+ );
806
+ ```
807
+
808
+ ## Should Sparkline Accept Null Data - True, default (Deprecated)
809
+
810
+ - **Key:** Sparkline Null
811
+
812
+ ```jsx
813
+ import React from 'react';
814
+ import SingleValue from '@splunk/visualizations/SingleValue';
815
+
816
+ export default () => (
817
+ <SingleValue
818
+ options={{}}
819
+ dataSources={{
820
+ primary: {
821
+ data: {
822
+ columns: [
823
+ ['1', '2', '3', '4', null, '6', '7', '32'],
824
+ [
825
+ '2018-08-19T00:00:00.000+00:00',
826
+ '2018-08-20T00:00:00.000+00:00',
827
+ '2018-08-21T00:00:00.000+00:00',
828
+ '2018-08-22T00:00:00.000+00:00',
829
+ '2018-08-23T00:00:00.000+00:00',
830
+ '2018-08-24T00:00:00.000+00:00',
831
+ '2018-08-25T00:00:00.000+00:00',
832
+ '2018-08-26T00:00:00.000+00:00',
833
+ ],
834
+ ],
835
+ fields: [
836
+ {
837
+ name: 'foo',
838
+ },
839
+ {
840
+ name: '_time',
841
+ },
842
+ ],
843
+ },
844
+ meta: {},
845
+ },
846
+ }}
847
+ />
848
+ );
849
+ ```
850
+
851
+ ## Should Sparkline Accept Null Data - False (Deprecated)
852
+
853
+ - **Key:** Sparkline No Null
854
+
855
+ ```jsx
856
+ import React from 'react';
857
+ import SingleValue from '@splunk/visualizations/SingleValue';
858
+
859
+ export default () => (
860
+ <SingleValue
861
+ options={{
862
+ shouldSparklineAcceptNullData: false,
863
+ }}
864
+ dataSources={{
865
+ primary: {
866
+ data: {
867
+ columns: [
868
+ ['1', '2', '3', '4', null, '6', '7', '32'],
869
+ [
870
+ '2018-08-19T00:00:00.000+00:00',
871
+ '2018-08-20T00:00:00.000+00:00',
872
+ '2018-08-21T00:00:00.000+00:00',
873
+ '2018-08-22T00:00:00.000+00:00',
874
+ '2018-08-23T00:00:00.000+00:00',
875
+ '2018-08-24T00:00:00.000+00:00',
876
+ '2018-08-25T00:00:00.000+00:00',
877
+ '2018-08-26T00:00:00.000+00:00',
878
+ ],
879
+ ],
880
+ fields: [
881
+ {
882
+ name: 'foo',
883
+ },
884
+ {
885
+ name: '_time',
886
+ },
887
+ ],
888
+ },
889
+ meta: {},
890
+ },
891
+ }}
892
+ />
893
+ );
894
+ ```
895
+
896
+ ## Sparkline Null Value Display - Gaps (default)
897
+
898
+ - **Key:** Sparkline Null Value Display Gaps
899
+
900
+ ```jsx
901
+ import React from 'react';
902
+ import SingleValue from '@splunk/visualizations/SingleValue';
903
+
904
+ export default () => (
905
+ <SingleValue
906
+ options={{
907
+ sparklineNullValueDisplay: 'gaps',
908
+ }}
909
+ dataSources={{
910
+ primary: {
911
+ data: {
912
+ columns: [
913
+ ['1', '2', '3', null, null, '6', '7', '8'],
914
+ [
915
+ '2018-08-19T00:00:00.000+00:00',
916
+ '2018-08-20T00:00:00.000+00:00',
917
+ '2018-08-21T00:00:00.000+00:00',
918
+ '2018-08-22T00:00:00.000+00:00',
919
+ '2018-08-23T00:00:00.000+00:00',
920
+ '2018-08-24T00:00:00.000+00:00',
921
+ '2018-08-25T00:00:00.000+00:00',
922
+ '2018-08-26T00:00:00.000+00:00',
923
+ ],
924
+ ],
925
+ fields: [
926
+ {
927
+ name: 'foo',
928
+ },
929
+ {
930
+ name: '_time',
931
+ },
932
+ ],
933
+ },
934
+ meta: {},
935
+ },
936
+ }}
937
+ />
938
+ );
939
+ ```
940
+
941
+ ## Sparkline Null Value Display - Connect
942
+
943
+ - **Key:** Sparkline Null Value Display Connect
944
+
945
+ ```jsx
946
+ import React from 'react';
947
+ import SingleValue from '@splunk/visualizations/SingleValue';
948
+
949
+ export default () => (
950
+ <SingleValue
951
+ options={{
952
+ sparklineNullValueDisplay: 'connect',
953
+ }}
954
+ dataSources={{
955
+ primary: {
956
+ data: {
957
+ columns: [
958
+ ['1', '2', '3', null, null, '6', '7', '8'],
959
+ [
960
+ '2018-08-19T00:00:00.000+00:00',
961
+ '2018-08-20T00:00:00.000+00:00',
962
+ '2018-08-21T00:00:00.000+00:00',
963
+ '2018-08-22T00:00:00.000+00:00',
964
+ '2018-08-23T00:00:00.000+00:00',
965
+ '2018-08-24T00:00:00.000+00:00',
966
+ '2018-08-25T00:00:00.000+00:00',
967
+ '2018-08-26T00:00:00.000+00:00',
968
+ ],
969
+ ],
970
+ fields: [
971
+ {
972
+ name: 'foo',
973
+ },
974
+ {
975
+ name: '_time',
976
+ },
977
+ ],
978
+ },
979
+ meta: {},
980
+ },
981
+ }}
982
+ />
983
+ );
984
+ ```
985
+
986
+ ## Sparkline Null Value Display - Zero
987
+
988
+ - **Key:** Sparkline Null Value Display Zero
989
+
990
+ ```jsx
991
+ import React from 'react';
992
+ import SingleValue from '@splunk/visualizations/SingleValue';
993
+
994
+ export default () => (
995
+ <SingleValue
996
+ options={{
997
+ sparklineNullValueDisplay: 'zero',
998
+ }}
999
+ dataSources={{
1000
+ primary: {
1001
+ data: {
1002
+ columns: [
1003
+ ['1', '2', '3', null, null, '6', '7', '8'],
1004
+ [
1005
+ '2018-08-19T00:00:00.000+00:00',
1006
+ '2018-08-20T00:00:00.000+00:00',
1007
+ '2018-08-21T00:00:00.000+00:00',
1008
+ '2018-08-22T00:00:00.000+00:00',
1009
+ '2018-08-23T00:00:00.000+00:00',
1010
+ '2018-08-24T00:00:00.000+00:00',
1011
+ '2018-08-25T00:00:00.000+00:00',
1012
+ '2018-08-26T00:00:00.000+00:00',
1013
+ ],
1014
+ ],
1015
+ fields: [
1016
+ {
1017
+ name: 'foo',
1018
+ },
1019
+ {
1020
+ name: '_time',
1021
+ },
1022
+ ],
1023
+ },
1024
+ meta: {},
1025
+ },
1026
+ }}
1027
+ />
1028
+ );
1029
+ ```
1030
+
1031
+ ## Should Use Thousand Separators - False
1032
+
1033
+ - **Key:** No Thousand Separators
1034
+
1035
+ ```jsx
1036
+ import React from 'react';
1037
+ import SingleValue from '@splunk/visualizations/SingleValue';
1038
+
1039
+ export default () => (
1040
+ <SingleValue
1041
+ options={{
1042
+ shouldUseThousandSeparators: false,
1043
+ }}
1044
+ dataSources={{
1045
+ primary: {
1046
+ data: {
1047
+ columns: [
1048
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1049
+ [
1050
+ '2018-08-19T00:00:00.000+00:00',
1051
+ '2018-08-20T00:00:00.000+00:00',
1052
+ '2018-08-21T00:00:00.000+00:00',
1053
+ '2018-08-22T00:00:00.000+00:00',
1054
+ '2018-08-23T00:00:00.000+00:00',
1055
+ '2018-08-24T00:00:00.000+00:00',
1056
+ '2018-08-25T00:00:00.000+00:00',
1057
+ '2018-08-26T00:00:00.000+00:00',
1058
+ ],
1059
+ ],
1060
+ fields: [
1061
+ {
1062
+ name: 'foo',
1063
+ },
1064
+ {
1065
+ name: '_time',
1066
+ },
1067
+ ],
1068
+ },
1069
+ meta: {},
1070
+ },
1071
+ }}
1072
+ />
1073
+ );
1074
+ ```
1075
+
1076
+ ## Show Sparkline Area Graph - True
1077
+
1078
+ - **Key:** Sparkline Area Graph
1079
+
1080
+ ```jsx
1081
+ import React from 'react';
1082
+ import SingleValue from '@splunk/visualizations/SingleValue';
1083
+
1084
+ export default () => (
1085
+ <SingleValue
1086
+ options={{
1087
+ showSparklineAreaGraph: true,
1088
+ }}
1089
+ dataSources={{
1090
+ primary: {
1091
+ data: {
1092
+ columns: [
1093
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1094
+ [
1095
+ '2018-08-19T00:00:00.000+00:00',
1096
+ '2018-08-20T00:00:00.000+00:00',
1097
+ '2018-08-21T00:00:00.000+00:00',
1098
+ '2018-08-22T00:00:00.000+00:00',
1099
+ '2018-08-23T00:00:00.000+00:00',
1100
+ '2018-08-24T00:00:00.000+00:00',
1101
+ '2018-08-25T00:00:00.000+00:00',
1102
+ '2018-08-26T00:00:00.000+00:00',
1103
+ ],
1104
+ ],
1105
+ fields: [
1106
+ {
1107
+ name: 'foo',
1108
+ },
1109
+ {
1110
+ name: '_time',
1111
+ },
1112
+ ],
1113
+ },
1114
+ meta: {},
1115
+ },
1116
+ }}
1117
+ />
1118
+ );
1119
+ ```
1120
+
1121
+ ## Show Sparkline Area Graph - True, Sparkline Area Color - Blue
1122
+
1123
+ - **Key:** Fill Color
1124
+
1125
+ ```jsx
1126
+ import React from 'react';
1127
+ import SingleValue from '@splunk/visualizations/SingleValue';
1128
+
1129
+ export default () => (
1130
+ <SingleValue
1131
+ options={{
1132
+ sparklineAreaColor: '#0000FF',
1133
+ showSparklineAreaGraph: true,
1134
+ }}
1135
+ dataSources={{
1136
+ primary: {
1137
+ data: {
1138
+ columns: [
1139
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1140
+ [
1141
+ '2018-08-19T00:00:00.000+00:00',
1142
+ '2018-08-20T00:00:00.000+00:00',
1143
+ '2018-08-21T00:00:00.000+00:00',
1144
+ '2018-08-22T00:00:00.000+00:00',
1145
+ '2018-08-23T00:00:00.000+00:00',
1146
+ '2018-08-24T00:00:00.000+00:00',
1147
+ '2018-08-25T00:00:00.000+00:00',
1148
+ '2018-08-26T00:00:00.000+00:00',
1149
+ ],
1150
+ ],
1151
+ fields: [
1152
+ {
1153
+ name: 'foo',
1154
+ },
1155
+ {
1156
+ name: '_time',
1157
+ },
1158
+ ],
1159
+ },
1160
+ meta: {},
1161
+ },
1162
+ }}
1163
+ />
1164
+ );
1165
+ ```
1166
+
1167
+ ## Show Sparkline Area Graph - True, Sparkline Area Color - Red
1168
+
1169
+ - **Key:** Color Data Series Area Graph
1170
+
1171
+ ```jsx
1172
+ import React from 'react';
1173
+ import SingleValue from '@splunk/visualizations/SingleValue';
1174
+
1175
+ export default () => (
1176
+ <SingleValue
1177
+ options={{
1178
+ showSparklineAreaGraph: true,
1179
+ sparklineAreaColor: '#FF0000',
1180
+ }}
1181
+ dataSources={{
1182
+ primary: {
1183
+ data: {
1184
+ columns: [
1185
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1186
+ [
1187
+ '#FF0000',
1188
+ '#00FFFF',
1189
+ '#0000FF',
1190
+ '#800080',
1191
+ '#FFFF00',
1192
+ '#FFA500',
1193
+ '#A52A2A',
1194
+ '#008000',
1195
+ ],
1196
+ ],
1197
+ fields: [
1198
+ {
1199
+ name: 'foo',
1200
+ },
1201
+ {
1202
+ name: 'bar',
1203
+ },
1204
+ ],
1205
+ },
1206
+ meta: {},
1207
+ },
1208
+ }}
1209
+ />
1210
+ );
1211
+ ```
1212
+
1213
+ ## Show Sparkline Area Graph - True, Sparkline Area Color - Based on Major Value
1214
+
1215
+ - **Key:** Fill Color Using Major Value
1216
+
1217
+ ```jsx
1218
+ import React from 'react';
1219
+ import SingleValue from '@splunk/visualizations/SingleValue';
1220
+
1221
+ export default () => (
1222
+ <SingleValue
1223
+ context={{
1224
+ areaColors: [
1225
+ {
1226
+ from: 1321,
1227
+ value: '#00FF00',
1228
+ },
1229
+ {
1230
+ to: 1321,
1231
+ value: '#00FFFF',
1232
+ },
1233
+ ],
1234
+ }}
1235
+ options={{
1236
+ majorValue: '> primary | seriesByIndex(0) | lastPoint()',
1237
+ sparklineAreaColor: '> majorValue | rangeValue(areaColors)',
1238
+ showSparklineAreaGraph: true,
1239
+ }}
1240
+ dataSources={{
1241
+ primary: {
1242
+ data: {
1243
+ columns: [
1244
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1245
+ [
1246
+ '2018-08-19T00:00:00.000+00:00',
1247
+ '2018-08-20T00:00:00.000+00:00',
1248
+ '2018-08-21T00:00:00.000+00:00',
1249
+ '2018-08-22T00:00:00.000+00:00',
1250
+ '2018-08-23T00:00:00.000+00:00',
1251
+ '2018-08-24T00:00:00.000+00:00',
1252
+ '2018-08-25T00:00:00.000+00:00',
1253
+ '2018-08-26T00:00:00.000+00:00',
1254
+ ],
1255
+ ],
1256
+ fields: [
1257
+ {
1258
+ name: 'foo',
1259
+ },
1260
+ {
1261
+ name: '_time',
1262
+ },
1263
+ ],
1264
+ },
1265
+ meta: {},
1266
+ },
1267
+ }}
1268
+ />
1269
+ );
1270
+ ```
1271
+
1272
+ ## Show Sparkline Area Graph - True, Sparkline Area Color - Based on Trend Value
1273
+
1274
+ - **Key:** Fill Color Using Trend Value
1275
+
1276
+ ```jsx
1277
+ import React from 'react';
1278
+ import SingleValue from '@splunk/visualizations/SingleValue';
1279
+
1280
+ export default () => (
1281
+ <SingleValue
1282
+ context={{
1283
+ areaColors: [
1284
+ {
1285
+ from: 391,
1286
+ value: '#00FF00',
1287
+ },
1288
+ {
1289
+ to: 391,
1290
+ value: '#FF00FF',
1291
+ },
1292
+ ],
1293
+ }}
1294
+ options={{
1295
+ trendValue: '> primary | seriesByIndex(0) | delta(-2)',
1296
+ sparklineAreaColor: '> trendValue | rangeValue(areaColors)',
1297
+ showSparklineAreaGraph: true,
1298
+ }}
1299
+ dataSources={{
1300
+ primary: {
1301
+ data: {
1302
+ columns: [
1303
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1304
+ [
1305
+ '2018-08-19T00:00:00.000+00:00',
1306
+ '2018-08-20T00:00:00.000+00:00',
1307
+ '2018-08-21T00:00:00.000+00:00',
1308
+ '2018-08-22T00:00:00.000+00:00',
1309
+ '2018-08-23T00:00:00.000+00:00',
1310
+ '2018-08-24T00:00:00.000+00:00',
1311
+ '2018-08-25T00:00:00.000+00:00',
1312
+ '2018-08-26T00:00:00.000+00:00',
1313
+ ],
1314
+ ],
1315
+ fields: [
1316
+ {
1317
+ name: 'foo',
1318
+ },
1319
+ {
1320
+ name: '_time',
1321
+ },
1322
+ ],
1323
+ },
1324
+ meta: {},
1325
+ },
1326
+ }}
1327
+ />
1328
+ );
1329
+ ```
1330
+
1331
+ ## Show Sparkline Area Graph - True, Sparkline Highlight Dots - 4, Sparkline Highlight Segments - 3
1332
+
1333
+ - **Key:** Sparkline High Light
1334
+
1335
+ ```jsx
1336
+ import React from 'react';
1337
+ import SingleValue from '@splunk/visualizations/SingleValue';
1338
+
1339
+ export default () => (
1340
+ <SingleValue
1341
+ options={{
1342
+ sparklineHighlightSegments: 3,
1343
+ sparklineHighlightDots: 4,
1344
+ showSparklineAreaGraph: true,
1345
+ }}
1346
+ dataSources={{
1347
+ primary: {
1348
+ data: {
1349
+ columns: [
1350
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1351
+ [
1352
+ '2018-08-19T00:00:00.000+00:00',
1353
+ '2018-08-20T00:00:00.000+00:00',
1354
+ '2018-08-21T00:00:00.000+00:00',
1355
+ '2018-08-22T00:00:00.000+00:00',
1356
+ '2018-08-23T00:00:00.000+00:00',
1357
+ '2018-08-24T00:00:00.000+00:00',
1358
+ '2018-08-25T00:00:00.000+00:00',
1359
+ '2018-08-26T00:00:00.000+00:00',
1360
+ ],
1361
+ ],
1362
+ fields: [
1363
+ {
1364
+ name: 'foo',
1365
+ },
1366
+ {
1367
+ name: '_time',
1368
+ },
1369
+ ],
1370
+ },
1371
+ meta: {},
1372
+ },
1373
+ }}
1374
+ />
1375
+ );
1376
+ ```
1377
+
1378
+ ## Sparkline Display - Off
1379
+
1380
+ - **Key:** No Sparkline
1381
+
1382
+ ```jsx
1383
+ import React from 'react';
1384
+ import SingleValue from '@splunk/visualizations/SingleValue';
1385
+
1386
+ export default () => (
1387
+ <SingleValue
1388
+ options={{
1389
+ sparklineDisplay: 'off',
1390
+ }}
1391
+ dataSources={{
1392
+ primary: {
1393
+ data: {
1394
+ columns: [
1395
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1396
+ [
1397
+ '2018-08-19T00:00:00.000+00:00',
1398
+ '2018-08-20T00:00:00.000+00:00',
1399
+ '2018-08-21T00:00:00.000+00:00',
1400
+ '2018-08-22T00:00:00.000+00:00',
1401
+ '2018-08-23T00:00:00.000+00:00',
1402
+ '2018-08-24T00:00:00.000+00:00',
1403
+ '2018-08-25T00:00:00.000+00:00',
1404
+ '2018-08-26T00:00:00.000+00:00',
1405
+ ],
1406
+ ],
1407
+ fields: [
1408
+ {
1409
+ name: 'foo',
1410
+ },
1411
+ {
1412
+ name: '_time',
1413
+ },
1414
+ ],
1415
+ },
1416
+ meta: {},
1417
+ },
1418
+ }}
1419
+ />
1420
+ );
1421
+ ```
1422
+
1423
+ ## Sparkline Display - Before
1424
+
1425
+ - **Key:** Sparkline Before
1426
+
1427
+ ```jsx
1428
+ import React from 'react';
1429
+ import SingleValue from '@splunk/visualizations/SingleValue';
1430
+
1431
+ export default () => (
1432
+ <SingleValue
1433
+ options={{
1434
+ sparklineDisplay: 'before',
1435
+ }}
1436
+ dataSources={{
1437
+ primary: {
1438
+ data: {
1439
+ columns: [
1440
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1441
+ [
1442
+ '2018-08-19T00:00:00.000+00:00',
1443
+ '2018-08-20T00:00:00.000+00:00',
1444
+ '2018-08-21T00:00:00.000+00:00',
1445
+ '2018-08-22T00:00:00.000+00:00',
1446
+ '2018-08-23T00:00:00.000+00:00',
1447
+ '2018-08-24T00:00:00.000+00:00',
1448
+ '2018-08-25T00:00:00.000+00:00',
1449
+ '2018-08-26T00:00:00.000+00:00',
1450
+ ],
1451
+ ],
1452
+ fields: [
1453
+ {
1454
+ name: 'foo',
1455
+ },
1456
+ {
1457
+ name: '_time',
1458
+ },
1459
+ ],
1460
+ },
1461
+ meta: {},
1462
+ },
1463
+ }}
1464
+ />
1465
+ );
1466
+ ```
1467
+
1468
+ ## Sparkline Display - After, Show Sparkline Tooltip - True
1469
+
1470
+ - **Key:** Sparkline After
1471
+
1472
+ ```jsx
1473
+ import React from 'react';
1474
+ import SingleValue from '@splunk/visualizations/SingleValue';
1475
+
1476
+ export default () => (
1477
+ <SingleValue
1478
+ options={{
1479
+ sparklineDisplay: 'after',
1480
+ showSparklineTooltip: true,
1481
+ }}
1482
+ dataSources={{
1483
+ primary: {
1484
+ data: {
1485
+ columns: [
1486
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1487
+ [
1488
+ '2018-08-19T00:00:00.000+00:00',
1489
+ '2018-08-20T00:00:00.000+00:00',
1490
+ '2018-08-21T00:00:00.000+00:00',
1491
+ '2018-08-22T00:00:00.000+00:00',
1492
+ '2018-08-23T00:00:00.000+00:00',
1493
+ '2018-08-24T00:00:00.000+00:00',
1494
+ '2018-08-25T00:00:00.000+00:00',
1495
+ '2018-08-26T00:00:00.000+00:00',
1496
+ ],
1497
+ ],
1498
+ fields: [
1499
+ {
1500
+ name: 'foo',
1501
+ },
1502
+ {
1503
+ name: '_time',
1504
+ },
1505
+ ],
1506
+ },
1507
+ meta: {},
1508
+ },
1509
+ }}
1510
+ />
1511
+ );
1512
+ ```
1513
+
1514
+ ## Sparkline Stroke Color - Red
1515
+
1516
+ - **Key:** Stroke Color
1517
+
1518
+ ```jsx
1519
+ import React from 'react';
1520
+ import SingleValue from '@splunk/visualizations/SingleValue';
1521
+
1522
+ export default () => (
1523
+ <SingleValue
1524
+ options={{
1525
+ sparklineStrokeColor: '#FF0000',
1526
+ }}
1527
+ dataSources={{
1528
+ primary: {
1529
+ data: {
1530
+ columns: [
1531
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1532
+ [
1533
+ '2018-08-19T00:00:00.000+00:00',
1534
+ '2018-08-20T00:00:00.000+00:00',
1535
+ '2018-08-21T00:00:00.000+00:00',
1536
+ '2018-08-22T00:00:00.000+00:00',
1537
+ '2018-08-23T00:00:00.000+00:00',
1538
+ '2018-08-24T00:00:00.000+00:00',
1539
+ '2018-08-25T00:00:00.000+00:00',
1540
+ '2018-08-26T00:00:00.000+00:00',
1541
+ ],
1542
+ ],
1543
+ fields: [
1544
+ {
1545
+ name: 'foo',
1546
+ },
1547
+ {
1548
+ name: '_time',
1549
+ },
1550
+ ],
1551
+ },
1552
+ meta: {},
1553
+ },
1554
+ }}
1555
+ />
1556
+ );
1557
+ ```
1558
+
1559
+ ## Sparkline Stroke Color - Based on Major Value
1560
+
1561
+ - **Key:** Stroke Color Using Major Value
1562
+
1563
+ ```jsx
1564
+ import React from 'react';
1565
+ import SingleValue from '@splunk/visualizations/SingleValue';
1566
+
1567
+ export default () => (
1568
+ <SingleValue
1569
+ context={{
1570
+ strokeColorThresholds: [
1571
+ {
1572
+ from: 1321,
1573
+ value: '#00FF00',
1574
+ },
1575
+ {
1576
+ to: 1321,
1577
+ value: '#00FFFF',
1578
+ },
1579
+ ],
1580
+ }}
1581
+ options={{
1582
+ majorValue: '> primary | seriesByIndex(0) | lastPoint()',
1583
+ sparklineStrokeColor: '> majorValue | rangeValue(strokeColorThresholds)',
1584
+ }}
1585
+ dataSources={{
1586
+ primary: {
1587
+ data: {
1588
+ columns: [
1589
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1590
+ [
1591
+ '2018-08-19T00:00:00.000+00:00',
1592
+ '2018-08-20T00:00:00.000+00:00',
1593
+ '2018-08-21T00:00:00.000+00:00',
1594
+ '2018-08-22T00:00:00.000+00:00',
1595
+ '2018-08-23T00:00:00.000+00:00',
1596
+ '2018-08-24T00:00:00.000+00:00',
1597
+ '2018-08-25T00:00:00.000+00:00',
1598
+ '2018-08-26T00:00:00.000+00:00',
1599
+ ],
1600
+ ],
1601
+ fields: [
1602
+ {
1603
+ name: 'foo',
1604
+ },
1605
+ {
1606
+ name: '_time',
1607
+ },
1608
+ ],
1609
+ },
1610
+ meta: {},
1611
+ },
1612
+ }}
1613
+ />
1614
+ );
1615
+ ```
1616
+
1617
+ ## Sparkline Stroke Color - Based on Trend Value
1618
+
1619
+ - **Key:** Stroke Color Using Trend Value
1620
+
1621
+ ```jsx
1622
+ import React from 'react';
1623
+ import SingleValue from '@splunk/visualizations/SingleValue';
1624
+
1625
+ export default () => (
1626
+ <SingleValue
1627
+ context={{
1628
+ strokeColorThresholds: [
1629
+ {
1630
+ from: 391,
1631
+ value: '#00FF00',
1632
+ },
1633
+ {
1634
+ to: 391,
1635
+ value: '#FF00FF',
1636
+ },
1637
+ ],
1638
+ }}
1639
+ options={{
1640
+ trendValue: '> primary | seriesByIndex(0) | delta(-2)',
1641
+ sparklineStrokeColor: '> trendValue | rangeValue(strokeColorThresholds)',
1642
+ }}
1643
+ dataSources={{
1644
+ primary: {
1645
+ data: {
1646
+ columns: [
1647
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1648
+ [
1649
+ '2018-08-19T00:00:00.000+00:00',
1650
+ '2018-08-20T00:00:00.000+00:00',
1651
+ '2018-08-21T00:00:00.000+00:00',
1652
+ '2018-08-22T00:00:00.000+00:00',
1653
+ '2018-08-23T00:00:00.000+00:00',
1654
+ '2018-08-24T00:00:00.000+00:00',
1655
+ '2018-08-25T00:00:00.000+00:00',
1656
+ '2018-08-26T00:00:00.000+00:00',
1657
+ ],
1658
+ ],
1659
+ fields: [
1660
+ {
1661
+ name: 'foo',
1662
+ },
1663
+ {
1664
+ name: '_time',
1665
+ },
1666
+ ],
1667
+ },
1668
+ meta: {},
1669
+ },
1670
+ }}
1671
+ />
1672
+ );
1673
+ ```
1674
+
1675
+ ## Sparkline Values - Based on Foo Field
1676
+
1677
+ - **Key:** Field Foo
1678
+
1679
+ ```jsx
1680
+ import React from 'react';
1681
+ import SingleValue from '@splunk/visualizations/SingleValue';
1682
+
1683
+ export default () => (
1684
+ <SingleValue
1685
+ options={{
1686
+ sparklineValues: '> primary | seriesByName("foo")',
1687
+ }}
1688
+ dataSources={{
1689
+ primary: {
1690
+ data: {
1691
+ columns: [
1692
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1693
+ ['1', '2', '3', '4', '5', '6', '7', '3200'],
1694
+ ],
1695
+ fields: [
1696
+ {
1697
+ name: 'foo',
1698
+ },
1699
+ {
1700
+ name: 'bar',
1701
+ },
1702
+ ],
1703
+ },
1704
+ meta: {},
1705
+ },
1706
+ }}
1707
+ />
1708
+ );
1709
+ ```
1710
+
1711
+ ## Sparkline Values - Based on Bar Field
1712
+
1713
+ - **Key:** Field Bar
1714
+
1715
+ ```jsx
1716
+ import React from 'react';
1717
+ import SingleValue from '@splunk/visualizations/SingleValue';
1718
+
1719
+ export default () => (
1720
+ <SingleValue
1721
+ options={{
1722
+ sparklineValues: '> primary | seriesByName("bar")',
1723
+ }}
1724
+ dataSources={{
1725
+ primary: {
1726
+ data: {
1727
+ columns: [
1728
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1729
+ ['1', '2', '3', '4', '5', '6', '7', '3200'],
1730
+ ],
1731
+ fields: [
1732
+ {
1733
+ name: 'foo',
1734
+ },
1735
+ {
1736
+ name: 'bar',
1737
+ },
1738
+ ],
1739
+ },
1740
+ meta: {},
1741
+ },
1742
+ }}
1743
+ />
1744
+ );
1745
+ ```
1746
+
1747
+ ## Trend Color - Red
1748
+
1749
+ - **Key:** Trend Color
1750
+
1751
+ ```jsx
1752
+ import React from 'react';
1753
+ import SingleValue from '@splunk/visualizations/SingleValue';
1754
+
1755
+ export default () => (
1756
+ <SingleValue
1757
+ options={{
1758
+ trendColor: '#FF0000',
1759
+ }}
1760
+ dataSources={{
1761
+ primary: {
1762
+ data: {
1763
+ columns: [
1764
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1765
+ [
1766
+ '2018-08-19T00:00:00.000+00:00',
1767
+ '2018-08-20T00:00:00.000+00:00',
1768
+ '2018-08-21T00:00:00.000+00:00',
1769
+ '2018-08-22T00:00:00.000+00:00',
1770
+ '2018-08-23T00:00:00.000+00:00',
1771
+ '2018-08-24T00:00:00.000+00:00',
1772
+ '2018-08-25T00:00:00.000+00:00',
1773
+ '2018-08-26T00:00:00.000+00:00',
1774
+ ],
1775
+ ],
1776
+ fields: [
1777
+ {
1778
+ name: 'foo',
1779
+ },
1780
+ {
1781
+ name: '_time',
1782
+ },
1783
+ ],
1784
+ },
1785
+ meta: {},
1786
+ },
1787
+ }}
1788
+ />
1789
+ );
1790
+ ```
1791
+
1792
+ ## Trend Color - Based on Custom Thresholds
1793
+
1794
+ - **Key:** Custom Trend Color Range
1795
+
1796
+ ```jsx
1797
+ import React from 'react';
1798
+ import SingleValue from '@splunk/visualizations/SingleValue';
1799
+
1800
+ export default () => (
1801
+ <SingleValue
1802
+ context={{
1803
+ trendColorThresholds: [
1804
+ {
1805
+ from: 1321,
1806
+ value: '#00FFFF',
1807
+ },
1808
+ {
1809
+ to: 1321,
1810
+ value: '#FF00FF',
1811
+ },
1812
+ ],
1813
+ }}
1814
+ options={{
1815
+ trendValue: '> sparklineValues | delta(-2)',
1816
+ trendColor: '> trendValue | rangeValue(trendColorThresholds)',
1817
+ }}
1818
+ dataSources={{
1819
+ primary: {
1820
+ data: {
1821
+ columns: [
1822
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1823
+ [
1824
+ '2018-08-19T00:00:00.000+00:00',
1825
+ '2018-08-20T00:00:00.000+00:00',
1826
+ '2018-08-21T00:00:00.000+00:00',
1827
+ '2018-08-22T00:00:00.000+00:00',
1828
+ '2018-08-23T00:00:00.000+00:00',
1829
+ '2018-08-24T00:00:00.000+00:00',
1830
+ '2018-08-25T00:00:00.000+00:00',
1831
+ '2018-08-26T00:00:00.000+00:00',
1832
+ ],
1833
+ ],
1834
+ fields: [
1835
+ {
1836
+ name: 'foo',
1837
+ },
1838
+ {
1839
+ name: '_time',
1840
+ },
1841
+ ],
1842
+ },
1843
+ meta: {},
1844
+ },
1845
+ }}
1846
+ />
1847
+ );
1848
+ ```
1849
+
1850
+ ## Trend Display - Off
1851
+
1852
+ - **Key:** No Trend Indicator
1853
+
1854
+ ```jsx
1855
+ import React from 'react';
1856
+ import SingleValue from '@splunk/visualizations/SingleValue';
1857
+
1858
+ export default () => (
1859
+ <SingleValue
1860
+ options={{
1861
+ trendDisplay: 'off',
1862
+ }}
1863
+ dataSources={{
1864
+ primary: {
1865
+ data: {
1866
+ columns: [
1867
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1868
+ [
1869
+ '2018-08-19T00:00:00.000+00:00',
1870
+ '2018-08-20T00:00:00.000+00:00',
1871
+ '2018-08-21T00:00:00.000+00:00',
1872
+ '2018-08-22T00:00:00.000+00:00',
1873
+ '2018-08-23T00:00:00.000+00:00',
1874
+ '2018-08-24T00:00:00.000+00:00',
1875
+ '2018-08-25T00:00:00.000+00:00',
1876
+ '2018-08-26T00:00:00.000+00:00',
1877
+ ],
1878
+ ],
1879
+ fields: [
1880
+ {
1881
+ name: 'foo',
1882
+ },
1883
+ {
1884
+ name: '_time',
1885
+ },
1886
+ ],
1887
+ },
1888
+ meta: {},
1889
+ },
1890
+ }}
1891
+ />
1892
+ );
1893
+ ```
1894
+
1895
+ ## Trend Display - Percent
1896
+
1897
+ - **Key:** Trend Mode Percent
1898
+
1899
+ ```jsx
1900
+ import React from 'react';
1901
+ import SingleValue from '@splunk/visualizations/SingleValue';
1902
+
1903
+ export default () => (
1904
+ <SingleValue
1905
+ options={{
1906
+ trendDisplay: 'percent',
1907
+ }}
1908
+ dataSources={{
1909
+ primary: {
1910
+ data: {
1911
+ columns: [
1912
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1913
+ [
1914
+ '2018-08-19T00:00:00.000+00:00',
1915
+ '2018-08-20T00:00:00.000+00:00',
1916
+ '2018-08-21T00:00:00.000+00:00',
1917
+ '2018-08-22T00:00:00.000+00:00',
1918
+ '2018-08-23T00:00:00.000+00:00',
1919
+ '2018-08-24T00:00:00.000+00:00',
1920
+ '2018-08-25T00:00:00.000+00:00',
1921
+ '2018-08-26T00:00:00.000+00:00',
1922
+ ],
1923
+ ],
1924
+ fields: [
1925
+ {
1926
+ name: 'foo',
1927
+ },
1928
+ {
1929
+ name: '_time',
1930
+ },
1931
+ ],
1932
+ },
1933
+ meta: {},
1934
+ },
1935
+ }}
1936
+ />
1937
+ );
1938
+ ```
1939
+
1940
+ ## Trend Value - Based on Foo Field
1941
+
1942
+ - **Key:** Trendvaluefoo
1943
+
1944
+ ```jsx
1945
+ import React from 'react';
1946
+ import SingleValue from '@splunk/visualizations/SingleValue';
1947
+
1948
+ export default () => (
1949
+ <SingleValue
1950
+ options={{
1951
+ trendValue: '> primary | seriesByName("foo") | delta(-2)',
1952
+ }}
1953
+ dataSources={{
1954
+ primary: {
1955
+ data: {
1956
+ columns: [
1957
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
1958
+ [
1959
+ '2018-08-19T00:00:00.000+00:00',
1960
+ '2018-08-20T00:00:00.000+00:00',
1961
+ '2018-08-21T00:00:00.000+00:00',
1962
+ '2018-08-22T00:00:00.000+00:00',
1963
+ '2018-08-23T00:00:00.000+00:00',
1964
+ '2018-08-24T00:00:00.000+00:00',
1965
+ '2018-08-25T00:00:00.000+00:00',
1966
+ '2018-08-26T00:00:00.000+00:00',
1967
+ ],
1968
+ ],
1969
+ fields: [
1970
+ {
1971
+ name: 'foo',
1972
+ },
1973
+ {
1974
+ name: '_time',
1975
+ },
1976
+ ],
1977
+ },
1978
+ meta: {},
1979
+ },
1980
+ }}
1981
+ />
1982
+ );
1983
+ ```
1984
+
1985
+ ## Trend Value - Based on Bar Field
1986
+
1987
+ - **Key:** Trend Value Bar
1988
+
1989
+ ```jsx
1990
+ import React from 'react';
1991
+ import SingleValue from '@splunk/visualizations/SingleValue';
1992
+
1993
+ export default () => (
1994
+ <SingleValue
1995
+ options={{
1996
+ sparklineValues: '> primary | seriesByName("bar")',
1997
+ majorValue: '> sparklineValues | lastPoint()',
1998
+ trendValue: '> sparklineValues | delta(-2)',
1999
+ }}
2000
+ dataSources={{
2001
+ primary: {
2002
+ data: {
2003
+ columns: [
2004
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
2005
+ ['1', '2', '3', '4', '5', '6', '7', '3200'],
2006
+ ],
2007
+ fields: [
2008
+ {
2009
+ name: 'foo',
2010
+ },
2011
+ {
2012
+ name: 'bar',
2013
+ },
2014
+ ],
2015
+ },
2016
+ meta: {},
2017
+ },
2018
+ }}
2019
+ />
2020
+ );
2021
+ ```
2022
+
2023
+ ## Trend Value - Based on difference between the first and last data points
2024
+
2025
+ - **Key:** Trendvaluecustomcomparator
2026
+
2027
+ ```jsx
2028
+ import React from 'react';
2029
+ import SingleValue from '@splunk/visualizations/SingleValue';
2030
+
2031
+ export default () => (
2032
+ <SingleValue
2033
+ options={{
2034
+ sparklineValues: '> primary | seriesByName("foo")',
2035
+ majorValue: '> sparklineValues | lastPoint()',
2036
+ trendValue: '> sparklineValues | delta(0)',
2037
+ }}
2038
+ dataSources={{
2039
+ primary: {
2040
+ data: {
2041
+ columns: [
2042
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
2043
+ [
2044
+ '2018-08-19T00:00:00.000+00:00',
2045
+ '2018-08-20T00:00:00.000+00:00',
2046
+ '2018-08-21T00:00:00.000+00:00',
2047
+ '2018-08-22T00:00:00.000+00:00',
2048
+ '2018-08-23T00:00:00.000+00:00',
2049
+ '2018-08-24T00:00:00.000+00:00',
2050
+ '2018-08-25T00:00:00.000+00:00',
2051
+ '2018-08-26T00:00:00.000+00:00',
2052
+ ],
2053
+ ],
2054
+ fields: [
2055
+ {
2056
+ name: 'foo',
2057
+ },
2058
+ {
2059
+ name: '_time',
2060
+ },
2061
+ ],
2062
+ },
2063
+ meta: {},
2064
+ },
2065
+ }}
2066
+ />
2067
+ );
2068
+ ```
2069
+
2070
+ ## Under Label - Specified
2071
+
2072
+ - **Key:** Under Label
2073
+
2074
+ ```jsx
2075
+ import React from 'react';
2076
+ import SingleValue from '@splunk/visualizations/SingleValue';
2077
+
2078
+ export default () => (
2079
+ <SingleValue
2080
+ options={{
2081
+ underLabel: 'Under Label Test',
2082
+ }}
2083
+ dataSources={{
2084
+ primary: {
2085
+ data: {
2086
+ columns: [
2087
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
2088
+ [
2089
+ '2018-08-19T00:00:00.000+00:00',
2090
+ '2018-08-20T00:00:00.000+00:00',
2091
+ '2018-08-21T00:00:00.000+00:00',
2092
+ '2018-08-22T00:00:00.000+00:00',
2093
+ '2018-08-23T00:00:00.000+00:00',
2094
+ '2018-08-24T00:00:00.000+00:00',
2095
+ '2018-08-25T00:00:00.000+00:00',
2096
+ '2018-08-26T00:00:00.000+00:00',
2097
+ ],
2098
+ ],
2099
+ fields: [
2100
+ {
2101
+ name: 'foo',
2102
+ },
2103
+ {
2104
+ name: '_time',
2105
+ },
2106
+ ],
2107
+ },
2108
+ meta: {},
2109
+ },
2110
+ }}
2111
+ />
2112
+ );
2113
+ ```
2114
+
2115
+ ## Under Label - Specified, Under Label Font Size - 30
2116
+
2117
+ - **Key:** Underlabelcustomfontsize
2118
+
2119
+ ```jsx
2120
+ import React from 'react';
2121
+ import SingleValue from '@splunk/visualizations/SingleValue';
2122
+
2123
+ export default () => (
2124
+ <SingleValue
2125
+ options={{
2126
+ underLabel: 'Under Label Test',
2127
+ underLabelFontSize: 30,
2128
+ }}
2129
+ dataSources={{
2130
+ primary: {
2131
+ data: {
2132
+ columns: [
2133
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
2134
+ [
2135
+ '2018-08-19T00:00:00.000+00:00',
2136
+ '2018-08-20T00:00:00.000+00:00',
2137
+ '2018-08-21T00:00:00.000+00:00',
2138
+ '2018-08-22T00:00:00.000+00:00',
2139
+ '2018-08-23T00:00:00.000+00:00',
2140
+ '2018-08-24T00:00:00.000+00:00',
2141
+ '2018-08-25T00:00:00.000+00:00',
2142
+ '2018-08-26T00:00:00.000+00:00',
2143
+ ],
2144
+ ],
2145
+ fields: [
2146
+ {
2147
+ name: 'foo',
2148
+ },
2149
+ {
2150
+ name: '_time',
2151
+ },
2152
+ ],
2153
+ },
2154
+ meta: {},
2155
+ },
2156
+ }}
2157
+ />
2158
+ );
2159
+ ```
2160
+
2161
+ ## Unit - Specified
2162
+
2163
+ - **Key:** Unit After
2164
+
2165
+ ```jsx
2166
+ import React from 'react';
2167
+ import SingleValue from '@splunk/visualizations/SingleValue';
2168
+
2169
+ export default () => (
2170
+ <SingleValue
2171
+ options={{
2172
+ unit: ' Total',
2173
+ }}
2174
+ dataSources={{
2175
+ primary: {
2176
+ data: {
2177
+ columns: [
2178
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
2179
+ [
2180
+ '2018-08-19T00:00:00.000+00:00',
2181
+ '2018-08-20T00:00:00.000+00:00',
2182
+ '2018-08-21T00:00:00.000+00:00',
2183
+ '2018-08-22T00:00:00.000+00:00',
2184
+ '2018-08-23T00:00:00.000+00:00',
2185
+ '2018-08-24T00:00:00.000+00:00',
2186
+ '2018-08-25T00:00:00.000+00:00',
2187
+ '2018-08-26T00:00:00.000+00:00',
2188
+ ],
2189
+ ],
2190
+ fields: [
2191
+ {
2192
+ name: 'foo',
2193
+ },
2194
+ {
2195
+ name: '_time',
2196
+ },
2197
+ ],
2198
+ },
2199
+ meta: {},
2200
+ },
2201
+ }}
2202
+ />
2203
+ );
2204
+ ```
2205
+
2206
+ ## Unit - Specified, Unit Position - Before
2207
+
2208
+ - **Key:** Unit Before
2209
+
2210
+ ```jsx
2211
+ import React from 'react';
2212
+ import SingleValue from '@splunk/visualizations/SingleValue';
2213
+
2214
+ export default () => (
2215
+ <SingleValue
2216
+ options={{
2217
+ unit: '$',
2218
+ unitPosition: 'before',
2219
+ }}
2220
+ dataSources={{
2221
+ primary: {
2222
+ data: {
2223
+ columns: [
2224
+ ['1', '62', '103', '308', '587', '876', '930', '1320'],
2225
+ [
2226
+ '2018-08-19T00:00:00.000+00:00',
2227
+ '2018-08-20T00:00:00.000+00:00',
2228
+ '2018-08-21T00:00:00.000+00:00',
2229
+ '2018-08-22T00:00:00.000+00:00',
2230
+ '2018-08-23T00:00:00.000+00:00',
2231
+ '2018-08-24T00:00:00.000+00:00',
2232
+ '2018-08-25T00:00:00.000+00:00',
2233
+ '2018-08-26T00:00:00.000+00:00',
2234
+ ],
2235
+ ],
2236
+ fields: [
2237
+ {
2238
+ name: 'foo',
2239
+ },
2240
+ {
2241
+ name: '_time',
2242
+ },
2243
+ ],
2244
+ },
2245
+ meta: {},
2246
+ },
2247
+ }}
2248
+ />
2249
+ );
2250
+ ```
2251
+
2252
+ ## Trellis
2253
+
2254
+ - **Key:** Trellis
2255
+
2256
+ ```jsx
2257
+ import React from 'react';
2258
+ import { FeatureFlagContextProvider } from '@splunk/visualization-context/FeatureFlagContext';
2259
+ import SingleValue from '@splunk/visualizations/SingleValue';
2260
+
2261
+ export default () => (
2262
+ <FeatureFlagContextProvider value={{ visualizations_enableTrellis: true }}>
2263
+ <SingleValue
2264
+ height={250}
2265
+ options={{
2266
+ splitByLayout: 'trellis',
2267
+ trellisSplitBy: 'component',
2268
+ trellisColumns: 3,
2269
+ trellis: {
2270
+ minColumnWidth: 400,
2271
+ },
2272
+ }}
2273
+ dataSources={{
2274
+ primary: {
2275
+ data: {
2276
+ fields: [
2277
+ {
2278
+ name: 'component',
2279
+ groupby_rank: '0',
2280
+ },
2281
+ {
2282
+ name: 'foo',
2283
+ },
2284
+ ],
2285
+ columns: [
2286
+ ['Database', 'API', 'Cache', 'Queue', 'Frontend', 'Backend'],
2287
+ ['1523', '2847', '1956', '3124', '2135', '2689'],
2288
+ ],
2289
+ },
2290
+ meta: {},
2291
+ },
2292
+ }}
2293
+ />
2294
+ </FeatureFlagContextProvider>
2295
+ );
2296
+ ```