@splunk/visualizations 25.13.1 → 26.1.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 +318 -234
- package/Area.config.js.map +1 -1
- package/Area.js +1131 -766
- package/Area.js.map +1 -1
- package/Bar.config.js +317 -233
- package/Bar.config.js.map +1 -1
- package/Bar.js +1007 -594
- package/Bar.js.map +1 -1
- package/Bubble.config.js +234 -160
- package/Bubble.config.js.map +1 -1
- package/Bubble.js +912 -509
- package/Bubble.js.map +1 -1
- package/ChoroplethSvg.config.js +80 -29
- package/ChoroplethSvg.config.js.map +1 -1
- package/ChoroplethSvg.js +691 -319
- package/ChoroplethSvg.js.map +1 -1
- package/Column.config.js +308 -223
- package/Column.config.js.map +1 -1
- package/Column.js +1011 -587
- package/Column.js.map +1 -1
- package/Ellipse.config.js +127 -62
- package/Ellipse.config.js.map +1 -1
- package/Ellipse.js +576 -286
- package/Ellipse.js.map +1 -1
- package/Events.config.js +111 -29
- package/Events.config.js.map +1 -1
- package/Events.js +998 -527
- package/Events.js.map +1 -1
- package/FillerGauge.config.js +142 -73
- package/FillerGauge.config.js.map +1 -1
- package/FillerGauge.js +962 -572
- package/FillerGauge.js.map +1 -1
- package/Image.config.js +70 -26
- package/Image.config.js.map +1 -1
- package/Image.js +524 -253
- package/Image.js.map +1 -1
- package/Line.config.js +326 -242
- package/Line.config.js.map +1 -1
- package/Line.js +1022 -606
- package/Line.js.map +1 -1
- package/LinkGraph.config.js +99 -49
- package/LinkGraph.config.js.map +1 -1
- package/LinkGraph.js +1184 -762
- package/LinkGraph.js.map +1 -1
- package/MIGRATION.md +1082 -0
- package/Map.config.js +311 -167
- package/Map.config.js.map +1 -1
- package/Map.js +1479 -873
- package/Map.js.map +1 -1
- package/Markdown.config.js +93 -43
- package/Markdown.config.js.map +1 -1
- package/Markdown.js +603 -332
- package/Markdown.js.map +1 -1
- package/MarkerGauge.config.js +163 -105
- package/MarkerGauge.config.js.map +1 -1
- package/MarkerGauge.js +1025 -628
- package/MarkerGauge.js.map +1 -1
- package/ParallelCoordinates.config.js +95 -41
- package/ParallelCoordinates.config.js.map +1 -1
- package/ParallelCoordinates.js +993 -622
- package/ParallelCoordinates.js.map +1 -1
- package/Pie.config.js +99 -46
- package/Pie.config.js.map +1 -1
- package/Pie.js +847 -442
- package/Pie.js.map +1 -1
- package/Punchcard.config.js +114 -62
- package/Punchcard.config.js.map +1 -1
- package/Punchcard.js +1097 -633
- package/Punchcard.js.map +1 -1
- package/Rectangle.config.js +131 -65
- package/Rectangle.config.js.map +1 -1
- package/Rectangle.js +580 -288
- package/Rectangle.js.map +1 -1
- package/Sankey.config.js +103 -41
- package/Sankey.config.js.map +1 -1
- package/Sankey.js +1128 -586
- package/Sankey.js.map +1 -1
- package/Scatter.config.js +231 -157
- package/Scatter.config.js.map +1 -1
- package/Scatter.js +904 -504
- package/Scatter.js.map +1 -1
- package/SingleValue.config.js +212 -142
- package/SingleValue.config.js.map +1 -1
- package/SingleValue.js +1506 -956
- package/SingleValue.js.map +1 -1
- package/SingleValueBasic.js +294 -233
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon.config.js +208 -138
- package/SingleValueIcon.config.js.map +1 -1
- package/SingleValueIcon.js +1375 -914
- package/SingleValueIcon.js.map +1 -1
- package/SingleValueRadial.config.js +252 -137
- package/SingleValueRadial.config.js.map +1 -1
- package/SingleValueRadial.js +2194 -1069
- package/SingleValueRadial.js.map +1 -1
- package/SparkLine.js +172 -83
- package/SparkLine.js.map +1 -1
- package/Table.config.js +123 -70
- package/Table.config.js.map +1 -1
- package/Table.js +1094 -590
- package/Table.js.map +1 -1
- package/common/Charting.js +147 -75
- package/common/Charting.js.map +1 -1
- package/common/ChartingApi.js +18 -7
- package/common/ChartingApi.js.map +1 -1
- package/common/EventsDoc.js +91 -36
- package/common/EventsDoc.js.map +1 -1
- package/common/GaugeMajorTicks.js +70 -60
- package/common/GaugeMajorTicks.js.map +1 -1
- package/common/GaugeValueMarker.js +45 -36
- package/common/GaugeValueMarker.js.map +1 -1
- package/common/OptionsDoc.js +177 -86
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.js +65 -32
- package/common/OverviewDoc.js.map +1 -1
- package/common/SplunkVisualization.js +34 -7
- package/common/SplunkVisualization.js.map +1 -1
- package/common/SplunkVisualizationApi.js +10 -4
- package/common/SplunkVisualizationApi.js.map +1 -1
- package/common/ThemesDoc.js +41 -28
- package/common/ThemesDoc.js.map +1 -1
- package/common/chartingUtils.js +56 -24
- package/common/chartingUtils.js.map +1 -1
- package/common/docUtils.js +15 -5
- package/common/docUtils.js.map +1 -1
- package/common/gaugeUtils.js +238 -155
- package/common/gaugeUtils.js.map +1 -1
- package/common/shapeUtils.js +34 -16
- package/common/shapeUtils.js.map +1 -1
- package/common/utils/configUtils.js +59 -23
- package/common/utils/configUtils.js.map +1 -1
- package/common/utils/dataUtils.js +9 -4
- package/common/utils/dataUtils.js.map +1 -1
- package/common/utils/hocUtils.js +5 -3
- package/common/utils/hocUtils.js.map +1 -1
- package/common/utils/layoutUtils.js +3 -2
- package/common/utils/layoutUtils.js.map +1 -1
- package/common/utils/mapUtils.js +370 -206
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/singleValueUtils.js +243 -198
- package/common/utils/singleValueUtils.js.map +1 -1
- package/common/utils/testHelper.js +36 -9
- package/common/utils/testHelper.js.map +1 -1
- package/common/utils/trellisUtils.js +87 -26
- package/common/utils/trellisUtils.js.map +1 -1
- package/common/utils/urlUtils.js +4 -2
- package/common/utils/urlUtils.js.map +1 -1
- package/common/withDashboardViz.js +375 -193
- package/common/withDashboardViz.js.map +1 -1
- package/package.json +25 -27
package/MIGRATION.md
ADDED
|
@@ -0,0 +1,1082 @@
|
|
|
1
|
+
# Migration
|
|
2
|
+
|
|
3
|
+
<a name="26.0.0"></a>
|
|
4
|
+
|
|
5
|
+
## 26.0.0
|
|
6
|
+
|
|
7
|
+
1. @splunk/charting dependency upgraded to v2.0.0 which has Highcharts v9 upgrade. This has visual and DOM rendering differences for charting components.The consuming applications will see these visual changes. Also there are some DOM rendering changes wrt tooltips, the corresponding test cases need to be updated.
|
|
8
|
+
|
|
9
|
+
- Legend items have more spacing across all charts as part of legend item accessibility improvement in Highcharts
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
- On legend item hover, the gray color on inactive series is more pronounced, seems to be a good improvement for visibility
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
- Bubble chart data point minor rendering difference
|
|
20
|
+
|
|
21
|
+

|
|
22
|
+
|
|
23
|
+
- Line chart marker rendering minor difference
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
|
|
27
|
+
- Slight shift up in the column/ bar charts with axis label rotated
|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
- Scatter chart low datapoints showing full square aligning with the axis
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
The consuming applications will see these visual changes. Also there are some DOM rendering changes wrt tooltips, the corresponding test cases need to be updated.
|
|
36
|
+
|
|
37
|
+
- `@splunk/highcharts-scaled-events` deprecated
|
|
38
|
+
|
|
39
|
+
`@splunk/highcharts-scaled-events` deprecated as the support of scale events and tooltip is supported in Highcharts v9 version
|
|
40
|
+
|
|
41
|
+
2. Single Value Radial's major value's dynamic color's "Match Value" is removed. Any pre-existing dashboard using "Match Value" can no longer be edited in the editor. Match value can only be edited in the source code. Clicking on "Customized in source" then "Reset to default" will remove any pre-existing "Match Value" data and change major value's dynamic color into a "Range Value" configuration (this will cause you to lose pre-existing "Match Value" data).
|
|
42
|
+
|
|
43
|
+

|
|
44
|
+
|
|
45
|
+
To avoid losing pre-existing "Match Value" data, you can either edit the data in the source code. Or you can manually convert your pre-existing "Match Value" data into a "Range Value" configuration (recommended).
|
|
46
|
+
|
|
47
|
+
## 25.5.5
|
|
48
|
+
|
|
49
|
+
Visualization type Choropleth World (`viz.geojson.world`) and Choropleth USA (`viz.geojson.us`) will be deprecated and migrated to Map `splunk.map`
|
|
50
|
+
|
|
51
|
+
Old:Choropleth World (`viz.geojson.world`)
|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
New: Map (`splunk.map`)
|
|
56
|
+
|
|
57
|
+

|
|
58
|
+
|
|
59
|
+
Old:Choropleth USA (`viz.geojson.us`)
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
|
|
63
|
+
New: Map (`splunk.map`)
|
|
64
|
+
|
|
65
|
+

|
|
66
|
+
|
|
67
|
+
## 25.0.0
|
|
68
|
+
|
|
69
|
+
### Add support to space in field names
|
|
70
|
+
|
|
71
|
+
`overlayFields` and `Column.y2Fields` now support space inside the names of fields (i.e. “top user”, “max all time”).
|
|
72
|
+
|
|
73
|
+
For example, Column Chart - `y2Fields: ['test name', 'another test name']`
|
|
74
|
+
|
|
75
|
+
Old:
|
|
76
|
+

|
|
77
|
+
|
|
78
|
+
New:
|
|
79
|
+

|
|
80
|
+
|
|
81
|
+
<br />
|
|
82
|
+
|
|
83
|
+
### Axes charts editing UI
|
|
84
|
+
|
|
85
|
+
Axes charts (Area/Bar/Bubble/Column/Line/Scatter) now expose the configuration UI for most options and regroups the editors in new panels. Please expect editor snapshot changes.
|
|
86
|
+
|
|
87
|
+
<br />
|
|
88
|
+
|
|
89
|
+
### Infer data type from the search result meta data fields - `type`, if present
|
|
90
|
+
|
|
91
|
+
There are a few indicators in the search meta data (apart from `_time` field) that can help infer on data type information:
|
|
92
|
+
|
|
93
|
+
- `type` field
|
|
94
|
+
|
|
95
|
+
When search result fields are coerced into a different type, the search result meta data will include a `type` field
|
|
96
|
+
|
|
97
|
+
Example
|
|
98
|
+
|
|
99
|
+
```js
|
|
100
|
+
| eval foo = tostring(some_numeric_field) | table foo
|
|
101
|
+
|
|
102
|
+
{
|
|
103
|
+
name: 'foo',
|
|
104
|
+
type: 'str'
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
As a result, if we had `eval productId=tostring(12345)`, the visualization will treat **12345** as a `string` and dynamic coloring formatters like `rangeValue()` will not work as they require a `number` data type
|
|
109
|
+
|
|
110
|
+
<br />
|
|
111
|
+
|
|
112
|
+
### Visualization displays the original data value, and we move type coercion to the formatters
|
|
113
|
+
|
|
114
|
+
Previously, we used to coerce data into the inferred data type and, in the process, lost useful formatting context coming from a search result. We've updated this behavior to allow visualizations to directly render the data passed down, and moved type coercion into the DSL formatters.
|
|
115
|
+
|
|
116
|
+
For example, if the timestamp passed to us is `2020-09-02T09:09:36`, the visualization will display `2020-09-02T09:09:36` instead of `2020-09-02T09:09:36+00:00` (previous behavior)
|
|
117
|
+
|
|
118
|
+
<br />
|
|
119
|
+
|
|
120
|
+
### Update the data type inference algorithm to be more robust and handle mixed data types and `NULL` values
|
|
121
|
+
|
|
122
|
+
Type prioritization
|
|
123
|
+
|
|
124
|
+
Previously the type inference for a dataseries was performed by using a very basic method, basically compare the `first`, `mid` and `end` datavalue's types and return the majority type.
|
|
125
|
+
|
|
126
|
+
We've updated this inference technique to more robust method, instead of comparing just the `first`, `mid` and `end` datavalue's types, we create a map of actual count of each type in the data series. If only a single type exists in a dataseries, then that `type` will be returned as the inferred type. If more than one type exist, then type will be returned based on the prioritization rule `geojson > sparkline > array > string > color > number > time > null > unknown`. Empty strings ('') will be typed as unknown.
|
|
127
|
+
|
|
128
|
+
DSL selectors based on type `seriesByType`, `seriesByTypes`, `frameBySeriesTypes` and `seriesByPrioritizedTypes` are impacted. Viz's using these dsl selectors may return a different series now based on new type matching if the dataset has mixed types.
|
|
129
|
+
|
|
130
|
+
Example
|
|
131
|
+
Type inference update for data series
|
|
132
|
+
|
|
133
|
+
Old
|
|
134
|
+
['1','2','3','4','5','6','7','8','9','10'] // => type inferred as 'number'
|
|
135
|
+
[null,'2','3','4','5','6','7','8','9', null] // => type inferred as 'null'
|
|
136
|
+
['200','201','400','success','failure'] // => type inferred as 'number'
|
|
137
|
+
['','',''] // => type inferred as 'string'
|
|
138
|
+
['1','',''] // => type inferred as 'string'
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
New
|
|
142
|
+
['1','2','3','4','5','6','7','8','9','10'] // => type inferred as 'number', all values 'number' type
|
|
143
|
+
[null,'2','3','4','5','6','7','8','9',null] // => type inferred as 'number', mixed type values (number & null), based on priority 'number' > 'null'
|
|
144
|
+
['200','201','400','success','failure'] // => type inferred as 'string', mixed type values (number & string), based on priority 'string' > 'number'
|
|
145
|
+
['','',''] // => type inferred as 'unknown', all values 'unknown' type
|
|
146
|
+
['1','',''] // => type inferred as 'number', mixed type values (number & unknown), based on priority 'number' > 'string',
|
|
147
|
+
|
|
148
|
+
<a name="24.0.0"></a>
|
|
149
|
+
|
|
150
|
+
## 24.0.0
|
|
151
|
+
|
|
152
|
+
### SingleValueRadial design and option updates
|
|
153
|
+
|
|
154
|
+
SingleValueRadial is updated with new designs and options.
|
|
155
|
+
A list of SingleValueRadial's options have been updated such as `majorValue`, `trendValue`, `majorColor`, `trendColor`, `majorValueField`, `trendIndicatorPosition` (removed), and `maxValue` (added). See the [documentation page](https://eng-docs.splunkeng.com/visualizations/24.0.0/?path=%2FSingleValueRadial) for the new design, updated option names, types, and default values.
|
|
156
|
+
|
|
157
|
+
The `viz.singlevalueradial` to `splunk.singlevalueradial` conversion script has also been implemented to account for the updates. For example, if the `trendIndicatorPosition` is configured in `viz.singlevalueradial`, it will be automatically removed in `splunk.singlevalueradial`. And the default `majorValue` and `trendValue` will be preserved in the converted `splunk.singlevalueradial`.
|
|
158
|
+
|
|
159
|
+
Example:
|
|
160
|
+
|
|
161
|
+
```jsx
|
|
162
|
+
import React from 'react';
|
|
163
|
+
import SingleValueRadial from '@splunk/visualizations/SingleValueRadial';
|
|
164
|
+
|
|
165
|
+
export default () => (
|
|
166
|
+
<SingleValueRadial
|
|
167
|
+
options={{
|
|
168
|
+
majorValue: '> primary | seriesByName("bar") | lastPoint()', // Specify the dataSource applied to the major value.
|
|
169
|
+
trendValue: '> primary | seriesByName("bar") | delta(-2)', // Specify the dataSource applied to the trend value.
|
|
170
|
+
maxValue: 1000, // Specify the value the radial fills up to.
|
|
171
|
+
backgroundColor: '#aaaaff',
|
|
172
|
+
}}
|
|
173
|
+
dataSources={{
|
|
174
|
+
primary: {
|
|
175
|
+
data: {
|
|
176
|
+
columns: [
|
|
177
|
+
['1', '62', '103', '308', '587', '876', '70', '80'],
|
|
178
|
+
['1', '2', '3', '4', '5', '6', '7', '3200'],
|
|
179
|
+
],
|
|
180
|
+
fields: [
|
|
181
|
+
{
|
|
182
|
+
name: 'foo',
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: 'bar',
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
meta: {},
|
|
190
|
+
},
|
|
191
|
+
}}
|
|
192
|
+
/>
|
|
193
|
+
);
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
### FillerGauge default gaugeColor update
|
|
197
|
+
|
|
198
|
+
`splunk.fillergauge`'s default `gaugeColor` is updated to `#7B56DB`.
|
|
199
|
+
The `viz.fillergauge` to `splunk.fillergauge` conversion script has taken into account for this change.
|
|
200
|
+
|
|
201
|
+
Example:
|
|
202
|
+
|
|
203
|
+
```jsx
|
|
204
|
+
import React from 'react';
|
|
205
|
+
import FillerGauge from '@splunk/visualizations/FillerGauge';
|
|
206
|
+
|
|
207
|
+
export default () => (
|
|
208
|
+
<FillerGauge
|
|
209
|
+
options={{
|
|
210
|
+
gaugeColor: '> value | rangeValue(gaugeColorRangeValueContext)', // viz.fillergauge default
|
|
211
|
+
value: 123,
|
|
212
|
+
}}
|
|
213
|
+
context={{
|
|
214
|
+
gaugeColorRangeValueContext: [
|
|
215
|
+
{
|
|
216
|
+
from: 70,
|
|
217
|
+
to: 210,
|
|
218
|
+
value: '#ff7152',
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
from: 50,
|
|
222
|
+
to: 70,
|
|
223
|
+
value: '#fc9850',
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
from: 30,
|
|
227
|
+
to: 50,
|
|
228
|
+
value: '#f4df7a',
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
from: 20,
|
|
232
|
+
to: 30,
|
|
233
|
+
value: '#4beba8',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
from: 0,
|
|
237
|
+
to: 20,
|
|
238
|
+
value: '#5fbcff',
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
}}
|
|
242
|
+
dataSources={{
|
|
243
|
+
primary: {
|
|
244
|
+
requestParams: { offset: 0, count: 20 },
|
|
245
|
+
data: {
|
|
246
|
+
fields: [{ name: 'count' }],
|
|
247
|
+
columns: [['78']],
|
|
248
|
+
},
|
|
249
|
+
meta: { totalCount: 200 },
|
|
250
|
+
},
|
|
251
|
+
}}
|
|
252
|
+
/>
|
|
253
|
+
);
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Pie chart option renames
|
|
257
|
+
|
|
258
|
+
`seriesColorsByValue` was previously used for specifying field colors in a Pie visualization. This option has been renamed to `seriesColorsByField`. No functionality has been changed other than the rename.
|
|
259
|
+
|
|
260
|
+
The `viz.pie` to `splunk.pie` conversion script has also been modified to account for this rename.
|
|
261
|
+
|
|
262
|
+
```jsx
|
|
263
|
+
import React from 'react';
|
|
264
|
+
import Pie from '@splunk/visualizations/Pie';
|
|
265
|
+
|
|
266
|
+
export default () => (
|
|
267
|
+
<Pie
|
|
268
|
+
options={{ seriesColorsByField: { December: '#008000', May: '#FF0000' } }} // was previously seriesColorsByValue
|
|
269
|
+
dataSources={{
|
|
270
|
+
primary: {
|
|
271
|
+
requestParams: { offset: 0, count: 20 },
|
|
272
|
+
data: {
|
|
273
|
+
fields: [{ name: 'component' }, { name: 'count' }],
|
|
274
|
+
columns: [
|
|
275
|
+
[
|
|
276
|
+
'January',
|
|
277
|
+
'February',
|
|
278
|
+
'March',
|
|
279
|
+
'April',
|
|
280
|
+
'May',
|
|
281
|
+
'June',
|
|
282
|
+
'July',
|
|
283
|
+
'August',
|
|
284
|
+
'September',
|
|
285
|
+
'October',
|
|
286
|
+
'November',
|
|
287
|
+
'December',
|
|
288
|
+
],
|
|
289
|
+
['1', '1', '1', '2', '10', '10', '5', '5', '5', '5', '5', '50'],
|
|
290
|
+
],
|
|
291
|
+
},
|
|
292
|
+
meta: { totalCount: 20 },
|
|
293
|
+
},
|
|
294
|
+
}}
|
|
295
|
+
/>
|
|
296
|
+
);
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
<a name="23.0.0"></a>
|
|
300
|
+
|
|
301
|
+
## 23.0.0
|
|
302
|
+
|
|
303
|
+
### onEventTrigger and hasEventHandler flag
|
|
304
|
+
|
|
305
|
+
Previously, ChoroplethSVG, SingleValue (SV, SVI, and SVR), and shape (Ellipse + Rectangle) visualizations were the only visualizations to require a `hasEventHandler` flag for their respective event callback handlers to be invoked when an event occurred. As such, charting-based visualizations were the only exception to this invocation pattern.
|
|
306
|
+
|
|
307
|
+
e.g.
|
|
308
|
+
|
|
309
|
+
```jsx
|
|
310
|
+
import React from 'react';
|
|
311
|
+
import SingleValue from '@splunk/visualizations/SingleValue';
|
|
312
|
+
|
|
313
|
+
export default () => (
|
|
314
|
+
<SingleValue
|
|
315
|
+
options={{
|
|
316
|
+
unit: '$',
|
|
317
|
+
unitPosition: 'before',
|
|
318
|
+
}}
|
|
319
|
+
hasEventHandlers
|
|
320
|
+
onEventTrigger={(...ev) => console.log(ev)}
|
|
321
|
+
dataSources={{
|
|
322
|
+
primary: {
|
|
323
|
+
data: {
|
|
324
|
+
columns: [
|
|
325
|
+
['1', '62', '103', '308', '587', '876', '930', '1320'],
|
|
326
|
+
[
|
|
327
|
+
'2018-08-19T00:00:00.000+00:00',
|
|
328
|
+
'2018-08-20T00:00:00.000+00:00',
|
|
329
|
+
'2018-08-21T00:00:00.000+00:00',
|
|
330
|
+
'2018-08-22T00:00:00.000+00:00',
|
|
331
|
+
'2018-08-23T00:00:00.000+00:00',
|
|
332
|
+
'2018-08-24T00:00:00.000+00:00',
|
|
333
|
+
'2018-08-25T00:00:00.000+00:00',
|
|
334
|
+
'2018-08-26T00:00:00.000+00:00',
|
|
335
|
+
],
|
|
336
|
+
],
|
|
337
|
+
fields: [
|
|
338
|
+
{
|
|
339
|
+
name: 'foo',
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
name: '_time',
|
|
343
|
+
},
|
|
344
|
+
],
|
|
345
|
+
},
|
|
346
|
+
meta: {},
|
|
347
|
+
},
|
|
348
|
+
}}
|
|
349
|
+
/>
|
|
350
|
+
);
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
The `hasEventHandlers` flag has now been extended to charting-based visualizations as well.
|
|
354
|
+
|
|
355
|
+
```jsx
|
|
356
|
+
import React from 'react';
|
|
357
|
+
import Area from '@splunk/visualizations/Area';
|
|
358
|
+
|
|
359
|
+
export default () => (
|
|
360
|
+
<Area
|
|
361
|
+
options={{}}
|
|
362
|
+
hasEventHandlers
|
|
363
|
+
onEventTrigger={(...ev) => console.log(ev)}
|
|
364
|
+
dataSources={{
|
|
365
|
+
primary: {
|
|
366
|
+
requestParams: { offset: 0, count: 20 },
|
|
367
|
+
data: {
|
|
368
|
+
fields: [
|
|
369
|
+
{
|
|
370
|
+
name: 'sourcetype',
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
name: 'count',
|
|
374
|
+
type_special: 'count',
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
name: 'percent',
|
|
378
|
+
type_special: 'percent',
|
|
379
|
+
},
|
|
380
|
+
],
|
|
381
|
+
columns: [
|
|
382
|
+
[
|
|
383
|
+
'splunkd',
|
|
384
|
+
'splunkd_ui_access',
|
|
385
|
+
'splunkd_access',
|
|
386
|
+
'splunk_web_access',
|
|
387
|
+
'scheduler',
|
|
388
|
+
'splunk_web_service',
|
|
389
|
+
],
|
|
390
|
+
['600', '525', '295', '213', '122', '19'],
|
|
391
|
+
['87.966380', '50.381304', '60.023780', '121.183272', '70.250513', '90.194752'],
|
|
392
|
+
],
|
|
393
|
+
},
|
|
394
|
+
meta: { totalCount: 100 },
|
|
395
|
+
},
|
|
396
|
+
}}
|
|
397
|
+
/>
|
|
398
|
+
);
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
### Event Payload Changes
|
|
402
|
+
|
|
403
|
+
To support consistency in event payloads, name, value, and `row.<fieldname>.value` have been uniformly applied to refer to the datasource field name, the corresponding value for the datapoint, and the corresponding value in the specified field for the datapoint row for which an interaction was triggered respectively (when applicable). Payload keys which contained duplicate information were removed. Moving forward, UDF will support these as tokens available in dashboards. For additional background information, refer to the [Viz epic](https://jira.splunk.com/browse/SCP-42105) and [UDF epic](https://jira.splunk.com/browse/SCP-39586).
|
|
404
|
+
|
|
405
|
+
Note: Not all visualizations, such as Single Value, support `row.<fieldname>.value`
|
|
406
|
+
|
|
407
|
+
#### Charting-based visualizations event payload changes
|
|
408
|
+
|
|
409
|
+
In addition to the changes mentioned above, it should be noted that `name2` and `value2` have been removed from charting-based platform visualizations, with `name` and `value` taking on values that were previously held by `name2` and `value2`. This corresponds to the y-fieldname and y-value for the datapoint that was interacted with. Additionally, the `rowContext` field has been flattened by adhering to a consistent `row.<fieldName>.value` structure.
|
|
410
|
+
|
|
411
|
+
Previous charting-viz event payloads:
|
|
412
|
+
|
|
413
|
+
```js
|
|
414
|
+
{
|
|
415
|
+
type: "point.mouseout",
|
|
416
|
+
originalEvent: "...Original Event instance...",
|
|
417
|
+
payload: {
|
|
418
|
+
name: "_time",
|
|
419
|
+
value: "1525310146.000",
|
|
420
|
+
name2: "count",
|
|
421
|
+
value2: "2",
|
|
422
|
+
_span: 1,
|
|
423
|
+
rowContext: {
|
|
424
|
+
"row._time": "1525310146.000",
|
|
425
|
+
"row.count": "2"
|
|
426
|
+
},
|
|
427
|
+
tooltipContext: {
|
|
428
|
+
tooltipX: 204.3,
|
|
429
|
+
tooltipY: 166.86666666666667
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
Updated event payloads
|
|
436
|
+
|
|
437
|
+
```js
|
|
438
|
+
{
|
|
439
|
+
type: "point.mouseout",
|
|
440
|
+
originalEvent: "...Original Event instance...",
|
|
441
|
+
payload: {
|
|
442
|
+
_span: 1,
|
|
443
|
+
tooltipContext: {
|
|
444
|
+
tooltipX: 204.3,
|
|
445
|
+
tooltipY: 166.86666666666667
|
|
446
|
+
},
|
|
447
|
+
name: "count", // refers to the y-field
|
|
448
|
+
value: "2", // refers to the y-value
|
|
449
|
+
"row._time.value": "1525310146.000",
|
|
450
|
+
"row.count.value": "2"
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
#### ChoroplethSVG event payload changes
|
|
456
|
+
|
|
457
|
+
`dataName` and `dataValue` have been renamed to `name` and `value`.
|
|
458
|
+
|
|
459
|
+
Previous area.click payload:
|
|
460
|
+
|
|
461
|
+
```js
|
|
462
|
+
{
|
|
463
|
+
originalEvent: "...Original Event instance...",
|
|
464
|
+
payload: {
|
|
465
|
+
clientX: 940,
|
|
466
|
+
clientY: 453,
|
|
467
|
+
dataValue: "10000",
|
|
468
|
+
dataName: "ATX-270-B"
|
|
469
|
+
},
|
|
470
|
+
type: "area.click"
|
|
471
|
+
}
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
New area.click payload:
|
|
475
|
+
|
|
476
|
+
```js
|
|
477
|
+
{
|
|
478
|
+
originalEvent: "...Original Event instance...",
|
|
479
|
+
payload: {
|
|
480
|
+
clientX: 940,
|
|
481
|
+
clientY: 453,
|
|
482
|
+
value: "10000",
|
|
483
|
+
name: "ATX-270-B"
|
|
484
|
+
},
|
|
485
|
+
type: "area.click"
|
|
486
|
+
}
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
#### SingleValue event payload changes
|
|
490
|
+
|
|
491
|
+
`majorValue` has been renamed to `value`, and `name` has been added to the payload.
|
|
492
|
+
|
|
493
|
+
Previous value.click payload:
|
|
494
|
+
|
|
495
|
+
```js
|
|
496
|
+
{
|
|
497
|
+
originalEvent: "...Original Event instance...",
|
|
498
|
+
payload: {
|
|
499
|
+
majorValue: 1320,
|
|
500
|
+
trendValue: 390
|
|
501
|
+
},
|
|
502
|
+
type: "value.click"
|
|
503
|
+
}
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
New value.click payload
|
|
507
|
+
|
|
508
|
+
```js
|
|
509
|
+
{
|
|
510
|
+
originalEvent: "...Original Event instance...",
|
|
511
|
+
payload: {
|
|
512
|
+
trendValue: 390,
|
|
513
|
+
value: 1320,
|
|
514
|
+
name: "foo"
|
|
515
|
+
},
|
|
516
|
+
type: "value.click"
|
|
517
|
+
}
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
#### Table event payload changes
|
|
521
|
+
|
|
522
|
+
Similarly to charting-based visualizations, the `row` payloads have been flattened using the `row.<fieldName>.value` structure. Consequently, `rowValues` has been removed to avoid duplicating information already contained in the flattened structure. `name` and `value` are added to establish consistency with other event payloads emitted by other visualizations.
|
|
523
|
+
|
|
524
|
+
Previous cell.click payload:
|
|
525
|
+
|
|
526
|
+
```js
|
|
527
|
+
{
|
|
528
|
+
originalEvent: "...Original Event instance...",
|
|
529
|
+
payload: {
|
|
530
|
+
cellIndex: 0,
|
|
531
|
+
rowIndex: 0,
|
|
532
|
+
fieldValue: "sourcetype",
|
|
533
|
+
cellValue: "splunkd",
|
|
534
|
+
cellRawValue: "splunkd",
|
|
535
|
+
rowValues: [
|
|
536
|
+
"splunkd",
|
|
537
|
+
500,
|
|
538
|
+
[
|
|
539
|
+
"/opt1/dev",
|
|
540
|
+
"/opt1/qa",
|
|
541
|
+
"/root"
|
|
542
|
+
],
|
|
543
|
+
[
|
|
544
|
+
"##__SPARKLINE__##",
|
|
545
|
+
38.41707347607988,
|
|
546
|
+
89.761764861815,
|
|
547
|
+
21.557911515120654,
|
|
548
|
+
]
|
|
549
|
+
],
|
|
550
|
+
value: "splunkd",
|
|
551
|
+
name: "sourcetype",
|
|
552
|
+
row: {
|
|
553
|
+
#: {
|
|
554
|
+
value: 1
|
|
555
|
+
},
|
|
556
|
+
sourcetype: {
|
|
557
|
+
value: "splunkd"
|
|
558
|
+
},
|
|
559
|
+
count: {
|
|
560
|
+
value: 500
|
|
561
|
+
},
|
|
562
|
+
values(source): {
|
|
563
|
+
value: [
|
|
564
|
+
"/opt1/dev",
|
|
565
|
+
"/opt1/qa",
|
|
566
|
+
"/root"
|
|
567
|
+
]
|
|
568
|
+
},
|
|
569
|
+
sparkline: {
|
|
570
|
+
value: [
|
|
571
|
+
"##__SPARKLINE__##",
|
|
572
|
+
38.41707347607988,
|
|
573
|
+
89.761764861815,
|
|
574
|
+
21.557911515120654,
|
|
575
|
+
]
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
type: "cell.click"
|
|
580
|
+
}
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
New payload structure:
|
|
584
|
+
|
|
585
|
+
```js
|
|
586
|
+
{
|
|
587
|
+
originalEvent: "...Original Event instance...",
|
|
588
|
+
payload: {
|
|
589
|
+
cellIndex: 0,
|
|
590
|
+
rowIndex: 0,
|
|
591
|
+
fieldValue: "sourcetype",
|
|
592
|
+
cellValue: "splunkd",
|
|
593
|
+
cellRawValue: "splunkd",
|
|
594
|
+
value: "splunkd",
|
|
595
|
+
name: "sourcetype",
|
|
596
|
+
"row.#.value": 1,
|
|
597
|
+
"row.sourcetype.value": "splunkd",
|
|
598
|
+
"row.count.value": 500,
|
|
599
|
+
"row.values(source).value": [
|
|
600
|
+
"/opt1/dev",
|
|
601
|
+
"/opt1/qa",
|
|
602
|
+
"/root"
|
|
603
|
+
],
|
|
604
|
+
"row.sparkline.value": [
|
|
605
|
+
"##__SPARKLINE__##",
|
|
606
|
+
38.41707347607988,
|
|
607
|
+
89.761764861815,
|
|
608
|
+
21.557911515120654,
|
|
609
|
+
]
|
|
610
|
+
},
|
|
611
|
+
type: "cell.click"
|
|
612
|
+
}
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
<a name="22.0.0"></a>
|
|
616
|
+
|
|
617
|
+
## 22.0.0
|
|
618
|
+
|
|
619
|
+
### Peer dependency changes
|
|
620
|
+
|
|
621
|
+
- `@splunk/dashboard-visualizations`, `@splunk/react-visualizations` `@splunk/visualization-editors` and `@splunk/visualizations` now have styled-components@^5.1 as a peer dependency (was previously ^3 || ^4)
|
|
622
|
+
- `@splunk/react-ui` is no longer a required peer dependency (it's bundled as a direct dependency in vision packages)
|
|
623
|
+
|
|
624
|
+
### Theming changes in visualizations
|
|
625
|
+
|
|
626
|
+
With the SUI 4.0 uptake (@splunk/react-ui@^4, @splunk/themes@^0.7.0), visualizations and editors no longer export their own themes. Instead, themes are consolidated as part of the visualization directly.
|
|
627
|
+
If no `<SplunkThemeProvider>` is specified, visualizations will default to using their prisma dark theme configuration. Previously, visualizations defaulted to enterprise light if no theming information was given.
|
|
628
|
+
|
|
629
|
+
Previous usage:
|
|
630
|
+
|
|
631
|
+
```jsx
|
|
632
|
+
import React from 'react';
|
|
633
|
+
import { ThemeProvider } from 'styled-components';
|
|
634
|
+
import SingleValue, { themes as SingleValueThemes } from '@splunk/visualizations/SingleValue';
|
|
635
|
+
|
|
636
|
+
// ...
|
|
637
|
+
|
|
638
|
+
export const MyComponent = props => (
|
|
639
|
+
<ThemeProvider theme={SingleValueThemes}>
|
|
640
|
+
<SingleValue {...props}>
|
|
641
|
+
</ThemeProvider>
|
|
642
|
+
);
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
**New usage with SUI4**:
|
|
646
|
+
|
|
647
|
+
```jsx
|
|
648
|
+
import React from 'react';
|
|
649
|
+
import SplunkThemeProvider from '@splunk/themes/SplunkThemeProvider';
|
|
650
|
+
import SingleValue from '@splunk/visualizations/SingleValue';
|
|
651
|
+
|
|
652
|
+
// ...
|
|
653
|
+
|
|
654
|
+
export const MyComponent = props => (
|
|
655
|
+
<SplunkThemeProvider family="prisma" colorScheme="dark" density="comfortable">
|
|
656
|
+
<SingleValue {...props}>
|
|
657
|
+
</SplunkThemeProvider>
|
|
658
|
+
);
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
### Inferring themed default values for editors
|
|
662
|
+
|
|
663
|
+
The editorConfig for DynamicEditor has a new `pickForTheme` editorProp for displaying themed default values in editors.
|
|
664
|
+
|
|
665
|
+
```js
|
|
666
|
+
const config = {
|
|
667
|
+
label: _('Font'),
|
|
668
|
+
layout: [
|
|
669
|
+
[
|
|
670
|
+
{
|
|
671
|
+
label: _('Header Text Color'),
|
|
672
|
+
option: 'headerTextColor',
|
|
673
|
+
editor: 'editor.color',
|
|
674
|
+
editorProps: {
|
|
675
|
+
pickFromTheme: theme =>
|
|
676
|
+
pick({
|
|
677
|
+
enterprise: variables.textColor,
|
|
678
|
+
prisma: {
|
|
679
|
+
light: variables.contentColorDefault,
|
|
680
|
+
dark: variables.neutral500,
|
|
681
|
+
},
|
|
682
|
+
})({ theme }),
|
|
683
|
+
},
|
|
684
|
+
},
|
|
685
|
+
],
|
|
686
|
+
],
|
|
687
|
+
};
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
However, the `themeVariable` editorProp can be used if the theme variable name exists in all SUI themes. This is most often used for prisma theme variables that have corresponding enterprise aliases.
|
|
691
|
+
Example usage:
|
|
692
|
+
|
|
693
|
+
```jsx
|
|
694
|
+
const config = {
|
|
695
|
+
label: _('Font'),
|
|
696
|
+
layout: [
|
|
697
|
+
[
|
|
698
|
+
{
|
|
699
|
+
label: _('Header Text Color'),
|
|
700
|
+
option: 'headerTextColor',
|
|
701
|
+
editor: 'editor.color',
|
|
702
|
+
editorProps: {
|
|
703
|
+
// for the color editor, this would display #3c444d in enterprise light, #ffffff in enterprise dark, and rgba(255, 255, 255, 0.7) in prisma dark.
|
|
704
|
+
themeVariable: 'contentColorDefault',
|
|
705
|
+
},
|
|
706
|
+
},
|
|
707
|
+
],
|
|
708
|
+
],
|
|
709
|
+
};
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
For more complex use cases which require editors to infer theme defaults from DSL, a `themes` object which denotes key-value pairs of functions that return resolved values (hence the `variables.color(props)` invocation) must be specified.
|
|
713
|
+
|
|
714
|
+
```jsx
|
|
715
|
+
const themes = {
|
|
716
|
+
defaultFontColor: props =>
|
|
717
|
+
pick({
|
|
718
|
+
enterprise: {
|
|
719
|
+
dark: variables.textColor(props),
|
|
720
|
+
light: variables.gray20(props),
|
|
721
|
+
},
|
|
722
|
+
prisma: variables.contentColorActive(props),
|
|
723
|
+
})(props),
|
|
724
|
+
defaultBlockFontColor: props =>
|
|
725
|
+
pick({
|
|
726
|
+
enterprise: variables.white(props),
|
|
727
|
+
prisma: variables.contentColorActive(props),
|
|
728
|
+
})(props),
|
|
729
|
+
};
|
|
730
|
+
const config = {
|
|
731
|
+
label: _('Major Color'),
|
|
732
|
+
layout: [
|
|
733
|
+
[
|
|
734
|
+
{
|
|
735
|
+
label: _('Major Color'),
|
|
736
|
+
option: 'majorColor',
|
|
737
|
+
editor: 'editor.color',
|
|
738
|
+
// in this example, majorColor would have a default of `> themes.defaultFontColor` or `themes.defaultBlockFontColor`
|
|
739
|
+
// DSL needs to receive a function that returns a resolved theme value
|
|
740
|
+
editorProps: {
|
|
741
|
+
themes,
|
|
742
|
+
},
|
|
743
|
+
},
|
|
744
|
+
],
|
|
745
|
+
],
|
|
746
|
+
};
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
See https://cd.splunkdev.com/devplat/vision/-/merge_requests/1213#approach for a background regarding this approach.
|
|
750
|
+
|
|
751
|
+
### Other visual changes
|
|
752
|
+
|
|
753
|
+
- visualizations in enterpriseDark use `#000000` for their background color, and `#0b0c0e` for their background color in prisma dark. `#ffffff` is still used as the background color in enterprise light
|
|
754
|
+
|
|
755
|
+
- various minor theming changes for prisma dark (which was previously SCP) theme for visualizations and corresponding editors
|
|
756
|
+
|
|
757
|
+
- Updated Single Value's sparkline area opacity from 75% to 20%. This causes the background color to shine through more prominently ( see [previous](https://cd.splunkdev.com/devplat/vision/-/blob/319742c672cd29f0a9c650cba7b6a08ef5604733/packages/dashboard-visualizations/tests/__image_snapshots__/visual-test-js-dashboard-visualizations-dashboard-single-value-encoding-fill-format-specified-sparkline-area-true-fill-color-red-1-snap.png) vs [new](https://cd.splunkdev.com/devplat/vision/-/blob/32dc99a9f2da52d17b244f0be2081760a2c2ae04/packages/dashboard-visualizations/tests/__image_snapshots__/visual-test-js-dashboard-visualizations-dashboard-single-value-encoding-fill-format-specified-sparkline-area-true-fill-color-red-1-snap.png) )
|
|
758
|
+
|
|
759
|
+
<a name="21.0.0"></a>
|
|
760
|
+
|
|
761
|
+
## 21.0.0
|
|
762
|
+
|
|
763
|
+
- Renamed the following options in @splunk/visualizations for SingleValue, SingleValueIcon and SingleValueRadial:
|
|
764
|
+
|
|
765
|
+
| previous option naming | new option naming |
|
|
766
|
+
| -------------------------- | ---------------------------- |
|
|
767
|
+
| `deltaValue` | `trendValue` |
|
|
768
|
+
| `deltaColor` | `trendColor` |
|
|
769
|
+
| `deltaFontSize` | `trendFontSize` |
|
|
770
|
+
| `shouldTruncateDeltaValue` | `shouldAbbreviateTrendValue` |
|
|
771
|
+
| `deltaDisplayMode` | `trendDisplayMode` |
|
|
772
|
+
|
|
773
|
+
<a name="19.0.0"></a>
|
|
774
|
+
|
|
775
|
+
## 19.0.0
|
|
776
|
+
|
|
777
|
+
No API changes.
|
|
778
|
+
|
|
779
|
+
Visual changes related to Highcharts v7.2.1 upgrade can be summarized as
|
|
780
|
+
|
|
781
|
+
### Major
|
|
782
|
+
|
|
783
|
+
- Axes are stretched to take up more space
|
|
784
|
+

|
|
785
|
+
|
|
786
|
+
- Displays the last label on a categorical axes
|
|
787
|
+

|
|
788
|
+
|
|
789
|
+
- Legends are spaced equally
|
|
790
|
+

|
|
791
|
+
|
|
792
|
+
- Pie Chart shows fewer labels when there are too many labels
|
|
793
|
+

|
|
794
|
+
|
|
795
|
+
- Zooming a chart maintains parent axis
|
|
796
|
+

|
|
797
|
+
|
|
798
|
+
### Minor
|
|
799
|
+
|
|
800
|
+
- Colors of the chart grid have changed
|
|
801
|
+
- Minor pixel differences
|
|
802
|
+
|
|
803
|
+
### Known issues
|
|
804
|
+
|
|
805
|
+
- [SPL-190515](https://jira.splunk.com/browse/SPL-190515) Bubble chart fails to render when `axisY.maximumNumber` and `axisLabelsX.integerUnits` are set ([workaround](https://jira.splunk.com/browse/SPL-190515?focusedCommentId=4960319&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-4960319))
|
|
806
|
+
|
|
807
|
+
For a detailed list of changes refer to [Splunk Charting upgrade review doc](https://docs.google.com/document/d/13GWdNsbLFvY_M824PsBokBfLbVFuyp4qRkaaT5syOUE/edit) or the [visual diffs](https://drive.google.com/drive/u/1/folders/0AGiuEeEGQemoUk9PVA)
|
|
808
|
+
|
|
809
|
+
### Deprecations
|
|
810
|
+
|
|
811
|
+
- @splunk/react-visualization/numberUtils is deprecated. Use @splunk/visualizations-shared/numberUtils instead.
|
|
812
|
+
|
|
813
|
+
<a name="18.0.0"></a>
|
|
814
|
+
|
|
815
|
+
## 18.0.0
|
|
816
|
+
|
|
817
|
+
- Support for `withError`, `withNoResultIndicator` and `withLoadingIndicator` higher order components (HOCs) has been dropped.
|
|
818
|
+
- Visualizations will no longer display Title or Description. `withTitleAndDescription` HOC has been replaced by `withBackgroundColor`. The `withBackgroundColor` HOC retains the logic to apply a background color to the container surrounding the visualization, and calculate pixel sizes for height and width when needed.
|
|
819
|
+
|
|
820
|
+
Usage Example
|
|
821
|
+
|
|
822
|
+
```js
|
|
823
|
+
withBackgroundColor({
|
|
824
|
+
defaultBackgroundColor: themeRegistry.themeVariable('defaultBackgroundColor'),
|
|
825
|
+
enableBackgroundColorOption: true,
|
|
826
|
+
})(Visualization);
|
|
827
|
+
```
|
|
828
|
+
|
|
829
|
+
<a name="17.0.0"></a>
|
|
830
|
+
|
|
831
|
+
## 17.0.0
|
|
832
|
+
|
|
833
|
+
- In Single Value visualization, support for option 'sparklineFillOpacity' has been dropped. A constant sparkline fill opacity of 0.05 is used.
|
|
834
|
+
|
|
835
|
+
- BaseVisualization received a new prop `onComputedProps`
|
|
836
|
+
|
|
837
|
+
The `onComputedProps` prop allows dashboard-visualizations to communicate calculated props (e.g. a background color that is calculated based on data) upwards to its consumer.
|
|
838
|
+
|
|
839
|
+
For the time being only Single Value and Single Value Radial make use of this callback to communicate a data driven background color to dashboards-framework.
|
|
840
|
+
|
|
841
|
+
Usage Example
|
|
842
|
+
|
|
843
|
+
```js
|
|
844
|
+
const TitleContainer = styled.div`
|
|
845
|
+
background-color: ${props => props.backgroundColor};
|
|
846
|
+
`;
|
|
847
|
+
const DashboardWrapper = props => {
|
|
848
|
+
const [state, setState] = useState({ backgroundColor: '#f00' });
|
|
849
|
+
const { title, ...otherVizProps } = props;
|
|
850
|
+
return (
|
|
851
|
+
<>
|
|
852
|
+
<TitleContainer backgroundColor={state.backgroundColor}>{title}</TitleContainer>
|
|
853
|
+
<Visualization {...otherVizProps} onComputedProps={setState} />
|
|
854
|
+
</>
|
|
855
|
+
);
|
|
856
|
+
};
|
|
857
|
+
```
|
|
858
|
+
|
|
859
|
+
<a name="16.0.0"></a>
|
|
860
|
+
|
|
861
|
+
## 16.0.0
|
|
862
|
+
|
|
863
|
+
The Single Value delta colorization behavior changed:
|
|
864
|
+
|
|
865
|
+
1. Delta color is not affected by major color anymore
|
|
866
|
+
2. By default when using a fill/background, delta will use the block font color (white)
|
|
867
|
+
3. When using a default background, in all themes delta will be colored unless customized with encoding
|
|
868
|
+
|
|
869
|
+
If required, the old delta colorization behavior can be retained to some extent:
|
|
870
|
+
|
|
871
|
+
1: set delta color encoding to same as major color encoding
|
|
872
|
+
|
|
873
|
+
```
|
|
874
|
+
encoding={{
|
|
875
|
+
majorColor: {
|
|
876
|
+
field: 'primary[0]',
|
|
877
|
+
format: {
|
|
878
|
+
type: 'rangevalue',
|
|
879
|
+
ranges: [{
|
|
880
|
+
from: 0,
|
|
881
|
+
value: '#fff',
|
|
882
|
+
}, {
|
|
883
|
+
to: 0,
|
|
884
|
+
value: '#fff',
|
|
885
|
+
}]
|
|
886
|
+
},
|
|
887
|
+
},
|
|
888
|
+
// matching with major color
|
|
889
|
+
deltaColor: {
|
|
890
|
+
field: 'primary[0]',
|
|
891
|
+
format: {
|
|
892
|
+
type: 'rangevalue',
|
|
893
|
+
ranges: [{
|
|
894
|
+
from: 0,
|
|
895
|
+
value: '#fff',
|
|
896
|
+
}, {
|
|
897
|
+
to: 0,
|
|
898
|
+
value: '#fff',
|
|
899
|
+
}]
|
|
900
|
+
},
|
|
901
|
+
}
|
|
902
|
+
}}
|
|
903
|
+
```
|
|
904
|
+
|
|
905
|
+
2 & 3: set a delta color encoding to translate to a color instead of falling back to the default
|
|
906
|
+
|
|
907
|
+
```
|
|
908
|
+
encoding={{
|
|
909
|
+
//...
|
|
910
|
+
// colorizes delta white
|
|
911
|
+
deltaColor: {
|
|
912
|
+
field: 'primary[0]',
|
|
913
|
+
format: {
|
|
914
|
+
type: 'rangevalue',
|
|
915
|
+
ranges: [{
|
|
916
|
+
from: 0,
|
|
917
|
+
value: '#fff',
|
|
918
|
+
}, {
|
|
919
|
+
to: 0,
|
|
920
|
+
value: '#fff',
|
|
921
|
+
}]
|
|
922
|
+
},
|
|
923
|
+
}
|
|
924
|
+
}}
|
|
925
|
+
```
|
|
926
|
+
|
|
927
|
+
<a name="15.6.0"></a>
|
|
928
|
+
|
|
929
|
+
## 15.6.0
|
|
930
|
+
|
|
931
|
+
ChoroplethSvg remote URL input are now disabled by default. Please set the feature flag enableSvgHttpDownloader to true to enable http and https downloads.
|
|
932
|
+
|
|
933
|
+
<a name="15.4.0"></a>
|
|
934
|
+
|
|
935
|
+
## 15.4.0
|
|
936
|
+
|
|
937
|
+
Please update your dependencies for the following packages to match peerDependency requirements:
|
|
938
|
+
|
|
939
|
+
- @splunk/react-ui@^2.16.0
|
|
940
|
+
- @splunk/themes@^0.4.2
|
|
941
|
+
|
|
942
|
+
<a name="15.3.0"></a>
|
|
943
|
+
|
|
944
|
+
## 15.3.0
|
|
945
|
+
|
|
946
|
+
Standardize the format of visualization options that expect an 'array' or 'object', but are inputted as 'string'.
|
|
947
|
+
The option type 'string' for the following has been deprecated:
|
|
948
|
+
|
|
949
|
+
- seriesColors, legend.labels, data.fieldShowList, data.fieldHideList, gaugeColors, chart.rangeValues ('string' -> 'array')
|
|
950
|
+
- fieldColors, annotation.categoryColors, fieldDashStyles ('string' -> 'object'),
|
|
951
|
+
|
|
952
|
+
Before
|
|
953
|
+
|
|
954
|
+
```
|
|
955
|
+
option={{
|
|
956
|
+
seriesColors: '[0x0000F, 0x00001]',
|
|
957
|
+
'legend.labels': '[foo, bar]',
|
|
958
|
+
'data.fieldShowList': '[percent, count]',
|
|
959
|
+
'data.fieldHideList': '[percent, count]',
|
|
960
|
+
gaugeColors: '[0x0000F, 0x00001]',
|
|
961
|
+
'chart.rangeValues': '[1, 23]',
|
|
962
|
+
fieldColors: '{"count": 0x008000, "percent": 0xFFA500}',
|
|
963
|
+
'annotation.categoryColors': '{"count": 0x008000, "percent": 0xFFA500}',
|
|
964
|
+
fieldDashStyles: '{"count": shortDash, "percent": dotDash}',
|
|
965
|
+
}}
|
|
966
|
+
```
|
|
967
|
+
|
|
968
|
+
After
|
|
969
|
+
|
|
970
|
+
```
|
|
971
|
+
option={{
|
|
972
|
+
seriesColors: ['0x0000F', '0x00001'],
|
|
973
|
+
'legend.labels': ['foo', 'bar'],
|
|
974
|
+
'data.fieldShowList': ['percent', 'count'],
|
|
975
|
+
'data.fieldHideList': ['percent', 'count'],
|
|
976
|
+
gaugeColors: ['0x0000F', '0x00001'],
|
|
977
|
+
'chart.rangeValues': [1, 23],
|
|
978
|
+
fieldColors: {count: '0x008000', percent: '0xFFA500'},
|
|
979
|
+
'annotation.categoryColors': {count: '0x008000', percent: '0xFFA500'},
|
|
980
|
+
fieldDashStyles: {count: '0x008000', percent: '0xFFA500'},
|
|
981
|
+
}}
|
|
982
|
+
```
|
|
983
|
+
|
|
984
|
+
<a name="15.1.0"></a>
|
|
985
|
+
|
|
986
|
+
## 15.1.0
|
|
987
|
+
|
|
988
|
+
Users of DynamicEditor may pass a function `transformLayout={({ layout, visualization }) => layout}` as a prop which can be used to dynamically alter the editor layout at runtime.
|
|
989
|
+
|
|
990
|
+
<a name="11.0.0"></a>
|
|
991
|
+
|
|
992
|
+
## [10.2.0] to [11.0.0]
|
|
993
|
+
|
|
994
|
+
### BREAKING CHANGES
|
|
995
|
+
|
|
996
|
+
- add new marker gauge visualization, and remove splunk-charting based marker gauge. Encoding (value) is added to new marker gauge. Options are changed in new marker gauge.
|
|
997
|
+
Example:
|
|
998
|
+
|
|
999
|
+
```
|
|
1000
|
+
import React from 'react';
|
|
1001
|
+
import MarkerGauge from '@splunk/dashboard-visualizations/MarkerGauge';
|
|
1002
|
+
|
|
1003
|
+
export default () => (
|
|
1004
|
+
<MarkerGauge
|
|
1005
|
+
encoding={{
|
|
1006
|
+
value: "primary[0]",
|
|
1007
|
+
}}
|
|
1008
|
+
options={{
|
|
1009
|
+
orientation: "horizontal",
|
|
1010
|
+
majorUnit: "10",
|
|
1011
|
+
}}
|
|
1012
|
+
dataSources={{
|
|
1013
|
+
primary: {
|
|
1014
|
+
requestParams: { offset: 0, count: 20 },
|
|
1015
|
+
data: {
|
|
1016
|
+
fields: [{ name: 'count' }],
|
|
1017
|
+
columns: [['78']],
|
|
1018
|
+
},
|
|
1019
|
+
meta: { totalCount: 20 },
|
|
1020
|
+
},
|
|
1021
|
+
}}
|
|
1022
|
+
/>
|
|
1023
|
+
);
|
|
1024
|
+
```
|
|
1025
|
+
|
|
1026
|
+
<a name="7.0.0"></a>
|
|
1027
|
+
|
|
1028
|
+
## 6.0.0 to 7.0.0
|
|
1029
|
+
|
|
1030
|
+
### BREAKING CHANGES
|
|
1031
|
+
|
|
1032
|
+
- add new filler gauge visualization, and remove splunk-charting based filler gauge. Encoding (value, gaugeColor) is added to new filler gauge. Options are changed in new filler gauge.
|
|
1033
|
+
Example:
|
|
1034
|
+
|
|
1035
|
+
```
|
|
1036
|
+
import React from 'react';
|
|
1037
|
+
import FillerGauge from '@splunk/dashboard-visualizations/FillerGauge';
|
|
1038
|
+
|
|
1039
|
+
export default () => (
|
|
1040
|
+
<FillerGauge
|
|
1041
|
+
encoding={{
|
|
1042
|
+
value: "primary[0]",
|
|
1043
|
+
}}
|
|
1044
|
+
options={{
|
|
1045
|
+
orientation: "horizontal",
|
|
1046
|
+
majorUnit: "10",
|
|
1047
|
+
}}
|
|
1048
|
+
dataSources={{
|
|
1049
|
+
primary: {
|
|
1050
|
+
requestParams: { offset: 0, count: 20 },
|
|
1051
|
+
data: {
|
|
1052
|
+
fields: [{ name: 'count' }],
|
|
1053
|
+
columns: [['78']],
|
|
1054
|
+
},
|
|
1055
|
+
meta: { totalCount: 20 },
|
|
1056
|
+
},
|
|
1057
|
+
}}
|
|
1058
|
+
/>
|
|
1059
|
+
);
|
|
1060
|
+
```
|
|
1061
|
+
|
|
1062
|
+
<a name="6.0.0"></a>
|
|
1063
|
+
|
|
1064
|
+
## 5.2.0 to 6.0.0
|
|
1065
|
+
|
|
1066
|
+
### BREAKING CHANGES
|
|
1067
|
+
|
|
1068
|
+
Removed the following options from SingleValueRadial and SingleValueIcon: 'colorBy', 'colorMode', 'trendColorInterpretation', 'rangeValues', 'rangeColors'. Some of these have been replaced by `fill` encoding.
|
|
1069
|
+
Example:
|
|
1070
|
+
|
|
1071
|
+
```
|
|
1072
|
+
encoding={{
|
|
1073
|
+
trend: 'primary[0]',
|
|
1074
|
+
fill: {
|
|
1075
|
+
field: 'primary[0]',
|
|
1076
|
+
format: {
|
|
1077
|
+
ranges: [0, 100, 500, 1000, 5000],
|
|
1078
|
+
values: ['#0000FF', '#800080', '#FFFF00', '#FFA500', '#A52A2A'],
|
|
1079
|
+
},
|
|
1080
|
+
},
|
|
1081
|
+
}}
|
|
1082
|
+
```
|