@splunk/visualizations 28.4.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 (160) hide show
  1. package/Area.config.js +28 -7
  2. package/Area.config.js.map +2 -2
  3. package/Area.js +106 -39
  4. package/Area.js.map +2 -2
  5. package/Bar.config.js +28 -7
  6. package/Bar.config.js.map +2 -2
  7. package/Bar.js +106 -39
  8. package/Bar.js.map +2 -2
  9. package/Bubble.config.js +4 -4
  10. package/Bubble.config.js.map +2 -2
  11. package/Bubble.js +78 -30
  12. package/Bubble.js.map +2 -2
  13. package/CHANGELOG.external.md +89 -0
  14. package/ChoroplethSvg.js +74 -26
  15. package/ChoroplethSvg.js.map +2 -2
  16. package/Column.config.js +28 -7
  17. package/Column.config.js.map +2 -2
  18. package/Column.js +106 -39
  19. package/Column.js.map +2 -2
  20. package/Ellipse/config.d.ts.map +1 -1
  21. package/Ellipse.config.js +14 -5
  22. package/Ellipse.config.js.map +4 -4
  23. package/Ellipse.js +130 -73
  24. package/Ellipse.js.map +4 -4
  25. package/Events.js +74 -26
  26. package/Events.js.map +2 -2
  27. package/FillerGauge.js +234 -47
  28. package/FillerGauge.js.map +2 -2
  29. package/Image.js +74 -26
  30. package/Image.js.map +2 -2
  31. package/Line/lineUtils.d.ts.map +1 -1
  32. package/Line/mockdata/LineData.d.ts +95 -0
  33. package/Line/mockdata/LineData.d.ts.map +1 -1
  34. package/Line.config.js +28 -7
  35. package/Line.config.js.map +2 -2
  36. package/Line.js +122 -41
  37. package/Line.js.map +2 -2
  38. package/LinkGraph.js +74 -26
  39. package/LinkGraph.js.map +2 -2
  40. package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
  41. package/Map/PureMap/ClusterLayer.d.ts.map +1 -1
  42. package/Map/PureMap/MapUtils.d.ts +2 -2
  43. package/Map/PureMap/MapUtils.d.ts.map +1 -1
  44. package/Map/PureMap/PureMap.d.ts.map +1 -1
  45. package/Map.js +111 -37
  46. package/Map.js.map +2 -2
  47. package/Markdown/config.d.ts.map +1 -1
  48. package/Markdown.config.js +14 -5
  49. package/Markdown.config.js.map +4 -4
  50. package/Markdown.js +91 -34
  51. package/Markdown.js.map +4 -4
  52. package/MarkerGauge.js +243 -56
  53. package/MarkerGauge.js.map +4 -4
  54. package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts.map +1 -1
  55. package/NetworkGraph/PureNetworkGraph/components/Node.d.ts.map +1 -1
  56. package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts.map +1 -1
  57. package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts +78 -0
  58. package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts.map +1 -0
  59. package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts +1 -2
  60. package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -1
  61. package/NetworkGraph.config.js.map +2 -2
  62. package/NetworkGraph.js +365 -105
  63. package/NetworkGraph.js.map +4 -4
  64. package/PERFORMANCE.md +23 -0
  65. package/ParallelCoordinates/ParallelCoordinates.d.ts +1 -46
  66. package/ParallelCoordinates/ParallelCoordinates.d.ts.map +1 -1
  67. package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts +12 -58
  68. package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts.map +1 -1
  69. package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts +1 -0
  70. package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts.map +1 -1
  71. package/ParallelCoordinates.js +150 -153
  72. package/ParallelCoordinates.js.map +4 -4
  73. package/Pie/Pie.d.ts.map +1 -1
  74. package/Pie/config.d.ts.map +1 -1
  75. package/Pie/pieUtils.d.ts +4 -0
  76. package/Pie/pieUtils.d.ts.map +1 -1
  77. package/Pie.config.js +16 -0
  78. package/Pie.config.js.map +2 -2
  79. package/Pie.js +118 -35
  80. package/Pie.js.map +2 -2
  81. package/Punchcard.js +74 -26
  82. package/Punchcard.js.map +2 -2
  83. package/Rectangle/config.d.ts.map +1 -1
  84. package/Rectangle.config.js +14 -5
  85. package/Rectangle.config.js.map +4 -4
  86. package/Rectangle.js +92 -35
  87. package/Rectangle.js.map +4 -4
  88. package/Sankey/PureSankey/PureSankey.d.ts +26 -72
  89. package/Sankey/PureSankey/PureSankey.d.ts.map +1 -1
  90. package/Sankey/PureSankey/SankeyLink.d.ts +3 -19
  91. package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -1
  92. package/Sankey/PureSankey/SankeyNode.d.ts +3 -20
  93. package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -1
  94. package/Sankey/PureSankey/SankeyTooltip.d.ts +3 -24
  95. package/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -1
  96. package/Sankey.js +270 -336
  97. package/Sankey.js.map +2 -2
  98. package/Scatter.config.js +168 -147
  99. package/Scatter.config.js.map +4 -4
  100. package/Scatter.js +246 -179
  101. package/Scatter.js.map +4 -4
  102. package/SingleValue.js +96 -75
  103. package/SingleValue.js.map +2 -2
  104. package/SingleValueIcon/config.d.ts.map +1 -1
  105. package/SingleValueIcon.config.js +14 -5
  106. package/SingleValueIcon.config.js.map +4 -4
  107. package/SingleValueIcon.js +118 -76
  108. package/SingleValueIcon.js.map +4 -4
  109. package/SingleValueRadial/PureSingleValueRadial/GaugeGraph.d.ts.map +1 -1
  110. package/SingleValueRadial.js +95 -76
  111. package/SingleValueRadial.js.map +2 -2
  112. package/Table/Table.d.ts.map +1 -1
  113. package/Table/hooks.d.ts +2 -0
  114. package/Table/hooks.d.ts.map +1 -1
  115. package/Table.js +95 -49
  116. package/Table.js.map +2 -2
  117. package/Timeline/PureTimeline/PureTimeline.d.ts.map +1 -1
  118. package/Timeline/PureTimeline/src/TimelinePlugin.d.ts.map +1 -1
  119. package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
  120. package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +2 -1
  121. package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
  122. package/Timeline.js +154 -54
  123. package/Timeline.js.map +2 -2
  124. package/common/GaugeMajorTicks.js +150 -13
  125. package/common/GaugeMajorTicks.js.map +4 -4
  126. package/common/GaugeValueMarker.js +84 -17
  127. package/common/GaugeValueMarker.js.map +4 -4
  128. package/common/OptionsDoc.js.map +1 -1
  129. package/common/OverviewDoc.d.ts.map +1 -1
  130. package/common/OverviewDoc.js +2 -2
  131. package/common/OverviewDoc.js.map +2 -2
  132. package/common/TimeSeriesChartWrapper.d.ts.map +1 -1
  133. package/common/TimeSeriesChartWrapper.js +72 -24
  134. package/common/TimeSeriesChartWrapper.js.map +2 -2
  135. package/common/chartingUtils.d.ts +9 -3
  136. package/common/chartingUtils.d.ts.map +1 -1
  137. package/common/chartingUtils.js +21 -16
  138. package/common/chartingUtils.js.map +2 -2
  139. package/common/editorConfig/AxesChartDataConfig.d.ts +3 -3
  140. package/common/editorConfig/AxesChartDataConfig.d.ts.map +1 -1
  141. package/common/editorConfig/AxesChartDataDisplay.d.ts +4 -0
  142. package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -1
  143. package/common/editorConfig/AxesChartLegend.d.ts.map +1 -1
  144. package/common/gaugeUtils.d.ts +37 -0
  145. package/common/gaugeUtils.d.ts.map +1 -1
  146. package/common/gaugeUtils.js +152 -2
  147. package/common/gaugeUtils.js.map +4 -4
  148. package/common/hocs/mockdata/trellisData.d.ts +119 -0
  149. package/common/hocs/mockdata/trellisData.d.ts.map +1 -1
  150. package/common/interfaces/Overview.d.ts +1 -0
  151. package/common/interfaces/Overview.d.ts.map +1 -1
  152. package/common/interfaces/VizConfig.d.ts +2 -1
  153. package/common/interfaces/VizConfig.d.ts.map +1 -1
  154. package/common/utils/mapUtils.js.map +1 -1
  155. package/common/utils/trellisUtils.d.ts.map +1 -1
  156. package/common/utils/trellisUtils.js +4 -6
  157. package/common/utils/trellisUtils.js.map +2 -2
  158. package/common/withDashboardViz.js +74 -26
  159. package/common/withDashboardViz.js.map +2 -2
  160. package/package.json +36 -36
package/Pie/Pie.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Pie.d.ts","sourceRoot":"","sources":["../src/Pie/Pie.tsx"],"names":[],"mappings":"AAGA,OAAiB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAG7D,OAAO,MAAM,MAAM,UAAU,CAAC;AAc9B,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,KAAK,iBAAiB,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;AAClF,eAAO,MAAM,eAAe,EAAE,iBA6E7B,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAAI,gBAAW,EAAE,YAAO,EAAE,YAAO,YAIX,CAAC;AAEvD,QAAA,MAAM,GAAG;sEALqB,IAAK,OAAO;;;CAgBzC,CAAC;AACF,QAAA,MAAM,MAAM,KAAO,CAAC;AAEpB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC1B,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"Pie.d.ts","sourceRoot":"","sources":["../src/Pie/Pie.tsx"],"names":[],"mappings":"AAGA,OAAiB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAG7D,OAAO,MAAM,MAAM,UAAU,CAAC;AAc9B,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,KAAK,iBAAiB,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;AAClF,eAAO,MAAM,eAAe,EAAE,iBA8E7B,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAAI,gBAAW,EAAE,YAAO,EAAE,YAAO,YAIX,CAAC;AAEvD,QAAA,MAAM,GAAG;sEANiD,IAAK,OAC/D;;;CAgBC,CAAC;AACF,QAAA,MAAM,MAAM,KAAO,CAAC;AAEpB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC1B,eAAe,GAAG,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/Pie/config.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;;AA4M3D,wBAAqC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/Pie/config.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;;AA4N3D,wBAAqC"}
package/Pie/pieUtils.d.ts CHANGED
@@ -21,6 +21,10 @@ interface labelDisplayOptions extends PieOptions {
21
21
  * @returns {Object}
22
22
  */
23
23
  export declare const mapLabelDisplay: ({ labelDisplay, ...options }: labelDisplayOptions) => PieOptions;
24
+ interface LegendDisplayOptions extends PieOptions {
25
+ legendPlacement?: string;
26
+ }
27
+ export declare const mapLegendDisplay: (options: LegendDisplayOptions) => PieOptions;
24
28
  /**
25
29
  * Helper method to update the option names which can be mapped to SimpleXML options or
26
30
  * can be used directly with SC if don't have a 1-1 mapping in SimpleXML
@@ -1 +1 @@
1
- {"version":3,"file":"pieUtils.d.ts","sourceRoot":"","sources":["../src/Pie/pieUtils.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAE3D,UAAU,UAAU;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAeD;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAAI,SAAS,UAAU,KAAG,UAM3D,CAAC;AAEF,UAAU,mBAAoB,SAAQ,UAAU;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;GAKG;AACH,eAAO,M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AE,EAC3C,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,WAAW,SAAS,KACrB,OAYF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC7B,aAAa;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,EAC3C,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,WAAW,SAAS,KACrB,OASF,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAAI,YAAY,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,KAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAgBpG,CAAC"}
package/Pie.config.js CHANGED
@@ -371,6 +371,22 @@ var editorConfig = [
371
371
  }
372
372
  }
373
373
  ],
374
+ [
375
+ {
376
+ label: (0, i18n_exports._)("Legend display"),
377
+ option: "legendDisplay",
378
+ editor: "editor.select",
379
+ editorProps: {
380
+ values: [
381
+ { label: (0, i18n_exports._)("Off"), value: "off" },
382
+ { label: (0, i18n_exports._)("Right"), value: "right" },
383
+ { label: (0, i18n_exports._)("Left"), value: "left" },
384
+ { label: (0, i18n_exports._)("Top"), value: "top" },
385
+ { label: (0, i18n_exports._)("Bottom"), value: "bottom" }
386
+ ]
387
+ }
388
+ }
389
+ ],
374
390
  [
375
391
  {
376
392
  label: (0, i18n_exports._)("Percentage precision"),
package/Pie.config.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["src/Pie/config.ts", "esm-externals:@splunk/visualization-icons", "esm-externals:@splunk/visualization-icons/placeholders", "esm-externals:@splunk/ui-utils/i18n", "esm-externals:@splunk/visualization-schemas", "esm-externals:@splunk/themes", "esm-externals:lodash", "esm-externals:@splunk/visualizations-shared/configUtils", "src/common/utils/configUtils.ts", "src/common/editorConfig/BackgroundColor.ts", "src/common/editorConfig/TrellisEditors.ts", "esm-externals:@splunk/themes/pick", "esm-externals:@splunk/themes/variables", "src/common/ThemedDefaults.tsx"],
4
- "sourcesContent": ["import { Pie as PieIcon } from '@splunk/visualization-icons';\nimport { Pie as PiePlaceholderIcon } from '@splunk/visualization-icons/placeholders';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport { pieOptionsSchema as optionsSchema } from '@splunk/visualization-schemas';\nimport { pick, variables } from '@splunk/themes';\nimport { DataContract } from '../common/interfaces/DataContract';\nimport { DefaultContext } from '../common/interfaces/DefaultContext';\nimport { EditorConfig } from '../common/interfaces/Editor';\nimport { ThemedDefaults } from '../common/interfaces/ThemedDefaults';\nimport { VizBehavior } from '../common/interfaces/VizBehavior';\nimport { VizCategory } from '../common/interfaces/VizCategory';\nimport { VizConfig } from '../common/interfaces/VizConfig';\nimport { VizSize } from '../common/interfaces/VizSize';\nimport { enhanceConfig } from '../common/utils/configUtils';\nimport getBackgroundColorEditor from '../common/editorConfig/BackgroundColor';\nimport { TrellisEditorConfig, TrellisBackgroundColorEditor } from '../common/editorConfig/TrellisEditors';\nimport { defaultBackgroundColor } from '../common/ThemedDefaults';\n\nconst dataContract: DataContract = {\n requiredDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n optionalDataSources: [\n // Note: SCP-14090 disable ui for optional datasources. We may need to add it back later\n // {\n // name: 'annotation',\n // description: 'DataSource that populate event annotations',\n // },\n ],\n initialRequestParams: {\n primary: { offset: 0, count: 10000 },\n },\n};\n\nconst size: VizSize = {\n initialWidth: 300,\n initialHeight: 300,\n};\n\nconst defaultContext: DefaultContext = {};\n\nconst themes: ThemedDefaults = {\n defaultBackgroundColor,\n defaultFontColor: props =>\n pick({\n enterprise: {\n dark: variables.textColor(props),\n light: variables.textColor(props),\n },\n prisma: variables.contentColorDefault(props),\n })(props),\n};\n\nconst editorConfig: EditorConfig[] = [\n {\n label: _('Data configurations'),\n layout: [\n [\n {\n label: _('Label'),\n editor: 'editor.columnSelector',\n option: 'label',\n context: 'valuesContext',\n editorProps: {\n dataSourceKey: 'primary',\n },\n },\n ],\n [\n {\n label: _('Value'),\n editor: 'editor.columnSelector',\n option: 'value',\n context: 'valuesContext',\n editorProps: {\n dataSourceKey: 'primary',\n },\n },\n ],\n ],\n },\n {\n label: _('Data display'),\n layout: [\n [\n {\n label: _('Display type'),\n option: 'showDonutHole',\n editor: 'editor.radioBar',\n editorProps: {\n values: [\n { label: _('Pie'), value: false },\n { label: _('Donut'), value: true },\n ],\n },\n },\n ],\n [\n {\n label: _('Label display'),\n option: 'labelDisplay',\n editor: 'editor.select',\n editorProps: {\n values: [\n { label: _('Values'), value: 'values' },\n {\n label: _('Values & Percent'),\n value: 'valuesAndPercentage',\n },\n { label: _('Off'), value: 'off' },\n ],\n },\n },\n ],\n [\n {\n label: _('Percentage precision'),\n option: 'percentagePrecision',\n editor: 'editor.number',\n editorProps: {\n min: 0,\n max: 16,\n step: 1,\n },\n showEditor: ({ options }) => options.labelDisplay === 'valuesAndPercentage',\n },\n ],\n [\n {\n label: _('Collapse threshold'),\n option: 'collapseThreshold',\n editor: 'editor.number',\n editorProps: {\n min: 0,\n max: 1,\n step: 0.01,\n },\n },\n ],\n [\n {\n label: _('Exclude zeros in the collapsed slice'),\n option: 'collapseExcludeZero',\n editor: 'editor.toggle',\n },\n ],\n [\n {\n label: _('Collapsed slice label'),\n option: 'collapseLabel',\n editor: 'editor.text',\n },\n ],\n ...TrellisEditorConfig,\n ],\n },\n {\n label: _('Color and style'),\n layout: [\n [\n {\n label: _('Series colors'),\n option: 'seriesColors',\n editor: 'editor.seriesColors',\n },\n ],\n getBackgroundColorEditor({ themes }),\n [\n {\n ...TrellisBackgroundColorEditor,\n editorProps: {\n themes,\n },\n },\n ],\n ],\n },\n];\n\n/**\n * visualization configuration\n */\nconst config: VizConfig = {\n /**\n * unique viz key\n */\n key: 'splunk.pie',\n /**\n * viz name\n */\n name: _('Pie'),\n category: VizCategory.COMPARISONS,\n /**\n * viz icon\n */\n icon: PieIcon,\n placeholderIcon: PiePlaceholderIcon,\n dataContract,\n size,\n defaultContext,\n optionsSchema,\n editorConfig,\n events: {\n 'point.click': {\n description: 'triggered when user clicks on a point in the pie chart',\n },\n },\n\n supports: [VizBehavior.DYNAMIC_OPTIONS, VizBehavior.PLACEHOLDER, VizBehavior.EVENTS, VizBehavior.TRELLIS],\n themes,\n};\n\nexport default enhanceConfig(config);\n", "\nimport * as defaultImport from \"@splunk/visualization-icons\";\nexport * from \"@splunk/visualization-icons\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualization-icons/placeholders\";\nexport * from \"@splunk/visualization-icons/placeholders\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/ui-utils/i18n\";\nexport * from \"@splunk/ui-utils/i18n\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualization-schemas\";\nexport * from \"@splunk/visualization-schemas\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/themes\";\nexport * from \"@splunk/themes\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"lodash\";\nexport * from \"lodash\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualizations-shared/configUtils\";\nexport * from \"@splunk/visualizations-shared/configUtils\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import { get, range } from 'lodash';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\nimport { VizConfig } from '../interfaces/VizConfig';\nimport { EditorLayoutConfig, EditorConfig } from '../interfaces/Editor';\n\n// included for backwards compatibility\nexport { enhanceOptionsSchemaWithDynamicOptions } from '@splunk/visualization-schemas';\n\nexport interface PresetEntry {\n name: string;\n value: any;\n label: string;\n}\n\n/**\n * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block\n * this function also collapse all editor panels\n * @param vizConfig a Visualization Config\n * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports\n * and containing `open: false` for all editor panels in editorConfig\n */\nfunction enhanceConfig(vizConfig: VizConfig): VizConfig {\n const enhancedConfig: VizConfig = { ...vizConfig };\n\n enhancedConfig.editorConfig = vizConfig.editorConfig.map((config: EditorConfig): EditorConfig => {\n return { ...config, open: config.open || false };\n });\n return enhancedConfig;\n}\n\n/**\n * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig\n * Created for editor unit tests\n * @param vizConfig a Visualization Config\n * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig\n */\nfunction uncollapseEditorConfig(vizConfig: VizConfig): VizConfig {\n const editorPanelUncollapsedConfig: VizConfig = { ...vizConfig };\n editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: true };\n }\n );\n return editorPanelUncollapsedConfig;\n}\n\n// private helpers to improve readability of getInitialPreset\n// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset\n\n/**\n * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset\n * if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset\n * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext\n * the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up\n *\n * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values\n */\nfunction hasCompatibleContexts(\n vizContext: { [configKey: string]: any },\n presetContext: { [configKey: string]: any }\n): boolean {\n const presetContextKeys = Object.keys(presetContext);\n return presetContextKeys.every(\n (contextKey): boolean =>\n (presetContext[contextKey] === undefined && vizContext[contextKey] === undefined) ||\n (presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined)\n );\n}\n\n/**\n * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions\n */\nfunction hasCompatibleOptions(\n vizOptions: { [configKey: string]: any },\n presetOptions: { [configKey: string]: any }\n): boolean {\n const presetOptionKeys = Object.keys(presetOptions);\n return presetOptionKeys.every(\n (optionKey): boolean =>\n isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey])\n );\n}\n\n/**\n * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions\n * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure\n *\n * @param {Object} vizContext - the current vizContext definition\n * @param {Object} vizOptions - the current vizOptions definition\n * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset\n */\nfunction getInitialPreset(\n vizContext: { [configKey: string]: any },\n vizOptions: { [configKey: string]: any },\n presets: PresetEntry[]\n): PresetEntry | null {\n return presets.find((preset): boolean => {\n const presetContext = get(preset, ['value', 'context'], {});\n const presetOptions = get(preset, ['value', 'options'], {});\n const presetContextKeys = Object.keys(presetContext);\n const presetOptionKeys = Object.keys(presetOptions);\n\n // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)\n // if not, then the preset is invalid in config.ts\n if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;\n\n return (\n hasCompatibleContexts(vizContext, presetContext) &&\n hasCompatibleOptions(vizOptions, presetOptions)\n );\n });\n}\n\ninterface PrecisionOption {\n label: string;\n value: number;\n}\n\n/**\n * generates number precision values for a Select editor\n *\n * @param {Number} numPrecisionValues - number of integer precision values to generate\n * @returns {{ label: string; value; string }[]} array of { label, value } tuples\n */\nfunction generatePrecisionValues(numPrecisionValues: number): PrecisionOption[] {\n return range(0, numPrecisionValues + 1).map(\n (i): PrecisionOption => ({\n label: `${i} (0${i > 0 ? '.' : ''}${'0'.repeat(i)})`, // e.g. 0.000 for numPrecisionValues = 3\n value: i,\n })\n );\n}\n\nexport { enhanceConfig, getInitialPreset, generatePrecisionValues, uncollapseEditorConfig, isDynamicOption };\n\n/**\n * insert layout in layout array, return a new layout array instead of updating the original\n *\n * @param {EditorLayoutConfig[][]} layout - editor layout\n * @param {Number} index - the index to insert layout item(s)\n * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert\n * @returns {EditorLayoutConfig[][]} new editor layout with insertion\n */\nexport const insertLayout = (\n layout: EditorLayoutConfig[][],\n index: number,\n ...layoutItems: EditorLayoutConfig[][]\n): EditorLayoutConfig[][] => [\n // copy part of the array before the specified index\n ...layout.slice(0, index),\n // inserted layout item\n ...layoutItems,\n // copy part of the array after the specified index\n ...layout.slice(index),\n];\n", "import { _ } from '@splunk/ui-utils/i18n';\nimport { EditorLayoutConfig } from '../interfaces/Editor';\nimport { ThemedDefaults } from '../interfaces/ThemedDefaults';\n\ninterface backgroundEditorProps {\n label?: string;\n themes: ThemedDefaults;\n labelPosition?: string;\n}\n\nconst background: ({ label, themes, labelPosition }: backgroundEditorProps) => EditorLayoutConfig[] = ({\n label,\n themes,\n labelPosition,\n}) => [\n {\n label: _(label || 'Background color'),\n option: 'backgroundColor',\n editor: 'editor.color',\n editorProps: {\n labelPosition: labelPosition || 'top',\n themes,\n },\n },\n];\n\nexport default background;\n", "import { _ } from '@splunk/ui-utils/i18n';\nimport { LAYOUT_TYPE } from '@splunk/visualization-schemas';\n\nexport const isTrellisFeatureFlagOn = ({ featureFlags }): boolean => {\n return Boolean(featureFlags?.visualizations_enableTrellis);\n};\n\nexport const isTrellisEnabled = ({ options, featureFlags }): boolean => {\n const { splitByLayout = LAYOUT_TYPE.Off } = options;\n return isTrellisFeatureFlagOn({ featureFlags }) && splitByLayout === LAYOUT_TYPE.Trellis;\n};\n\nexport const TrellisEditorConfig = [\n [\n {\n label: _('Trellis layout'),\n option: 'splitByLayout',\n editor: 'editor.toggle',\n showEditor: isTrellisFeatureFlagOn,\n },\n ],\n [\n {\n label: _('Split by'),\n option: 'trellisSplitBy',\n editor: 'editor.trellisSplitBy',\n editorProps: {\n dataSourceKey: 'primary',\n },\n showEditor: isTrellisEnabled,\n },\n ],\n [\n {\n label: _('Number of columns'),\n option: 'trellisColumns',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n ],\n [\n {\n label: _('Min column width'),\n option: 'trellisMinColumnWidth',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n {\n label: _('Row height'),\n option: 'trellisRowHeight',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n ],\n [\n {\n label: _('Max number of components per page'),\n option: 'trellisPageCount',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n ],\n];\n\nexport const TimechartTrellisEditorConfig = [\n [\n {\n label: _('Trellis layout'),\n option: 'splitByLayout',\n editor: 'editor.toggle',\n showEditor: isTrellisFeatureFlagOn,\n // add help text for timecharts\n editorProps: {\n help: _(\n 'Y2-axis and overlay field configurations are not supported when trellis is enabled.'\n ),\n helpFormat: 'under',\n },\n },\n ],\n ...TrellisEditorConfig.slice(1),\n [\n {\n label: _('Shared y-axis scale'),\n option: 'trellisSharedScale',\n editor: 'editor.checkbox',\n showEditor: isTrellisEnabled,\n },\n ],\n];\n\nexport const TrellisBackgroundColorEditor = {\n label: _('Trellis background'),\n option: 'trellisBackgroundColor',\n editor: 'editor.color',\n showEditor: isTrellisEnabled,\n};\n", "\nimport * as defaultImport from \"@splunk/themes/pick\";\nexport * from \"@splunk/themes/pick\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/themes/variables\";\nexport * from \"@splunk/themes/variables\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import pick from '@splunk/themes/pick';\nimport variables from '@splunk/themes/variables';\n\nexport const defaultBackgroundColor = props =>\n pick({\n enterprise: {\n dark: variables.black(props),\n light: variables.white(props),\n },\n prisma: variables.backgroundColorSection(props),\n })(props);\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA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MACnC;AAAA,QACI,iCACO,+BADP;AAAA,UAEI,aAAa;AAAA,YACT;AAAA,UACJ;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACJ;AAKA,IAAM,SAAoB;AAAA;AAAA;AAAA;AAAA,EAItB,KAAK;AAAA;AAAA;AAAA;AAAA,EAIL,UAAM,gBAAE,KAAK;AAAA,EACb;AAAA;AAAA;AAAA;AAAA,EAIA,MAAM,4BAAAC;AAAA,EACN,iBAAiB,qBAAAC;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA,6CAAAC;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,IACJ,eAAe;AAAA,MACX,aAAa;AAAA,IACjB;AAAA,EACJ;AAAA,EAEA,UAAU,yHAA8F;AAAA,EACxG;AACJ;AAEA,IAAO,iBAAQ,cAAc,MAAM;",
4
+ "sourcesContent": ["import { Pie as PieIcon } from '@splunk/visualization-icons';\nimport { Pie as PiePlaceholderIcon } from '@splunk/visualization-icons/placeholders';\nimport { _ } from '@splunk/ui-utils/i18n';\nimport { pieOptionsSchema as optionsSchema } from '@splunk/visualization-schemas';\nimport { pick, variables } from '@splunk/themes';\nimport { DataContract } from '../common/interfaces/DataContract';\nimport { DefaultContext } from '../common/interfaces/DefaultContext';\nimport { EditorConfig } from '../common/interfaces/Editor';\nimport { ThemedDefaults } from '../common/interfaces/ThemedDefaults';\nimport { VizBehavior } from '../common/interfaces/VizBehavior';\nimport { VizCategory } from '../common/interfaces/VizCategory';\nimport { VizConfig } from '../common/interfaces/VizConfig';\nimport { VizSize } from '../common/interfaces/VizSize';\nimport { enhanceConfig } from '../common/utils/configUtils';\nimport getBackgroundColorEditor from '../common/editorConfig/BackgroundColor';\nimport { TrellisEditorConfig, TrellisBackgroundColorEditor } from '../common/editorConfig/TrellisEditors';\nimport { defaultBackgroundColor } from '../common/ThemedDefaults';\n\nconst dataContract: DataContract = {\n requiredDataSources: [\n {\n name: 'primary',\n description: 'DataSource that powers the visualization',\n },\n ],\n optionalDataSources: [\n // Note: SCP-14090 disable ui for optional datasources. We may need to add it back later\n // {\n // name: 'annotation',\n // description: 'DataSource that populate event annotations',\n // },\n ],\n initialRequestParams: {\n primary: { offset: 0, count: 10000 },\n },\n};\n\nconst size: VizSize = {\n initialWidth: 300,\n initialHeight: 300,\n};\n\nconst defaultContext: DefaultContext = {};\n\nconst themes: ThemedDefaults = {\n defaultBackgroundColor,\n defaultFontColor: props =>\n pick({\n enterprise: {\n dark: variables.textColor(props),\n light: variables.textColor(props),\n },\n prisma: variables.contentColorDefault(props),\n })(props),\n};\n\nconst editorConfig: EditorConfig[] = [\n {\n label: _('Data configurations'),\n layout: [\n [\n {\n label: _('Label'),\n editor: 'editor.columnSelector',\n option: 'label',\n context: 'valuesContext',\n editorProps: {\n dataSourceKey: 'primary',\n },\n },\n ],\n [\n {\n label: _('Value'),\n editor: 'editor.columnSelector',\n option: 'value',\n context: 'valuesContext',\n editorProps: {\n dataSourceKey: 'primary',\n },\n },\n ],\n ],\n },\n {\n label: _('Data display'),\n layout: [\n [\n {\n label: _('Display type'),\n option: 'showDonutHole',\n editor: 'editor.radioBar',\n editorProps: {\n values: [\n { label: _('Pie'), value: false },\n { label: _('Donut'), value: true },\n ],\n },\n },\n ],\n [\n {\n label: _('Label display'),\n option: 'labelDisplay',\n editor: 'editor.select',\n editorProps: {\n values: [\n { label: _('Values'), value: 'values' },\n {\n label: _('Values & Percent'),\n value: 'valuesAndPercentage',\n },\n { label: _('Off'), value: 'off' },\n ],\n },\n },\n ],\n [\n {\n label: _('Legend display'),\n option: 'legendDisplay',\n editor: 'editor.select',\n editorProps: {\n values: [\n { label: _('Off'), value: 'off' },\n { label: _('Right'), value: 'right' },\n { label: _('Left'), value: 'left' },\n { label: _('Top'), value: 'top' },\n { label: _('Bottom'), value: 'bottom' },\n ],\n },\n },\n ],\n [\n {\n label: _('Percentage precision'),\n option: 'percentagePrecision',\n editor: 'editor.number',\n editorProps: {\n min: 0,\n max: 16,\n step: 1,\n },\n showEditor: ({ options }) => options.labelDisplay === 'valuesAndPercentage',\n },\n ],\n [\n {\n label: _('Collapse threshold'),\n option: 'collapseThreshold',\n editor: 'editor.number',\n editorProps: {\n min: 0,\n max: 1,\n step: 0.01,\n },\n },\n ],\n [\n {\n label: _('Exclude zeros in the collapsed slice'),\n option: 'collapseExcludeZero',\n editor: 'editor.toggle',\n },\n ],\n [\n {\n label: _('Collapsed slice label'),\n option: 'collapseLabel',\n editor: 'editor.text',\n },\n ],\n ...TrellisEditorConfig,\n ],\n },\n {\n label: _('Color and style'),\n layout: [\n [\n {\n label: _('Series colors'),\n option: 'seriesColors',\n editor: 'editor.seriesColors',\n },\n ],\n getBackgroundColorEditor({ themes }),\n [\n {\n ...TrellisBackgroundColorEditor,\n editorProps: {\n themes,\n },\n },\n ],\n ],\n },\n];\n\n/**\n * visualization configuration\n */\nconst config: VizConfig = {\n /**\n * unique viz key\n */\n key: 'splunk.pie',\n /**\n * viz name\n */\n name: _('Pie'),\n category: VizCategory.COMPARISONS,\n /**\n * viz icon\n */\n icon: PieIcon,\n placeholderIcon: PiePlaceholderIcon,\n dataContract,\n size,\n defaultContext,\n optionsSchema,\n editorConfig,\n events: {\n 'point.click': {\n description: 'triggered when user clicks on a point in the pie chart',\n },\n },\n\n supports: [VizBehavior.DYNAMIC_OPTIONS, VizBehavior.PLACEHOLDER, VizBehavior.EVENTS, VizBehavior.TRELLIS],\n themes,\n};\n\nexport default enhanceConfig(config);\n", "\nimport * as defaultImport from \"@splunk/visualization-icons\";\nexport * from \"@splunk/visualization-icons\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualization-icons/placeholders\";\nexport * from \"@splunk/visualization-icons/placeholders\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/ui-utils/i18n\";\nexport * from \"@splunk/ui-utils/i18n\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualization-schemas\";\nexport * from \"@splunk/visualization-schemas\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/themes\";\nexport * from \"@splunk/themes\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"lodash\";\nexport * from \"lodash\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/visualizations-shared/configUtils\";\nexport * from \"@splunk/visualizations-shared/configUtils\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import { get, range } from 'lodash';\nimport { isDynamicOption } from '@splunk/visualizations-shared/configUtils';\nimport { VizConfig } from '../interfaces/VizConfig';\nimport { EditorLayoutConfig, EditorConfig } from '../interfaces/Editor';\n\n// included for backwards compatibility\nexport { enhanceOptionsSchemaWithDynamicOptions } from '@splunk/visualization-schemas';\n\nexport interface PresetEntry {\n name: string;\n value: any;\n label: string;\n}\n\n/**\n * Helper function to enhance a Visualization Config as needed based on behaviors specified in supports block\n * this function also collapse all editor panels\n * @param vizConfig a Visualization Config\n * @returns an enhanced Visualization Config containing updated config entries based on behaviors it supports\n * and containing `open: false` for all editor panels in editorConfig\n */\nfunction enhanceConfig(vizConfig: VizConfig): VizConfig {\n const enhancedConfig: VizConfig = { ...vizConfig };\n\n enhancedConfig.editorConfig = vizConfig.editorConfig.map((config: EditorConfig): EditorConfig => {\n return { ...config, open: config.open || false };\n });\n return enhancedConfig;\n}\n\n/**\n * Helper function to uncollapse all editor panels by adding `open: true` to the editorConfig\n * Created for editor unit tests\n * @param vizConfig a Visualization Config\n * @returns a Visualization Config containing `open: true` for all editor panels in editorConfig\n */\nfunction uncollapseEditorConfig(vizConfig: VizConfig): VizConfig {\n const editorPanelUncollapsedConfig: VizConfig = { ...vizConfig };\n editorPanelUncollapsedConfig.editorConfig = vizConfig.editorConfig.map(\n (config: EditorConfig): EditorConfig => {\n return { ...config, open: true };\n }\n );\n return editorPanelUncollapsedConfig;\n}\n\n// private helpers to improve readability of getInitialPreset\n// this shouldn't be tested since this util isn't something that we expect to use outside of getInitialPreset\n\n/**\n * this checks to make sure that all values within vizContext are compatible with the given preset's context to determine the initialPreset\n * if a preset has explicitly specified a key as being undefined, the vizContext must also has that key as undefined, or else this CANNOT be the initialPreset\n * the inverse is true; if a preset has key is NOT undefined, it must also be NOT undefined in the corresponding vizContext\n * the internal config contents are irrelevant (as the user could customize them in source), just as long as the presence of `undefined`s match up\n *\n * Since the presetConfigs have explicit undefined keys to override the existing config, we need to explicitly check the undefined values\n */\nfunction hasCompatibleContexts(\n vizContext: { [configKey: string]: any },\n presetContext: { [configKey: string]: any }\n): boolean {\n const presetContextKeys = Object.keys(presetContext);\n return presetContextKeys.every(\n (contextKey): boolean =>\n (presetContext[contextKey] === undefined && vizContext[contextKey] === undefined) ||\n (presetContext[contextKey] !== undefined && vizContext[contextKey] !== undefined)\n );\n}\n\n/**\n * Checks to make sure that dynamic (non-dynamic) options in a given preset are also dynamic (non-dynamic) in the vizOptions\n */\nfunction hasCompatibleOptions(\n vizOptions: { [configKey: string]: any },\n presetOptions: { [configKey: string]: any }\n): boolean {\n const presetOptionKeys = Object.keys(presetOptions);\n return presetOptionKeys.every(\n (optionKey): boolean =>\n isDynamicOption(presetOptions[optionKey]) === isDynamicOption(vizOptions[optionKey])\n );\n}\n\n/**\n * Evaluates whether there is an initialPreset that fits the current state of vizContext + vizOptions\n * This function ignores extraneous vizOptions or vizContext keys, as they could be outside the scope of what the preset is intended to configure\n *\n * @param {Object} vizContext - the current vizContext definition\n * @param {Object} vizOptions - the current vizOptions definition\n * @param {PresetEntry[]} presets - the list of presets, one of which can be considered an initialPreset\n */\nfunction getInitialPreset(\n vizContext: { [configKey: string]: any },\n vizOptions: { [configKey: string]: any },\n presets: PresetEntry[]\n): PresetEntry | null {\n return presets.find((preset): boolean => {\n const presetContext = get(preset, ['value', 'context'], {});\n const presetOptions = get(preset, ['value', 'options'], {});\n const presetContextKeys = Object.keys(presetContext);\n const presetOptionKeys = Object.keys(presetOptions);\n\n // all presets have to explicitly specify which options to reset (i.e. need explicitly undefined keys)\n // if not, then the preset is invalid in config.ts\n if (presetContextKeys.length === 0 || presetOptionKeys.length === 0) return false;\n\n return (\n hasCompatibleContexts(vizContext, presetContext) &&\n hasCompatibleOptions(vizOptions, presetOptions)\n );\n });\n}\n\ninterface PrecisionOption {\n label: string;\n value: number;\n}\n\n/**\n * generates number precision values for a Select editor\n *\n * @param {Number} numPrecisionValues - number of integer precision values to generate\n * @returns {{ label: string; value; string }[]} array of { label, value } tuples\n */\nfunction generatePrecisionValues(numPrecisionValues: number): PrecisionOption[] {\n return range(0, numPrecisionValues + 1).map(\n (i): PrecisionOption => ({\n label: `${i} (0${i > 0 ? '.' : ''}${'0'.repeat(i)})`, // e.g. 0.000 for numPrecisionValues = 3\n value: i,\n })\n );\n}\n\nexport { enhanceConfig, getInitialPreset, generatePrecisionValues, uncollapseEditorConfig, isDynamicOption };\n\n/**\n * insert layout in layout array, return a new layout array instead of updating the original\n *\n * @param {EditorLayoutConfig[][]} layout - editor layout\n * @param {Number} index - the index to insert layout item(s)\n * @param {EditorLayoutConfig[][]} layoutItems - the item(s) to insert\n * @returns {EditorLayoutConfig[][]} new editor layout with insertion\n */\nexport const insertLayout = (\n layout: EditorLayoutConfig[][],\n index: number,\n ...layoutItems: EditorLayoutConfig[][]\n): EditorLayoutConfig[][] => [\n // copy part of the array before the specified index\n ...layout.slice(0, index),\n // inserted layout item\n ...layoutItems,\n // copy part of the array after the specified index\n ...layout.slice(index),\n];\n", "import { _ } from '@splunk/ui-utils/i18n';\nimport { EditorLayoutConfig } from '../interfaces/Editor';\nimport { ThemedDefaults } from '../interfaces/ThemedDefaults';\n\ninterface backgroundEditorProps {\n label?: string;\n themes: ThemedDefaults;\n labelPosition?: string;\n}\n\nconst background: ({ label, themes, labelPosition }: backgroundEditorProps) => EditorLayoutConfig[] = ({\n label,\n themes,\n labelPosition,\n}) => [\n {\n label: _(label || 'Background color'),\n option: 'backgroundColor',\n editor: 'editor.color',\n editorProps: {\n labelPosition: labelPosition || 'top',\n themes,\n },\n },\n];\n\nexport default background;\n", "import { _ } from '@splunk/ui-utils/i18n';\nimport { LAYOUT_TYPE } from '@splunk/visualization-schemas';\n\nexport const isTrellisFeatureFlagOn = ({ featureFlags }): boolean => {\n return Boolean(featureFlags?.visualizations_enableTrellis);\n};\n\nexport const isTrellisEnabled = ({ options, featureFlags }): boolean => {\n const { splitByLayout = LAYOUT_TYPE.Off } = options;\n return isTrellisFeatureFlagOn({ featureFlags }) && splitByLayout === LAYOUT_TYPE.Trellis;\n};\n\nexport const TrellisEditorConfig = [\n [\n {\n label: _('Trellis layout'),\n option: 'splitByLayout',\n editor: 'editor.toggle',\n showEditor: isTrellisFeatureFlagOn,\n },\n ],\n [\n {\n label: _('Split by'),\n option: 'trellisSplitBy',\n editor: 'editor.trellisSplitBy',\n editorProps: {\n dataSourceKey: 'primary',\n },\n showEditor: isTrellisEnabled,\n },\n ],\n [\n {\n label: _('Number of columns'),\n option: 'trellisColumns',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n ],\n [\n {\n label: _('Min column width'),\n option: 'trellisMinColumnWidth',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n {\n label: _('Row height'),\n option: 'trellisRowHeight',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n ],\n [\n {\n label: _('Max number of components per page'),\n option: 'trellisPageCount',\n editor: 'editor.number',\n editorProps: {\n min: 1,\n },\n showEditor: isTrellisEnabled,\n },\n ],\n];\n\nexport const TimechartTrellisEditorConfig = [\n [\n {\n label: _('Trellis layout'),\n option: 'splitByLayout',\n editor: 'editor.toggle',\n showEditor: isTrellisFeatureFlagOn,\n // add help text for timecharts\n editorProps: {\n help: _(\n 'Y2-axis and overlay field configurations are not supported when trellis is enabled.'\n ),\n helpFormat: 'under',\n },\n },\n ],\n ...TrellisEditorConfig.slice(1),\n [\n {\n label: _('Shared y-axis scale'),\n option: 'trellisSharedScale',\n editor: 'editor.checkbox',\n showEditor: isTrellisEnabled,\n },\n ],\n];\n\nexport const TrellisBackgroundColorEditor = {\n label: _('Trellis background'),\n option: 'trellisBackgroundColor',\n editor: 'editor.color',\n showEditor: isTrellisEnabled,\n};\n", "\nimport * as defaultImport from \"@splunk/themes/pick\";\nexport * from \"@splunk/themes/pick\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "\nimport * as defaultImport from \"@splunk/themes/variables\";\nexport * from \"@splunk/themes/variables\";\nexport default ('default' in defaultImport ? defaultImport.default : defaultImport);\n", "import pick from '@splunk/themes/pick';\nimport variables from '@splunk/themes/variables';\n\nexport const defaultBackgroundColor = props =>\n pick({\n enterprise: {\n dark: variables.black(props),\n light: variables.white(props),\n },\n prisma: variables.backgroundColorSection(props),\n })(props);\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AACA,oBAA+B;AAC/B,wCAAc;AACd,IAAO,8BAAS,aAAa,gBAA8B,wBAAU;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAA,iBAA+B;AAC/B,iCAAc;AACd,IAAO,uBAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,yBAAc;AACd,IAAO,eAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,0CAAc;AACd,IAAO,gCAAS,aAAaA,iBAA8B,yBAAUA;;;ACHrE;AAAA;AAAA;AAAA;AACA,IAAAC,iBAA+B;AAC/B,2BAAc;AACd,IAAO,iBAAS,aAAaA,iBA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;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACJ;AAKA,IAAM,SAAoB;AAAA;AAAA;AAAA;AAAA,EAItB,KAAK;AAAA;AAAA;AAAA;AAAA,EAIL,UAAM,gBAAE,KAAK;AAAA,EACb;AAAA;AAAA;AAAA;AAAA,EAIA,MAAM,4BAAAC;AAAA,EACN,iBAAiB,qBAAAC;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA,6CAAAC;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,IACJ,eAAe;AAAA,MACX,aAAa;AAAA,IACjB;AAAA,EACJ;AAAA,EAEA,UAAU,yHAA8F;AAAA,EACxG;AACJ;AAEA,IAAO,iBAAQ,cAAc,MAAM;",
6
6
  "names": ["defaultImport", "defaultImport", "defaultImport", "defaultImport", "defaultImport", "defaultImport", "config", "themes", "defaultImport", "defaultImport", "PieIcon", "PiePlaceholderIcon", "optionsSchema"]
7
7
  }
package/Pie.js CHANGED
@@ -1254,6 +1254,22 @@ var editorConfig = [
1254
1254
  }
1255
1255
  }
1256
1256
  ],
1257
+ [
1258
+ {
1259
+ label: (0, i18n_exports._)("Legend display"),
1260
+ option: "legendDisplay",
1261
+ editor: "editor.select",
1262
+ editorProps: {
1263
+ values: [
1264
+ { label: (0, i18n_exports._)("Off"), value: "off" },
1265
+ { label: (0, i18n_exports._)("Right"), value: "right" },
1266
+ { label: (0, i18n_exports._)("Left"), value: "left" },
1267
+ { label: (0, i18n_exports._)("Top"), value: "top" },
1268
+ { label: (0, i18n_exports._)("Bottom"), value: "bottom" }
1269
+ ]
1270
+ }
1271
+ }
1272
+ ],
1257
1273
  [
1258
1274
  {
1259
1275
  label: (0, i18n_exports._)("Percentage precision"),
@@ -1679,7 +1695,7 @@ var Cover = styled_components_default.div`
1679
1695
  bottom: 0;
1680
1696
  `;
1681
1697
  var Blocker = styled_components_default.div.attrs({
1682
- "data-splunk-visualization-version": "28.4.0 - 002bd482f"
1698
+ "data-splunk-visualization-version": "28.5.0 - b192418b7"
1683
1699
  })`
1684
1700
  position: relative;
1685
1701
  width: 100%;
@@ -1760,7 +1776,7 @@ var withFixedSizeContainer = (Viz) => {
1760
1776
  FixSizeItem,
1761
1777
  {
1762
1778
  "data-test": "fix-size-item",
1763
- "data-splunk-visualization-version": "28.4.0 - 002bd482f",
1779
+ "data-splunk-visualization-version": "28.5.0 - b192418b7",
1764
1780
  width,
1765
1781
  height,
1766
1782
  backgroundColor
@@ -2160,16 +2176,14 @@ var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
2160
2176
  splitDataSources[val] = (0, lodash_exports.cloneDeep)(
2161
2177
  (0, lodash_exports.omit)(dataSource, ["primary.data.fields", "primary.data.columns"])
2162
2178
  );
2163
- splitDataSources[val].primary.data.fields = [
2164
- { name: fields[0].name },
2165
- ...dataSourceKeys.map((k) => ({
2166
- name: k
2167
- }))
2168
- ];
2179
+ splitDataSources[val].primary.data.fields = [{ name: fields[0].name }];
2169
2180
  splitDataSources[val].primary.data.columns = [[...columns[0]]];
2170
2181
  dataSourceKeys.forEach((dsKey) => {
2171
2182
  fields.forEach((field, idx) => {
2172
2183
  if (field.data_source === dsKey && (field.splitby_value === val || field.name === val)) {
2184
+ splitDataSources[val].primary.data.fields.push({
2185
+ name: dsKey
2186
+ });
2173
2187
  splitDataSources[val].primary.data.columns.push([...columns[idx]]);
2174
2188
  }
2175
2189
  });
@@ -2484,25 +2498,27 @@ var parseAxisValue = (val) => {
2484
2498
  const num = typeof val === "number" ? val : Number.parseFloat(val);
2485
2499
  return Number.isNaN(num) ? void 0 : num;
2486
2500
  };
2487
- var SideLegendWidth = 75;
2488
- var SeriesCompareLegendWidth = 200;
2501
+ var parseXAxisLineVisibility = (visibility) => {
2502
+ if (visibility === "hide") return false;
2503
+ if (visibility === "show") return true;
2504
+ return void 0;
2505
+ };
2489
2506
  var getLegend = (props) => {
2490
2507
  const legendPlacement = props == null ? void 0 : props.legendDisplay;
2491
- const { isSeriesCompare } = props;
2508
+ const { isSeriesCompare, legendTruncation } = props;
2492
2509
  const commonLegendProps = {
2493
2510
  center: true,
2494
2511
  fontSize: 12,
2495
2512
  largerTiles: true,
2496
- hideSeriesValue: !isSeriesCompare
2513
+ hideSeriesValue: !isSeriesCompare,
2497
2514
  // Show values if in seriesCompare mode
2515
+ legendTruncation
2498
2516
  };
2499
2517
  switch (legendPlacement) {
2500
2518
  case "off":
2501
2519
  return false;
2502
2520
  case "left":
2503
- return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
2504
- width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
2505
- }, commonLegendProps));
2521
+ return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
2506
2522
  case "bottom":
2507
2523
  return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
2508
2524
  wrap: true
@@ -2512,9 +2528,7 @@ var getLegend = (props) => {
2512
2528
  wrap: true
2513
2529
  }, commonLegendProps));
2514
2530
  default:
2515
- return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
2516
- width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
2517
- }, commonLegendProps));
2531
+ return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
2518
2532
  }
2519
2533
  };
2520
2534
  var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
@@ -2575,9 +2589,7 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
2575
2589
  if (yAxisAbbreviation !== "none") {
2576
2590
  yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
2577
2591
  }
2578
- if (yAxisAbbreviation === "none") {
2579
- yConfig.y.width = 55;
2580
- } else {
2592
+ if (yAxisAbbreviation !== "none") {
2581
2593
  yConfig.y.width = label && label.length > 0 ? 30 : 10;
2582
2594
  }
2583
2595
  if (yAxisLabelVisibility === "hide") {
@@ -2600,6 +2612,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
2600
2612
  y2Config.y2.type = scaleType;
2601
2613
  if (axisAbbreviation !== "none") {
2602
2614
  y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
2615
+ y2Config.y2.width = label && label.length > 0 ? 50 : 10;
2603
2616
  } else if (roundAxisLabelsToInteger) {
2604
2617
  y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
2605
2618
  }
@@ -2615,7 +2628,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
2615
2628
  }
2616
2629
  return y2Config;
2617
2630
  };
2618
- var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField) => {
2631
+ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
2619
2632
  const seriesConfig = {};
2620
2633
  let spanGaps;
2621
2634
  let replaceNullsWithZero;
@@ -2642,6 +2655,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
2642
2655
  );
2643
2656
  if (shouldAssignToY2) {
2644
2657
  seriesConfig[field].overrides.scale = "y2";
2658
+ } else {
2659
+ seriesConfig[field].overrides.scale = "y";
2645
2660
  }
2646
2661
  }
2647
2662
  if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
@@ -2654,6 +2669,11 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
2654
2669
  if (fieldDashStyle) {
2655
2670
  seriesConfig[field].lineDashStyle = fieldDashStyle;
2656
2671
  }
2672
+ const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
2673
+ const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
2674
+ if (fieldStepPosition && fieldStepPosition !== "off") {
2675
+ seriesConfig[field].stepPosition = fieldStepPosition;
2676
+ }
2657
2677
  if (replaceNullsWithZero !== void 0) {
2658
2678
  seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
2659
2679
  }
@@ -2836,6 +2856,9 @@ var TimeSeriesChartWrapper = (props) => {
2836
2856
  backgroundColor,
2837
2857
  defaultFontColor,
2838
2858
  additionalTooltipValues,
2859
+ xAxisLineVisibility: xAxisLineVisibility,
2860
+ yAxisLineVisibility,
2861
+ y2AxisLineVisibility,
2839
2862
  showYAxisWithZero: showYAxisWithZeroFromProps,
2840
2863
  showY2AxisWithZero: showY2AxisWithZeroFromProps
2841
2864
  } = _a, otherOptions = __objRest(_a, [
@@ -2859,6 +2882,10 @@ var TimeSeriesChartWrapper = (props) => {
2859
2882
  "backgroundColor",
2860
2883
  "defaultFontColor",
2861
2884
  "additionalTooltipValues",
2885
+ // Extract axis line visibility options from props
2886
+ "xAxisLineVisibility",
2887
+ "yAxisLineVisibility",
2888
+ "y2AxisLineVisibility",
2862
2889
  // Extract showYAxisWithZero directly from props for accelerated render mode
2863
2890
  "showYAxisWithZero",
2864
2891
  "showY2AxisWithZero"
@@ -2871,6 +2898,7 @@ var TimeSeriesChartWrapper = (props) => {
2871
2898
  fieldColors,
2872
2899
  legendLabels: legendLabelsStr,
2873
2900
  legendMode,
2901
+ legendTruncation,
2874
2902
  "axisTitleX.text": xAxisTitleText,
2875
2903
  "axisTitleY.text": yAxisTitleText,
2876
2904
  "axisTitleY2.text": y2AxisTitleText,
@@ -2879,6 +2907,7 @@ var TimeSeriesChartWrapper = (props) => {
2879
2907
  "axisTitleY2.visibility": y2AxisTitleVisibility,
2880
2908
  "axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
2881
2909
  "axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
2910
+ "axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
2882
2911
  "axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
2883
2912
  "axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
2884
2913
  "axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
@@ -2896,6 +2925,8 @@ var TimeSeriesChartWrapper = (props) => {
2896
2925
  lineWidth,
2897
2926
  lineDashStyle,
2898
2927
  fieldDashStyles: lineDashStylesByFieldStr,
2928
+ stepPosition,
2929
+ fieldStepPositions: stepPositionsByFieldStr,
2899
2930
  yAxisMin: yAxisMinRaw,
2900
2931
  yAxisMax: yAxisMaxRaw,
2901
2932
  y2AxisMin: y2AxisMinRaw,
@@ -2906,6 +2937,8 @@ var TimeSeriesChartWrapper = (props) => {
2906
2937
  showYMinorGridLines,
2907
2938
  showY2MinorGridLines,
2908
2939
  showLineSmoothing,
2940
+ xAxisMajorTickVisibility,
2941
+ xAxisMajorTickSize,
2909
2942
  yAxisMajorTickVisibility,
2910
2943
  y2AxisMajorTickVisibility,
2911
2944
  yAxisMajorTickSize,
@@ -2922,10 +2955,14 @@ var TimeSeriesChartWrapper = (props) => {
2922
2955
  const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
2923
2956
  const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
2924
2957
  const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
2958
+ const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
2925
2959
  const showYMajorTicks = yAxisMajorTickVisibility === "show";
2926
2960
  const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
2927
2961
  const showYMinorTicks = yAxisMinorTickVisibility === "show";
2928
2962
  const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
2963
+ const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
2964
+ const showYAxisLine = yAxisLineVisibility === "show";
2965
+ const showY2AxisLine = y2AxisLineVisibility === "show";
2929
2966
  const yAxisMin = parseAxisValue(yAxisMinRaw);
2930
2967
  const yAxisMax = parseAxisValue(yAxisMaxRaw);
2931
2968
  const y2AxisMin = parseAxisValue(y2AxisMinRaw);
@@ -2940,13 +2977,15 @@ var TimeSeriesChartWrapper = (props) => {
2940
2977
  y2AxisMajorUnitFromSimpleXML,
2941
2978
  y2AxisMajorTickInterval
2942
2979
  );
2943
- const yAxisMajorTickSizeNum = yAxisMajorTickSize ? Number(yAxisMajorTickSize) : void 0;
2944
- const y2AxisMajorTickSizeNum = y2AxisMajorTickSize ? Number(y2AxisMajorTickSize) : void 0;
2945
- const yAxisMinorTickSizeNum = yAxisMinorTickSize ? Number(yAxisMinorTickSize) : void 0;
2946
- const y2AxisMinorTickSizeNum = y2AxisMinorTickSize ? Number(y2AxisMinorTickSize) : void 0;
2980
+ const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
2981
+ const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
2982
+ const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
2983
+ const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
2984
+ const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
2947
2985
  const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
2948
2986
  const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
2949
2987
  const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
2988
+ const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
2950
2989
  const legendLabels = parseArrayOption(legendLabelsStr);
2951
2990
  const bgColor = backgroundColor || bgColorFromOptions;
2952
2991
  const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
@@ -3034,7 +3073,9 @@ var TimeSeriesChartWrapper = (props) => {
3034
3073
  nullValueMode,
3035
3074
  markerDisplay,
3036
3075
  lineDashStyle,
3037
- lineDashStylesByField
3076
+ lineDashStylesByField,
3077
+ stepPosition,
3078
+ stepPositionsByField
3038
3079
  ),
3039
3080
  [
3040
3081
  yFields,
@@ -3045,7 +3086,9 @@ var TimeSeriesChartWrapper = (props) => {
3045
3086
  nullValueMode,
3046
3087
  markerDisplay,
3047
3088
  lineDashStyle,
3048
- lineDashStylesByField
3089
+ lineDashStylesByField,
3090
+ stepPosition,
3091
+ stepPositionsByField
3049
3092
  ]
3050
3093
  );
3051
3094
  const chartingEventAnnotations = (0, react_exports.useMemo)(
@@ -3060,9 +3103,14 @@ var TimeSeriesChartWrapper = (props) => {
3060
3103
  () => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
3061
3104
  [xScaleConfig, yScaleConfig, y2ScaleConfig]
3062
3105
  );
3106
+ const isSeriesCompare = legendMode === "seriesCompare";
3063
3107
  const legend = (0, react_exports.useMemo)(
3064
- () => getLegend({ legendDisplay, isSeriesCompare: legendMode === "seriesCompare" }),
3065
- [legendDisplay, legendMode]
3108
+ () => getLegend({
3109
+ legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
3110
+ isSeriesCompare,
3111
+ legendTruncation
3112
+ }),
3113
+ [legendDisplay, isSeriesCompare, legendTruncation]
3066
3114
  );
3067
3115
  const handleChartClick = react_exports.useCallback(
3068
3116
  (event) => {
@@ -3167,6 +3215,7 @@ var TimeSeriesChartWrapper = (props) => {
3167
3215
  seriesConfig: seriesOverrides,
3168
3216
  legend,
3169
3217
  legendLabels,
3218
+ legendTruncation,
3170
3219
  isSeriesCompare: legendMode === "seriesCompare",
3171
3220
  maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
3172
3221
  scaleConfig,
@@ -3188,6 +3237,8 @@ var TimeSeriesChartWrapper = (props) => {
3188
3237
  showY2MinorGridLines,
3189
3238
  showLineSmoothing,
3190
3239
  dataValuesDisplay,
3240
+ showXMajorTicks,
3241
+ xAxisMajorTickSize: xAxisMajorTickSizeNum,
3191
3242
  showYMajorTicks,
3192
3243
  showY2MajorTicks,
3193
3244
  yAxisMajorTickSize: yAxisMajorTickSizeNum,
@@ -3199,7 +3250,11 @@ var TimeSeriesChartWrapper = (props) => {
3199
3250
  yAxisMinorTickSize: yAxisMinorTickSizeNum,
3200
3251
  y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
3201
3252
  showYAxisWithZero,
3202
- showY2AxisWithZero
3253
+ showY2AxisWithZero,
3254
+ showXAxisLine,
3255
+ showYAxisLine,
3256
+ showY2AxisLine,
3257
+ xAxisMaxLabelParts
3203
3258
  }
3204
3259
  ));
3205
3260
  }, [
@@ -3214,6 +3269,7 @@ var TimeSeriesChartWrapper = (props) => {
3214
3269
  seriesOverrides,
3215
3270
  legend,
3216
3271
  legendLabels,
3272
+ legendTruncation,
3217
3273
  scaleConfig,
3218
3274
  onClick,
3219
3275
  handleChartClick,
@@ -3232,6 +3288,8 @@ var TimeSeriesChartWrapper = (props) => {
3232
3288
  showY2MinorGridLines,
3233
3289
  showLineSmoothing,
3234
3290
  dataValuesDisplay,
3291
+ showXMajorTicks,
3292
+ xAxisMajorTickSizeNum,
3235
3293
  showYMajorTicks,
3236
3294
  showY2MajorTicks,
3237
3295
  yAxisMajorTickSizeNum,
@@ -3244,7 +3302,11 @@ var TimeSeriesChartWrapper = (props) => {
3244
3302
  y2AxisMinorTickSizeNum,
3245
3303
  showYAxisWithZero,
3246
3304
  showY2AxisWithZero,
3247
- legendMode
3305
+ showXAxisLine,
3306
+ showYAxisLine,
3307
+ showY2AxisLine,
3308
+ legendMode,
3309
+ xAxisMaxLabelParts
3248
3310
  ]);
3249
3311
  const memoizedVisualization = (0, react_exports.useMemo)(() => {
3250
3312
  return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
@@ -3579,7 +3641,8 @@ var pieOptionsSCMapping = {
3579
3641
  resultLimit: "resultTruncationLimit",
3580
3642
  seriesColorsByField: "fieldColors",
3581
3643
  collapseThreshold: "chart.sliceCollapsingThreshold",
3582
- collapseLabel: "chart.sliceCollapsingLabel"
3644
+ collapseLabel: "chart.sliceCollapsingLabel",
3645
+ legendDisplay: "legendPlacement"
3583
3646
  };
3584
3647
  var getFieldName3 = (field) => {
3585
3648
  var _a, _b;
@@ -3606,8 +3669,27 @@ var mapLabelDisplay = (_a) => {
3606
3669
  }
3607
3670
  return convertedOptions;
3608
3671
  };
3672
+ var ALLOWED_LEGEND_PLACEMENTS = /* @__PURE__ */ new Set(["right", "left", "top", "bottom"]);
3673
+ var mapLegendDisplay = (options) => {
3674
+ if (!Object.hasOwn(options, "legendPlacement")) {
3675
+ return __spreadProps(__spreadValues({}, options), {
3676
+ showLegend: false
3677
+ });
3678
+ }
3679
+ const placement = options.legendPlacement;
3680
+ if (typeof placement === "string" && ALLOWED_LEGEND_PLACEMENTS.has(placement)) {
3681
+ return __spreadProps(__spreadValues({}, options), {
3682
+ legendPlacement: placement,
3683
+ showLegend: true
3684
+ });
3685
+ }
3686
+ const next = __spreadValues({}, options);
3687
+ delete next.legendPlacement;
3688
+ next.showLegend = false;
3689
+ return next;
3690
+ };
3609
3691
  var mapToOldKey = (options) => (0, lodash_exports.mapKeys)(options, (val, key) => pieOptionsSCMapping[key] ? pieOptionsSCMapping[key] : key);
3610
- var convertToPieSCProperties = (originalOptions) => (0, lodash_exports.chain)(mapToOldKey(originalOptions)).thru(convertToStringValues).thru(mapLabelDisplay).value();
3692
+ var convertToPieSCProperties = (originalOptions) => (0, lodash_exports.chain)(mapToOldKey(originalOptions)).thru(convertToStringValues).thru(mapLabelDisplay).thru(mapLegendDisplay).value();
3611
3693
  var getPieMergedOptions = (options, vizConfig) => (0, hocUtils_exports.deepMergeWithArrayPrimitiveOverrides)(
3612
3694
  {},
3613
3695
  options,
@@ -3931,7 +4013,8 @@ var computeVizProps = (_a) => {
3931
4013
  };
3932
4014
  const { labelField, valueField, hasEventHandlers } = otherOptions;
3933
4015
  computedProps.options = (0, lodash_exports.chain)(otherOptions).pick(validOptions).thru(convertToPieSCProperties).thru((options) => __spreadProps(__spreadValues({}, (0, simpleXMLOptions_exports.getSimpleXMLOptionsForProps)(options)), {
3934
- chart: "pie"
4016
+ chart: "pie",
4017
+ "legend.clickEnabled": false
3935
4018
  })).value();
3936
4019
  const truncationLimit = computedProps.options["chart.resultTruncationLimit"];
3937
4020
  let primaryData = __spreadProps(__spreadValues({}, dataSources.primary.data), {