@splunk/visualizations 25.8.0 → 25.9.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.
- package/Area.config.js +2 -2
- package/Area.config.js.map +1 -1
- package/Area.js +25 -9
- package/Area.js.map +1 -1
- package/Bar.config.js +2 -2
- package/Bar.config.js.map +1 -1
- package/Bar.js +25 -9
- package/Bar.js.map +1 -1
- package/Bubble.js +23 -7
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.js +21 -7
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +3 -3
- package/Column.config.js.map +1 -1
- package/Column.js +26 -10
- package/Column.js.map +1 -1
- package/Ellipse.js +20 -6
- package/Ellipse.js.map +1 -1
- package/Events.js +20 -6
- package/Events.js.map +1 -1
- package/FillerGauge.js +20 -6
- package/FillerGauge.js.map +1 -1
- package/Image.js +20 -6
- package/Image.js.map +1 -1
- package/Line.config.js +12 -3
- package/Line.config.js.map +1 -1
- package/Line.js +37 -11
- package/Line.js.map +1 -1
- package/LinkGraph.js +29 -10
- package/LinkGraph.js.map +1 -1
- package/Map.js +21 -7
- package/Map.js.map +1 -1
- package/Markdown.config.js +1 -0
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +21 -6
- package/Markdown.js.map +1 -1
- package/MarkerGauge.js +20 -6
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.js +20 -6
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.js +23 -7
- package/Pie.js.map +1 -1
- package/Punchcard.js +20 -6
- package/Punchcard.js.map +1 -1
- package/README.internal.md +15 -5
- package/README.md +3 -1
- package/Rectangle.js +20 -6
- package/Rectangle.js.map +1 -1
- package/Sankey.js +20 -6
- package/Sankey.js.map +1 -1
- package/Scatter.js +23 -7
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +5 -5
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +25 -11
- package/SingleValue.js.map +1 -1
- package/SingleValueIcon.config.js +9 -7
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +29 -13
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +9 -7
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +29 -13
- package/SingleValueRadial.js.map +1 -1
- package/Table.config.js +1 -1
- package/Table.config.js.map +1 -1
- package/Table.js +21 -7
- package/Table.js.map +1 -1
- package/common/Charting.js +3 -1
- package/common/Charting.js.map +1 -1
- package/common/OptionsDoc.js +9 -6
- package/common/OptionsDoc.js.map +1 -1
- package/common/withDashboardViz.js +20 -6
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +20 -20
package/README.internal.md
CHANGED
|
@@ -2,7 +2,9 @@ A visualization is a React component that you can use in an application like Das
|
|
|
2
2
|
|
|
3
3
|
The visualizations library consists of React components built on top of Highcharts and D3.js. If you’re familiar with these libraries, you can build on that knowledge and add tooltips, legends, and data series to a chart. You can choose from more than 20 different visualizations that show data in a variety of formats. If you would like to use Splunk visualizations in your applications, read on to learn more.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Documentation for the Splunk Visualizations library can be found at [@splunk/visualizations](https://splunkui.splunkeng.com/Packages/visualizations).
|
|
6
|
+
|
|
7
|
+
If you don’t find a visualization you would like to use, go to [Contribute a Visualization](https://splunkui.splunkeng.com/Packages/visualizations/?path=%2FHowtoContribute). If you have any questions, please reach out to [ssg-swp-viz@splunk.com](ssg-swp-viz@splunk.com) or Slack us at [#splunk-viz](slack://channel?team=T024FQ3UW&id=CCC0XPLD6).
|
|
6
8
|
|
|
7
9
|
## Install
|
|
8
10
|
|
|
@@ -56,11 +58,11 @@ You can use UDF to create dashboards with visualizations, or you can work direct
|
|
|
56
58
|
- Splunk visualizations to enhance data presentation
|
|
57
59
|
- tokens to pass runtime values within a dashboard
|
|
58
60
|
|
|
59
|
-
To install the UDF library, see the setup guide in the [Quick Start](https://
|
|
61
|
+
To install the UDF library, see the setup guide in the [Quick Start](https://splunkui.splunkeng.com/Packages/dashboard-docs/?path=%2FQuickStart). When you have it installed, follow the quick start to install dependencies and learn about using the libraries.
|
|
60
62
|
|
|
61
63
|
You can also include visualizations in single page apps by using visualizations directly. To use visualizations directly, follow the [Splunk UI tutorials](https://splunkui.splunkeng.com/Create/Overview) to create a component and a simple app. The tutorials will create the app structure for other development.
|
|
62
64
|
|
|
63
|
-
Install the visualizations libraries and dependencies listed in the Visualizations docs. Some of the packages may have been installed with the Splunk UI setup.
|
|
65
|
+
Install the visualizations libraries and dependencies listed in the [Visualizations docs](https://splunkui.splunkeng.com/Packages/visualizations). Some of the packages may have been installed with the Splunk UI setup.
|
|
64
66
|
|
|
65
67
|
## Customize a visualization
|
|
66
68
|
|
|
@@ -75,6 +77,14 @@ A React visualization is reusable bits of code that you can use in an app or das
|
|
|
75
77
|
|
|
76
78
|
**Options** provide an extensive set of builtin properties that you configure. In React, properties are referred to as props. You can set props programmatically, or use an app to set them. For every visualization, there is a description and a type. In some cases, a prop value is selected from a set of values or an enumeration. In other cases, the author specifies the value of a prop. By setting props, you can change fonts, colors, data sources, or opacity of colors in a chart. Default values exist for most components so you can also leave a prop as is.
|
|
77
79
|
|
|
78
|
-
**Events** offer a mechanism to capture user activity on a chart. Activities can include point clicks on a chart or legend, range selection on a chart, as well as events like holding the pointer over a point or moving the pointer away. Each platform visualization has a tab for events that lists the events available for the chart. When an event occurs, such as a point click, the click event captures the data. You can use the data to drill down further by using the data points. For more information, see the [Interaction Guide](https://
|
|
80
|
+
**Events** offer a mechanism to capture user activity on a chart. Activities can include point clicks on a chart or legend, range selection on a chart, as well as events like holding the pointer over a point or moving the pointer away. Each platform visualization has a tab for events that lists the events available for the chart. When an event occurs, such as a point click, the click event captures the data. You can use the data to drill down further by using the data points. For more information, see the [Interaction Guide](https://splunkui.splunkeng.com/Packages/visualizations/?path=%2FInteractionGuide).
|
|
81
|
+
|
|
82
|
+
Dynamic options syntax (DOS), also referred to as DSL in the docs, exposes even more functionality in charts. A chart that presents text or background display according to a threshold value makes a data presentation more impactful. Dynamic options are a domain-specific language to bind data to options and make data presentation more reflective of changes. The dynamic options syntax consists of data sources, selector functions, and formatters. In the dynamic options syntax, the categories can be combined to create a pipeline. The pipeline begins with a data source, then includes selector functions to extract the data of interest, and formatters to transform and map the data. For more information about dynamic options syntax, see [Fundamentals of DSL](https://splunkui.splunkeng.com/Packages/visualizations/?path=%2FFundamentalsofDSL).
|
|
83
|
+
|
|
84
|
+
## Resources
|
|
79
85
|
|
|
80
|
-
|
|
86
|
+
- Release schedule can be found at [UDF & Visualization Releases](https://splunk.atlassian.net/wiki/spaces/SWP/pages/1078219509308/UDF+Visualization+Releases)
|
|
87
|
+
- Documentation and API reference can be found at [@splunk/visualizations](https://splunkui.splunkeng.com/Packages/visualizations)
|
|
88
|
+
- Storybooks playground with the main branch can be found at [devplat.splunkdev.page/vision](https://devplat.splunkdev.page/vision)
|
|
89
|
+
- A Splunk app using UDF with the main branch visualization viewing/editing/exporting experience can be found at [vizplayground:8000](http://vizplayground:8000)
|
|
90
|
+
- To request access to the Viz Playground instance, please fill out [this form](https://forms.gle/JEkUDXiYE52qLzcL6)
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@ A visualization is a React component that you can use in an application like Das
|
|
|
2
2
|
|
|
3
3
|
The visualizations library consists of React components built on top of Highcharts and D3.js. If you’re familiar with these libraries, you can build on that knowledge and add tooltips, legends, and data series to a chart. You can choose from more than 20 different visualizations that show data in a variety of formats. If you would like to use Splunk visualizations in your applications, read on to learn more.
|
|
4
4
|
|
|
5
|
+
Documentation for the Splunk Visualizations library can be found at [@splunk/visualizations](https://splunkui.splunk.com/Packages/visualizations).
|
|
6
|
+
|
|
5
7
|
## Install
|
|
6
8
|
|
|
7
9
|
Install @splunk/visualizations
|
|
@@ -58,7 +60,7 @@ To install the UDF library, see the setup guide in the [Quick Start](https://spl
|
|
|
58
60
|
|
|
59
61
|
You can also include visualizations in single page apps by using visualizations directly. To use visualizations directly, follow the [Splunk UI tutorials](https://splunkui.splunk.com/Create/Overview) to create a component and a simple app. The tutorials will create the app structure for other development.
|
|
60
62
|
|
|
61
|
-
Install the visualizations libraries and dependencies listed in the Visualizations docs. Some of the packages may have been installed with the Splunk UI setup.
|
|
63
|
+
Install the visualizations libraries and dependencies listed in the [Visualizations docs](https://splunkui.splunk.com/Packages/visualizations). Some of the packages may have been installed with the Splunk UI setup.
|
|
62
64
|
|
|
63
65
|
## Customize a visualization
|
|
64
66
|
|
package/Rectangle.js
CHANGED
|
@@ -412,7 +412,7 @@ var withFixedSizeContainer = function withFixedSizeContainer(Viz) {
|
|
|
412
412
|
}
|
|
413
413
|
return React.createElement(FixSizeItem, {
|
|
414
414
|
"data-test": "fix-size-item",
|
|
415
|
-
"data-splunk-visualization-version": "25.
|
|
415
|
+
"data-splunk-visualization-version": "25.9.0 - 933e6a539",
|
|
416
416
|
width: width,
|
|
417
417
|
height: height,
|
|
418
418
|
backgroundColor: backgroundColor
|
|
@@ -1188,10 +1188,18 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1188
1188
|
var _React$useState3 = React.useState("".concat(vizConfig.name, " - ").concat(id_1.createGUID())),
|
|
1189
1189
|
_React$useState4 = _slicedToArray(_React$useState3, 1),
|
|
1190
1190
|
visualizationID = _React$useState4[0];
|
|
1191
|
-
var _React$useState5 = React.useState(
|
|
1191
|
+
var _React$useState5 = React.useState({}),
|
|
1192
1192
|
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
1193
|
-
|
|
1194
|
-
|
|
1193
|
+
dataSourcesInState = _React$useState6[0],
|
|
1194
|
+
setDataSourcesInState = _React$useState6[1];
|
|
1195
|
+
var _React$useState7 = React.useState(),
|
|
1196
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
1197
|
+
dataFramesInState = _React$useState8[0],
|
|
1198
|
+
setDataFramesInState = _React$useState8[1];
|
|
1199
|
+
var _React$useState9 = React.useState(Boolean(featureFlagContext && featureFlagContext.visualizations_useWebWorkersForDSL && typeof Worker !== 'undefined')),
|
|
1200
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
1201
|
+
useAsyncEvaluatedOptions = _React$useState10[0],
|
|
1202
|
+
setUseAsyncEvaluatedOptions = _React$useState10[1];
|
|
1195
1203
|
evaluatedOptions = useDeepMemo_1.useDeepMemo(function () {
|
|
1196
1204
|
try {
|
|
1197
1205
|
if (useAsyncEvaluatedOptions) {
|
|
@@ -1214,10 +1222,16 @@ var withDashboardViz = function withDashboardViz(opts) {
|
|
|
1214
1222
|
setUseAsyncEvaluatedOptions(false);
|
|
1215
1223
|
});
|
|
1216
1224
|
} else {
|
|
1225
|
+
var dataFrames = dataFramesInState;
|
|
1226
|
+
if (dataSources !== dataSourcesInState) {
|
|
1227
|
+
setDataSourcesInState(dataSources);
|
|
1228
|
+
dataFrames = Options_1.Options.dataFrameFromDataSource(dataSources);
|
|
1229
|
+
setDataFramesInState(dataFrames);
|
|
1230
|
+
}
|
|
1217
1231
|
return Options_1.Options.evaluate({
|
|
1218
1232
|
context: lodash_1.defaultsDeep({}, context, vizConfig.defaultContext),
|
|
1219
1233
|
options: hocUtils_1.deepMergeWithArrayPrimitiveOverrides({}, options, defaultOptions)
|
|
1220
|
-
}, dataSources, themeFunc);
|
|
1234
|
+
}, dataSources, themeFunc, dataFrames);
|
|
1221
1235
|
}
|
|
1222
1236
|
} catch (e) {
|
|
1223
1237
|
// eslint-disable-next-line no-console
|
|
@@ -2062,7 +2076,7 @@ var Cover = styled_components_1.default.div.withConfig({
|
|
|
2062
2076
|
componentId: "sc-1gsbnxb-0"
|
|
2063
2077
|
})(["position:absolute;left:0;right:0;top:0;bottom:0;"]);
|
|
2064
2078
|
var Blocker = styled_components_1.default.div.attrs({
|
|
2065
|
-
'data-splunk-visualization-version': "25.
|
|
2079
|
+
'data-splunk-visualization-version': "25.9.0 - 933e6a539"
|
|
2066
2080
|
}).withConfig({
|
|
2067
2081
|
displayName: "withEditModeCover__Blocker",
|
|
2068
2082
|
componentId: "sc-1gsbnxb-1"
|