@splunk/visualizations 25.8.1 → 25.9.1

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 (85) hide show
  1. package/Area.config.js +2 -2
  2. package/Area.config.js.map +1 -1
  3. package/Area.js +25 -9
  4. package/Area.js.map +1 -1
  5. package/Bar.config.js +3 -3
  6. package/Bar.config.js.map +1 -1
  7. package/Bar.js +26 -10
  8. package/Bar.js.map +1 -1
  9. package/Bubble.js +23 -7
  10. package/Bubble.js.map +1 -1
  11. package/ChoroplethSvg.js +20 -6
  12. package/ChoroplethSvg.js.map +1 -1
  13. package/Column.config.js +4 -4
  14. package/Column.config.js.map +1 -1
  15. package/Column.js +27 -11
  16. package/Column.js.map +1 -1
  17. package/Ellipse.js +20 -6
  18. package/Ellipse.js.map +1 -1
  19. package/Events.js +20 -6
  20. package/Events.js.map +1 -1
  21. package/FillerGauge.config.js +1 -1
  22. package/FillerGauge.config.js.map +1 -1
  23. package/FillerGauge.js +21 -7
  24. package/FillerGauge.js.map +1 -1
  25. package/Image.js +20 -6
  26. package/Image.js.map +1 -1
  27. package/Line.config.js +13 -4
  28. package/Line.config.js.map +1 -1
  29. package/Line.js +38 -12
  30. package/Line.js.map +1 -1
  31. package/LinkGraph.js +2117 -2472
  32. package/LinkGraph.js.map +1 -1
  33. package/Map.js +114 -93
  34. package/Map.js.map +1 -1
  35. package/Markdown.config.js +1 -0
  36. package/Markdown.config.js.map +1 -1
  37. package/Markdown.js +40 -25
  38. package/Markdown.js.map +1 -1
  39. package/MarkerGauge.config.js +1 -1
  40. package/MarkerGauge.config.js.map +1 -1
  41. package/MarkerGauge.js +29 -15
  42. package/MarkerGauge.js.map +1 -1
  43. package/ParallelCoordinates.js +49 -35
  44. package/ParallelCoordinates.js.map +1 -1
  45. package/Pie.config.js +1 -1
  46. package/Pie.config.js.map +1 -1
  47. package/Pie.js +32 -16
  48. package/Pie.js.map +1 -1
  49. package/Punchcard.js +143 -129
  50. package/Punchcard.js.map +1 -1
  51. package/README.internal.md +15 -5
  52. package/README.md +3 -1
  53. package/Rectangle.js +61 -47
  54. package/Rectangle.js.map +1 -1
  55. package/Sankey.js +34 -20
  56. package/Sankey.js.map +1 -1
  57. package/Scatter.js +74 -58
  58. package/Scatter.js.map +1 -1
  59. package/SingleValue.config.js +6 -6
  60. package/SingleValue.config.js.map +1 -1
  61. package/SingleValue.js +41 -25
  62. package/SingleValue.js.map +1 -1
  63. package/SingleValueBasic.js +4 -4
  64. package/SingleValueBasic.js.map +1 -1
  65. package/SingleValueIcon.config.js +10 -8
  66. package/SingleValueIcon.config.js.map +1 -1
  67. package/SingleValueIcon.js +86 -70
  68. package/SingleValueIcon.js.map +1 -1
  69. package/SingleValueRadial.config.js +10 -8
  70. package/SingleValueRadial.config.js.map +1 -1
  71. package/SingleValueRadial.js +85 -69
  72. package/SingleValueRadial.js.map +1 -1
  73. package/Table.config.js +1 -1
  74. package/Table.config.js.map +1 -1
  75. package/Table.js +54 -36
  76. package/Table.js.map +1 -1
  77. package/common/Charting.js +3 -1
  78. package/common/Charting.js.map +1 -1
  79. package/common/OptionsDoc.js +9 -6
  80. package/common/OptionsDoc.js.map +1 -1
  81. package/common/OverviewDoc.js +5 -5
  82. package/common/OverviewDoc.js.map +1 -1
  83. package/common/withDashboardViz.js +20 -6
  84. package/common/withDashboardViz.js.map +1 -1
  85. package/package.json +23 -23
package/Line.js CHANGED
@@ -260,7 +260,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
260
260
  }
261
261
  return React.createElement(FixSizeItem, {
262
262
  "data-test": "fix-size-item",
263
- "data-splunk-visualization-version": "25.8.1 - 742d5fb96",
263
+ "data-splunk-visualization-version": "25.9.1 - 5ba41e723",
264
264
  width: width,
265
265
  height: height,
266
266
  backgroundColor: backgroundColor
@@ -904,10 +904,18 @@ var withDashboardViz = function withDashboardViz(opts) {
904
904
  var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat(id_1.createGUID())),
905
905
  _React$useState4 = _slicedToArray(_React$useState3, 1),
906
906
  visualizationID = _React$useState4[0];
907
- var _React$useState5 = React.useState(Boolean(featureFlagContext && featureFlagContext.visualizations_useWebWorkersForDSL && typeof Worker !== 'undefined')),
907
+ var _React$useState5 = React.useState({}),
908
908
  _React$useState6 = _slicedToArray(_React$useState5, 2),
909
- useAsyncEvaluatedOptions = _React$useState6[0],
910
- setUseAsyncEvaluatedOptions = _React$useState6[1];
909
+ dataSourcesInState = _React$useState6[0],
910
+ setDataSourcesInState = _React$useState6[1];
911
+ var _React$useState7 = React.useState(),
912
+ _React$useState8 = _slicedToArray(_React$useState7, 2),
913
+ dataFramesInState = _React$useState8[0],
914
+ setDataFramesInState = _React$useState8[1];
915
+ var _React$useState9 = React.useState(Boolean(featureFlagContext && featureFlagContext.visualizations_useWebWorkersForDSL && typeof Worker !== 'undefined')),
916
+ _React$useState10 = _slicedToArray(_React$useState9, 2),
917
+ useAsyncEvaluatedOptions = _React$useState10[0],
918
+ setUseAsyncEvaluatedOptions = _React$useState10[1];
911
919
  evaluatedOptions = useDeepMemo_1.useDeepMemo(function () {
912
920
  try {
913
921
  if (useAsyncEvaluatedOptions) {
@@ -930,10 +938,16 @@ var withDashboardViz = function withDashboardViz(opts) {
930
938
  setUseAsyncEvaluatedOptions(false);
931
939
  });
932
940
  } else {
941
+ var dataFrames = dataFramesInState;
942
+ if (dataSources !== dataSourcesInState) {
943
+ setDataSourcesInState(dataSources);
944
+ dataFrames = Options_1.Options.dataFrameFromDataSource(dataSources);
945
+ setDataFramesInState(dataFrames);
946
+ }
933
947
  return Options_1.Options.evaluate({
934
948
  context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
935
949
  options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
936
- }, dataSources, themeFunc);
950
+ }, dataSources, themeFunc, dataFrames);
937
951
  }
938
952
  } catch (e) {
939
953
  // eslint-disable-next-line no-console
@@ -1395,7 +1409,7 @@ var Cover = styled_components_1.default.div.withConfig({
1395
1409
  componentId: "sc-1gsbnxb-0"
1396
1410
  })(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
1397
1411
  var Blocker = styled_components_1.default.div.attrs({
1398
- 'data-splunk-visualization-version': "25.8.1 - 742d5fb96"
1412
+ 'data-splunk-visualization-version': "25.9.1 - 5ba41e723"
1399
1413
  }).withConfig({
1400
1414
  displayName: "withEditModeCover__Blocker",
1401
1415
  componentId: "sc-1gsbnxb-1"
@@ -1997,7 +2011,9 @@ var Charting = function Charting(props) {
1997
2011
  chart.current.prepareAndDraw(chartData, updatedOptions, function () {});
1998
2012
  }
1999
2013
  if (chart.current) {
2000
- chart.current.resize(computedWidth, computedHeight);
2014
+ if (Math.round(chart.current.height) !== Math.round(computedHeight) || Math.round(chart.current.width) !== Math.round(computedWidth)) {
2015
+ chart.current.resize(computedWidth, computedHeight);
2016
+ }
2001
2017
  }
2002
2018
  needsInit.current = false;
2003
2019
  needsRedraw.current = false;
@@ -3591,7 +3607,7 @@ var optionsSchema = {
3591
3607
  },
3592
3608
  lineWidth: {
3593
3609
  default: 2,
3594
- description: 'Specify the line width, in pixels, for all line series.',
3610
+ description: 'Specify the line width (px), for all line series.',
3595
3611
  type: 'number'
3596
3612
  },
3597
3613
  markerDisplay: {
@@ -3624,6 +3640,11 @@ var optionsSchema = {
3624
3640
  description: 'Specify the colors used for specific fields in a series. For example, {“count”: “#008000”, “percent”: “#FFA500”}.',
3625
3641
  type: 'object'
3626
3642
  },
3643
+ showLineSmoothing: {
3644
+ default: false,
3645
+ description: 'Specify whether lines are straight or smoothed using curves.',
3646
+ type: 'boolean'
3647
+ },
3627
3648
  showIndependentYRanges: {
3628
3649
  default: false,
3629
3650
  description: 'Specify whether split series charts have independent y-ranges.',
@@ -3778,7 +3799,7 @@ var optionsSchema = {
3778
3799
  default: 3,
3779
3800
  minimum: 1,
3780
3801
  maximum: 3,
3781
- description: 'Specify the maximum number of time-parts that a tick label will have (the 3 possible parts are year, month, time).',
3802
+ description: 'Specify the maximum number of time-parts for a tick label. The 3 possible parts are year, month, and time. Values can range from 1 to 3.',
3782
3803
  type: 'number'
3783
3804
  },
3784
3805
  xAxisTitleText: {
@@ -3836,7 +3857,7 @@ var optionsSchema = {
3836
3857
  y2AxisMajorTickInterval: {
3837
3858
  default: 'auto',
3838
3859
  description: 'Specify the spacing unit between major tick marks along the numeric y2-axis.',
3839
- type: ['number', 'string']
3860
+ type: ['string', 'number']
3840
3861
  },
3841
3862
  // TODO(SCP-40274): Restrict string value to only 'auto' to achieve precise schema validation
3842
3863
  yAxisMax: {
@@ -3939,6 +3960,10 @@ var editorConfig = [AxesChartDataConfig_1.AxesChartDataConfigAreaColumnLine, Axe
3939
3960
  max: 8.0,
3940
3961
  step: 0.5
3941
3962
  }
3963
+ }], [{
3964
+ label: i18n_1._('Line smoothing'),
3965
+ option: 'showLineSmoothing',
3966
+ editor: 'editor.toggle'
3942
3967
  }], [{
3943
3968
  label: i18n_1._('Marker display'),
3944
3969
  option: 'markerDisplay',
@@ -4026,7 +4051,7 @@ var editorConfig = [AxesChartDataConfig_1.AxesChartDataConfigAreaColumnLine, Axe
4026
4051
  label: i18n_1._('Standard'),
4027
4052
  value: 'standard'
4028
4053
  }, {
4029
- label: i18n_1._('Series Compare'),
4054
+ label: i18n_1._('Compare series'),
4030
4055
  value: 'seriesCompare'
4031
4056
  }]
4032
4057
  }
@@ -4121,7 +4146,8 @@ var lineOptionsSCMapping = {
4121
4146
  showRoundedY2AxisLabels: 'roundY2AxisLabelsToInteger',
4122
4147
  xAxisLineVisibility: 'xAxisVisibility',
4123
4148
  yAxisLineVisibility: 'yAxisVisibility',
4124
- y2AxisLineVisibility: 'y2AxisVisibility'
4149
+ y2AxisLineVisibility: 'y2AxisVisibility',
4150
+ showLineSmoothing: 'enableLineSmoothing'
4125
4151
  };
4126
4152
  // key value mapping of what options (and their corresponding values) which we expose in config.ts to property values SC understands
4127
4153
  exports.lineOptionValuesSCMapping = {