@splunk/visualizations 28.4.0 → 28.5.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.
- package/Area.config.js +28 -7
- package/Area.config.js.map +2 -2
- package/Area.js +109 -39
- package/Area.js.map +2 -2
- package/Bar.config.js +28 -7
- package/Bar.config.js.map +2 -2
- package/Bar.js +109 -39
- package/Bar.js.map +2 -2
- package/Bubble.config.js +4 -4
- package/Bubble.config.js.map +2 -2
- package/Bubble.js +81 -30
- package/Bubble.js.map +2 -2
- package/CHANGELOG.external.md +98 -0
- package/ChoroplethSvg.js +74 -26
- package/ChoroplethSvg.js.map +2 -2
- package/Column.config.js +28 -7
- package/Column.config.js.map +2 -2
- package/Column.js +109 -39
- package/Column.js.map +2 -2
- package/Ellipse/config.d.ts.map +1 -1
- package/Ellipse.config.js +14 -5
- package/Ellipse.config.js.map +4 -4
- package/Ellipse.js +130 -73
- package/Ellipse.js.map +4 -4
- package/Events.js +74 -26
- package/Events.js.map +2 -2
- package/FillerGauge.js +234 -47
- package/FillerGauge.js.map +2 -2
- package/Image.js +74 -26
- package/Image.js.map +2 -2
- package/Line/lineUtils.d.ts.map +1 -1
- package/Line/mockdata/LineData.d.ts +95 -0
- package/Line/mockdata/LineData.d.ts.map +1 -1
- package/Line.config.js +28 -7
- package/Line.config.js.map +2 -2
- package/Line.js +125 -41
- package/Line.js.map +2 -2
- package/LinkGraph.js +74 -26
- package/LinkGraph.js.map +2 -2
- package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
- package/Map/PureMap/ClusterLayer.d.ts.map +1 -1
- package/Map/PureMap/MapUtils.d.ts +2 -2
- package/Map/PureMap/MapUtils.d.ts.map +1 -1
- package/Map/PureMap/PureMap.d.ts.map +1 -1
- package/Map.js +111 -37
- package/Map.js.map +2 -2
- package/Markdown/config.d.ts.map +1 -1
- package/Markdown.config.js +14 -5
- package/Markdown.config.js.map +4 -4
- package/Markdown.js +91 -34
- package/Markdown.js.map +4 -4
- package/MarkerGauge.js +243 -56
- package/MarkerGauge.js.map +4 -4
- package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/components/Node.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts +78 -0
- package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts +1 -2
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -1
- package/NetworkGraph/config.d.ts.map +1 -1
- package/NetworkGraph.config.js +1 -0
- package/NetworkGraph.config.js.map +2 -2
- package/NetworkGraph.js +366 -105
- package/NetworkGraph.js.map +4 -4
- package/PERFORMANCE.md +23 -0
- package/ParallelCoordinates/ParallelCoordinates.d.ts +1 -46
- package/ParallelCoordinates/ParallelCoordinates.d.ts.map +1 -1
- package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts +12 -58
- package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts.map +1 -1
- package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts +1 -0
- package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts.map +1 -1
- package/ParallelCoordinates.js +150 -153
- package/ParallelCoordinates.js.map +4 -4
- package/Pie/Pie.d.ts.map +1 -1
- package/Pie/config.d.ts.map +1 -1
- package/Pie/pieUtils.d.ts +4 -0
- package/Pie/pieUtils.d.ts.map +1 -1
- package/Pie.config.js +16 -0
- package/Pie.config.js.map +2 -2
- package/Pie.js +121 -35
- package/Pie.js.map +2 -2
- package/Punchcard.js +74 -26
- package/Punchcard.js.map +2 -2
- package/Rectangle/config.d.ts.map +1 -1
- package/Rectangle.config.js +14 -5
- package/Rectangle.config.js.map +4 -4
- package/Rectangle.js +92 -35
- package/Rectangle.js.map +4 -4
- package/Sankey/PureSankey/PureSankey.d.ts +26 -72
- package/Sankey/PureSankey/PureSankey.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyLink.d.ts +3 -19
- package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyNode.d.ts +3 -20
- package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyTooltip.d.ts +3 -24
- package/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -1
- package/Sankey.js +270 -336
- package/Sankey.js.map +2 -2
- package/Scatter.config.js +168 -147
- package/Scatter.config.js.map +4 -4
- package/Scatter.js +249 -179
- package/Scatter.js.map +4 -4
- package/SingleValue.js +96 -75
- package/SingleValue.js.map +2 -2
- package/SingleValueIcon/config.d.ts.map +1 -1
- package/SingleValueIcon.config.js +14 -5
- package/SingleValueIcon.config.js.map +4 -4
- package/SingleValueIcon.js +118 -76
- package/SingleValueIcon.js.map +4 -4
- package/SingleValueRadial/PureSingleValueRadial/GaugeGraph.d.ts.map +1 -1
- package/SingleValueRadial.js +95 -76
- package/SingleValueRadial.js.map +2 -2
- package/Table/Table.d.ts.map +1 -1
- package/Table/hooks.d.ts +2 -0
- package/Table/hooks.d.ts.map +1 -1
- package/Table.js +95 -49
- package/Table.js.map +2 -2
- package/Timeline/PureTimeline/PureTimeline.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelinePlugin.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +2 -1
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
- package/Timeline.js +154 -54
- package/Timeline.js.map +2 -2
- package/common/Charting.d.ts.map +1 -1
- package/common/Charting.js +3 -0
- package/common/Charting.js.map +2 -2
- package/common/GaugeMajorTicks.js +150 -13
- package/common/GaugeMajorTicks.js.map +4 -4
- package/common/GaugeValueMarker.js +84 -17
- package/common/GaugeValueMarker.js.map +4 -4
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.d.ts.map +1 -1
- package/common/OverviewDoc.js +2 -2
- package/common/OverviewDoc.js.map +2 -2
- package/common/TimeSeriesChartWrapper.d.ts.map +1 -1
- package/common/TimeSeriesChartWrapper.js +72 -24
- package/common/TimeSeriesChartWrapper.js.map +2 -2
- package/common/chartingUtils.d.ts +9 -3
- package/common/chartingUtils.d.ts.map +1 -1
- package/common/chartingUtils.js +21 -16
- package/common/chartingUtils.js.map +2 -2
- package/common/editorConfig/AxesChartDataConfig.d.ts +3 -3
- package/common/editorConfig/AxesChartDataConfig.d.ts.map +1 -1
- package/common/editorConfig/AxesChartDataDisplay.d.ts +4 -0
- package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -1
- package/common/editorConfig/AxesChartLegend.d.ts.map +1 -1
- package/common/gaugeUtils.d.ts +37 -0
- package/common/gaugeUtils.d.ts.map +1 -1
- package/common/gaugeUtils.js +152 -2
- package/common/gaugeUtils.js.map +4 -4
- package/common/hocs/mockdata/trellisData.d.ts +119 -0
- package/common/hocs/mockdata/trellisData.d.ts.map +1 -1
- package/common/interfaces/Overview.d.ts +1 -0
- package/common/interfaces/Overview.d.ts.map +1 -1
- package/common/interfaces/VizConfig.d.ts +2 -1
- package/common/interfaces/VizConfig.d.ts.map +1 -1
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/trellisUtils.d.ts.map +1 -1
- package/common/utils/trellisUtils.js +4 -6
- package/common/utils/trellisUtils.js.map +2 -2
- package/common/withDashboardViz.js +74 -26
- package/common/withDashboardViz.js.map +2 -2
- package/package.json +36 -36
package/Bar.js
CHANGED
|
@@ -614,6 +614,9 @@ var ChartingContainer = styled_components_default.div.attrs((props) => ({
|
|
|
614
614
|
& .highcharts-a11y-proxy-container {
|
|
615
615
|
pointer-events: none;
|
|
616
616
|
}
|
|
617
|
+
& .highcharts-a11y-proxy-container-after {
|
|
618
|
+
overflow: hidden;
|
|
619
|
+
}
|
|
617
620
|
overflow: hidden;
|
|
618
621
|
position: relative;
|
|
619
622
|
${(props) => (0, style_exports.toDimension)((0, lodash_exports.pick)(props, ["width", "height"]))};
|
|
@@ -1033,6 +1036,9 @@ var isTrellisEnabled = ({ options, featureFlags }) => {
|
|
|
1033
1036
|
const { splitByLayout = visualization_schemas_exports.LAYOUT_TYPE.Off } = options;
|
|
1034
1037
|
return isTrellisFeatureFlagOn({ featureFlags }) && splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
1035
1038
|
};
|
|
1039
|
+
var isAcceleratedRenderFeatureFlagOn = ({ featureFlags }) => {
|
|
1040
|
+
return Boolean(featureFlags == null ? void 0 : featureFlags.visualizations_enableAcceleratedRender);
|
|
1041
|
+
};
|
|
1036
1042
|
var AxesChartDataConfig = {
|
|
1037
1043
|
label: (0, i18n_exports._)("Data configurations"),
|
|
1038
1044
|
layout: [
|
|
@@ -1166,9 +1172,6 @@ var AxesChartDataConfigBubble = {
|
|
|
1166
1172
|
}
|
|
1167
1173
|
])
|
|
1168
1174
|
};
|
|
1169
|
-
var isAcceleratedRenderFeatureFlagOn = ({ featureFlags }) => {
|
|
1170
|
-
return Boolean(featureFlags == null ? void 0 : featureFlags.visualizations_enableAcceleratedRender);
|
|
1171
|
-
};
|
|
1172
1175
|
var AcceleratedRenderEditorLayout = [
|
|
1173
1176
|
[
|
|
1174
1177
|
{
|
|
@@ -1178,7 +1181,7 @@ var AcceleratedRenderEditorLayout = [
|
|
|
1178
1181
|
showEditor: isAcceleratedRenderFeatureFlagOn,
|
|
1179
1182
|
editorProps: {
|
|
1180
1183
|
help: (0, i18n_exports._)(
|
|
1181
|
-
"Render visualizations faster for large datasets.
|
|
1184
|
+
"Render visualizations faster for large datasets. Split series is not available in this mode."
|
|
1182
1185
|
),
|
|
1183
1186
|
helpFormat: "under"
|
|
1184
1187
|
// helpTextLink: {
|
|
@@ -1335,6 +1338,10 @@ var isTrellisEnabled3 = ({ options, featureFlags }) => {
|
|
|
1335
1338
|
const { splitByLayout = visualization_schemas_exports.LAYOUT_TYPE.Off } = options;
|
|
1336
1339
|
return isTrellisFeatureFlagOn3({ featureFlags }) && splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
1337
1340
|
};
|
|
1341
|
+
var isAcceleratedRenderEnabled = ({ options, featureFlags }) => {
|
|
1342
|
+
const { acceleratedRender } = options;
|
|
1343
|
+
return isAcceleratedRenderFeatureFlagOn({ featureFlags }) && acceleratedRender;
|
|
1344
|
+
};
|
|
1338
1345
|
var AxesChartDataDisplayBase = {
|
|
1339
1346
|
label: (0, i18n_exports._)("Data display"),
|
|
1340
1347
|
layout: [
|
|
@@ -1395,7 +1402,8 @@ var AxesChartDataDisplayBase = {
|
|
|
1395
1402
|
{
|
|
1396
1403
|
label: (0, i18n_exports._)("Split series"),
|
|
1397
1404
|
option: "showSplitSeries",
|
|
1398
|
-
editor: "editor.toggle"
|
|
1405
|
+
editor: "editor.toggle",
|
|
1406
|
+
isDisabled: isAcceleratedRenderEnabled
|
|
1399
1407
|
}
|
|
1400
1408
|
],
|
|
1401
1409
|
[
|
|
@@ -1403,7 +1411,23 @@ var AxesChartDataDisplayBase = {
|
|
|
1403
1411
|
label: (0, i18n_exports._)("Independent y-axis for split series"),
|
|
1404
1412
|
option: "showIndependentYRanges",
|
|
1405
1413
|
editor: "editor.checkbox",
|
|
1406
|
-
showEditor: ({ options }) => options.showSplitSeries
|
|
1414
|
+
showEditor: ({ options, featureFlags }) => options.showSplitSeries && !isAcceleratedRenderEnabled({ options, featureFlags })
|
|
1415
|
+
}
|
|
1416
|
+
],
|
|
1417
|
+
[
|
|
1418
|
+
{
|
|
1419
|
+
label: (0, i18n_exports._)("Step position"),
|
|
1420
|
+
option: "stepPosition",
|
|
1421
|
+
editor: "editor.radioBar",
|
|
1422
|
+
editorProps: {
|
|
1423
|
+
values: [
|
|
1424
|
+
{ label: (0, i18n_exports._)("Off"), value: "off" },
|
|
1425
|
+
{ label: (0, i18n_exports._)("Before"), value: "before" },
|
|
1426
|
+
{ label: (0, i18n_exports._)("After"), value: "after" }
|
|
1427
|
+
]
|
|
1428
|
+
},
|
|
1429
|
+
showEditor: ({ options, featureFlags }) => isAcceleratedRenderEnabled({ options, featureFlags })
|
|
1430
|
+
// step position is only supported when accelerated render is enabled
|
|
1407
1431
|
}
|
|
1408
1432
|
],
|
|
1409
1433
|
...TimechartTrellisEditorConfig
|
|
@@ -1863,7 +1887,7 @@ var AxesChartLegendWithTrellisAndMode = ({
|
|
|
1863
1887
|
{ label: (0, i18n_exports._)("Bottom"), value: "bottom" },
|
|
1864
1888
|
{ label: (0, i18n_exports._)("Off"), value: "off" }
|
|
1865
1889
|
],
|
|
1866
|
-
tooltip: showLegendTooltip
|
|
1890
|
+
tooltip: showLegendTooltip ? (0, i18n_exports._)('Legend mode must be "Standard" to configure legend display') : void 0
|
|
1867
1891
|
},
|
|
1868
1892
|
isDisabled: showLegendTooltip ? ({ options }) => options.legendMode === "seriesCompare" : void 0,
|
|
1869
1893
|
overrideDefaultValue: ({ options }) => (options == null ? void 0 : options.splitByLayout) === "trellis" ? "off" : "right"
|
|
@@ -2761,7 +2785,7 @@ var Cover = styled_components_default.div`
|
|
|
2761
2785
|
bottom: 0;
|
|
2762
2786
|
`;
|
|
2763
2787
|
var Blocker = styled_components_default.div.attrs({
|
|
2764
|
-
"data-splunk-visualization-version": "28.
|
|
2788
|
+
"data-splunk-visualization-version": "28.5.1 - 617766eb3"
|
|
2765
2789
|
})`
|
|
2766
2790
|
position: relative;
|
|
2767
2791
|
width: 100%;
|
|
@@ -2842,7 +2866,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
2842
2866
|
FixSizeItem,
|
|
2843
2867
|
{
|
|
2844
2868
|
"data-test": "fix-size-item",
|
|
2845
|
-
"data-splunk-visualization-version": "28.
|
|
2869
|
+
"data-splunk-visualization-version": "28.5.1 - 617766eb3",
|
|
2846
2870
|
width,
|
|
2847
2871
|
height,
|
|
2848
2872
|
backgroundColor
|
|
@@ -3242,16 +3266,14 @@ var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
|
|
|
3242
3266
|
splitDataSources[val] = (0, lodash_exports.cloneDeep)(
|
|
3243
3267
|
(0, lodash_exports.omit)(dataSource, ["primary.data.fields", "primary.data.columns"])
|
|
3244
3268
|
);
|
|
3245
|
-
splitDataSources[val].primary.data.fields = [
|
|
3246
|
-
{ name: fields[0].name },
|
|
3247
|
-
...dataSourceKeys.map((k) => ({
|
|
3248
|
-
name: k
|
|
3249
|
-
}))
|
|
3250
|
-
];
|
|
3269
|
+
splitDataSources[val].primary.data.fields = [{ name: fields[0].name }];
|
|
3251
3270
|
splitDataSources[val].primary.data.columns = [[...columns[0]]];
|
|
3252
3271
|
dataSourceKeys.forEach((dsKey) => {
|
|
3253
3272
|
fields.forEach((field, idx) => {
|
|
3254
3273
|
if (field.data_source === dsKey && (field.splitby_value === val || field.name === val)) {
|
|
3274
|
+
splitDataSources[val].primary.data.fields.push({
|
|
3275
|
+
name: dsKey
|
|
3276
|
+
});
|
|
3255
3277
|
splitDataSources[val].primary.data.columns.push([...columns[idx]]);
|
|
3256
3278
|
}
|
|
3257
3279
|
});
|
|
@@ -3644,25 +3666,27 @@ var parseAxisValue = (val) => {
|
|
|
3644
3666
|
const num = typeof val === "number" ? val : Number.parseFloat(val);
|
|
3645
3667
|
return Number.isNaN(num) ? void 0 : num;
|
|
3646
3668
|
};
|
|
3647
|
-
var
|
|
3648
|
-
|
|
3669
|
+
var parseXAxisLineVisibility = (visibility) => {
|
|
3670
|
+
if (visibility === "hide") return false;
|
|
3671
|
+
if (visibility === "show") return true;
|
|
3672
|
+
return void 0;
|
|
3673
|
+
};
|
|
3649
3674
|
var getLegend = (props) => {
|
|
3650
3675
|
const legendPlacement = props == null ? void 0 : props.legendDisplay;
|
|
3651
|
-
const { isSeriesCompare } = props;
|
|
3676
|
+
const { isSeriesCompare, legendTruncation } = props;
|
|
3652
3677
|
const commonLegendProps = {
|
|
3653
3678
|
center: true,
|
|
3654
3679
|
fontSize: 12,
|
|
3655
3680
|
largerTiles: true,
|
|
3656
|
-
hideSeriesValue: !isSeriesCompare
|
|
3681
|
+
hideSeriesValue: !isSeriesCompare,
|
|
3657
3682
|
// Show values if in seriesCompare mode
|
|
3683
|
+
legendTruncation
|
|
3658
3684
|
};
|
|
3659
3685
|
switch (legendPlacement) {
|
|
3660
3686
|
case "off":
|
|
3661
3687
|
return false;
|
|
3662
3688
|
case "left":
|
|
3663
|
-
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
|
|
3664
|
-
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
3665
|
-
}, commonLegendProps));
|
|
3689
|
+
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
3666
3690
|
case "bottom":
|
|
3667
3691
|
return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
|
|
3668
3692
|
wrap: true
|
|
@@ -3672,9 +3696,7 @@ var getLegend = (props) => {
|
|
|
3672
3696
|
wrap: true
|
|
3673
3697
|
}, commonLegendProps));
|
|
3674
3698
|
default:
|
|
3675
|
-
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
|
|
3676
|
-
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
3677
|
-
}, commonLegendProps));
|
|
3699
|
+
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
3678
3700
|
}
|
|
3679
3701
|
};
|
|
3680
3702
|
var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
|
|
@@ -3735,9 +3757,7 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
|
|
|
3735
3757
|
if (yAxisAbbreviation !== "none") {
|
|
3736
3758
|
yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
|
|
3737
3759
|
}
|
|
3738
|
-
if (yAxisAbbreviation
|
|
3739
|
-
yConfig.y.width = 55;
|
|
3740
|
-
} else {
|
|
3760
|
+
if (yAxisAbbreviation !== "none") {
|
|
3741
3761
|
yConfig.y.width = label && label.length > 0 ? 30 : 10;
|
|
3742
3762
|
}
|
|
3743
3763
|
if (yAxisLabelVisibility === "hide") {
|
|
@@ -3760,6 +3780,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
3760
3780
|
y2Config.y2.type = scaleType;
|
|
3761
3781
|
if (axisAbbreviation !== "none") {
|
|
3762
3782
|
y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
|
|
3783
|
+
y2Config.y2.width = label && label.length > 0 ? 50 : 10;
|
|
3763
3784
|
} else if (roundAxisLabelsToInteger) {
|
|
3764
3785
|
y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
|
|
3765
3786
|
}
|
|
@@ -3775,7 +3796,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
3775
3796
|
}
|
|
3776
3797
|
return y2Config;
|
|
3777
3798
|
};
|
|
3778
|
-
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField) => {
|
|
3799
|
+
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
|
|
3779
3800
|
const seriesConfig = {};
|
|
3780
3801
|
let spanGaps;
|
|
3781
3802
|
let replaceNullsWithZero;
|
|
@@ -3802,6 +3823,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
3802
3823
|
);
|
|
3803
3824
|
if (shouldAssignToY2) {
|
|
3804
3825
|
seriesConfig[field].overrides.scale = "y2";
|
|
3826
|
+
} else {
|
|
3827
|
+
seriesConfig[field].overrides.scale = "y";
|
|
3805
3828
|
}
|
|
3806
3829
|
}
|
|
3807
3830
|
if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
|
|
@@ -3814,6 +3837,11 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
3814
3837
|
if (fieldDashStyle) {
|
|
3815
3838
|
seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
3816
3839
|
}
|
|
3840
|
+
const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
|
|
3841
|
+
const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
|
|
3842
|
+
if (fieldStepPosition && fieldStepPosition !== "off") {
|
|
3843
|
+
seriesConfig[field].stepPosition = fieldStepPosition;
|
|
3844
|
+
}
|
|
3817
3845
|
if (replaceNullsWithZero !== void 0) {
|
|
3818
3846
|
seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
|
|
3819
3847
|
}
|
|
@@ -3996,6 +4024,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3996
4024
|
backgroundColor,
|
|
3997
4025
|
defaultFontColor,
|
|
3998
4026
|
additionalTooltipValues,
|
|
4027
|
+
xAxisLineVisibility: xAxisLineVisibility,
|
|
4028
|
+
yAxisLineVisibility,
|
|
4029
|
+
y2AxisLineVisibility,
|
|
3999
4030
|
showYAxisWithZero: showYAxisWithZeroFromProps,
|
|
4000
4031
|
showY2AxisWithZero: showY2AxisWithZeroFromProps
|
|
4001
4032
|
} = _a, otherOptions = __objRest(_a, [
|
|
@@ -4019,6 +4050,10 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4019
4050
|
"backgroundColor",
|
|
4020
4051
|
"defaultFontColor",
|
|
4021
4052
|
"additionalTooltipValues",
|
|
4053
|
+
// Extract axis line visibility options from props
|
|
4054
|
+
"xAxisLineVisibility",
|
|
4055
|
+
"yAxisLineVisibility",
|
|
4056
|
+
"y2AxisLineVisibility",
|
|
4022
4057
|
// Extract showYAxisWithZero directly from props for accelerated render mode
|
|
4023
4058
|
"showYAxisWithZero",
|
|
4024
4059
|
"showY2AxisWithZero"
|
|
@@ -4031,6 +4066,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4031
4066
|
fieldColors,
|
|
4032
4067
|
legendLabels: legendLabelsStr,
|
|
4033
4068
|
legendMode,
|
|
4069
|
+
legendTruncation,
|
|
4034
4070
|
"axisTitleX.text": xAxisTitleText,
|
|
4035
4071
|
"axisTitleY.text": yAxisTitleText,
|
|
4036
4072
|
"axisTitleY2.text": y2AxisTitleText,
|
|
@@ -4039,6 +4075,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4039
4075
|
"axisTitleY2.visibility": y2AxisTitleVisibility,
|
|
4040
4076
|
"axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
|
|
4041
4077
|
"axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
|
|
4078
|
+
"axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
|
|
4042
4079
|
"axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
|
|
4043
4080
|
"axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
|
|
4044
4081
|
"axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
|
|
@@ -4056,6 +4093,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4056
4093
|
lineWidth,
|
|
4057
4094
|
lineDashStyle,
|
|
4058
4095
|
fieldDashStyles: lineDashStylesByFieldStr,
|
|
4096
|
+
stepPosition,
|
|
4097
|
+
fieldStepPositions: stepPositionsByFieldStr,
|
|
4059
4098
|
yAxisMin: yAxisMinRaw,
|
|
4060
4099
|
yAxisMax: yAxisMaxRaw,
|
|
4061
4100
|
y2AxisMin: y2AxisMinRaw,
|
|
@@ -4066,6 +4105,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4066
4105
|
showYMinorGridLines,
|
|
4067
4106
|
showY2MinorGridLines,
|
|
4068
4107
|
showLineSmoothing,
|
|
4108
|
+
xAxisMajorTickVisibility,
|
|
4109
|
+
xAxisMajorTickSize,
|
|
4069
4110
|
yAxisMajorTickVisibility,
|
|
4070
4111
|
y2AxisMajorTickVisibility,
|
|
4071
4112
|
yAxisMajorTickSize,
|
|
@@ -4082,10 +4123,14 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4082
4123
|
const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
|
|
4083
4124
|
const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
|
|
4084
4125
|
const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
|
|
4126
|
+
const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
|
|
4085
4127
|
const showYMajorTicks = yAxisMajorTickVisibility === "show";
|
|
4086
4128
|
const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
|
|
4087
4129
|
const showYMinorTicks = yAxisMinorTickVisibility === "show";
|
|
4088
4130
|
const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
|
|
4131
|
+
const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
|
|
4132
|
+
const showYAxisLine = yAxisLineVisibility === "show";
|
|
4133
|
+
const showY2AxisLine = y2AxisLineVisibility === "show";
|
|
4089
4134
|
const yAxisMin = parseAxisValue(yAxisMinRaw);
|
|
4090
4135
|
const yAxisMax = parseAxisValue(yAxisMaxRaw);
|
|
4091
4136
|
const y2AxisMin = parseAxisValue(y2AxisMinRaw);
|
|
@@ -4100,13 +4145,15 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4100
4145
|
y2AxisMajorUnitFromSimpleXML,
|
|
4101
4146
|
y2AxisMajorTickInterval
|
|
4102
4147
|
);
|
|
4103
|
-
const
|
|
4104
|
-
const
|
|
4105
|
-
const
|
|
4106
|
-
const
|
|
4148
|
+
const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
|
|
4149
|
+
const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
|
|
4150
|
+
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
|
|
4151
|
+
const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
|
|
4152
|
+
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
|
|
4107
4153
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
4108
4154
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
4109
4155
|
const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
|
|
4156
|
+
const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
|
|
4110
4157
|
const legendLabels = parseArrayOption(legendLabelsStr);
|
|
4111
4158
|
const bgColor = backgroundColor || bgColorFromOptions;
|
|
4112
4159
|
const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
|
|
@@ -4194,7 +4241,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4194
4241
|
nullValueMode,
|
|
4195
4242
|
markerDisplay,
|
|
4196
4243
|
lineDashStyle,
|
|
4197
|
-
lineDashStylesByField
|
|
4244
|
+
lineDashStylesByField,
|
|
4245
|
+
stepPosition,
|
|
4246
|
+
stepPositionsByField
|
|
4198
4247
|
),
|
|
4199
4248
|
[
|
|
4200
4249
|
yFields,
|
|
@@ -4205,7 +4254,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4205
4254
|
nullValueMode,
|
|
4206
4255
|
markerDisplay,
|
|
4207
4256
|
lineDashStyle,
|
|
4208
|
-
lineDashStylesByField
|
|
4257
|
+
lineDashStylesByField,
|
|
4258
|
+
stepPosition,
|
|
4259
|
+
stepPositionsByField
|
|
4209
4260
|
]
|
|
4210
4261
|
);
|
|
4211
4262
|
const chartingEventAnnotations = (0, react_exports.useMemo)(
|
|
@@ -4220,9 +4271,14 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4220
4271
|
() => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
|
|
4221
4272
|
[xScaleConfig, yScaleConfig, y2ScaleConfig]
|
|
4222
4273
|
);
|
|
4274
|
+
const isSeriesCompare = legendMode === "seriesCompare";
|
|
4223
4275
|
const legend = (0, react_exports.useMemo)(
|
|
4224
|
-
() => getLegend({
|
|
4225
|
-
|
|
4276
|
+
() => getLegend({
|
|
4277
|
+
legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
|
|
4278
|
+
isSeriesCompare,
|
|
4279
|
+
legendTruncation
|
|
4280
|
+
}),
|
|
4281
|
+
[legendDisplay, isSeriesCompare, legendTruncation]
|
|
4226
4282
|
);
|
|
4227
4283
|
const handleChartClick = react_exports.useCallback(
|
|
4228
4284
|
(event) => {
|
|
@@ -4327,6 +4383,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4327
4383
|
seriesConfig: seriesOverrides,
|
|
4328
4384
|
legend,
|
|
4329
4385
|
legendLabels,
|
|
4386
|
+
legendTruncation,
|
|
4330
4387
|
isSeriesCompare: legendMode === "seriesCompare",
|
|
4331
4388
|
maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
|
|
4332
4389
|
scaleConfig,
|
|
@@ -4348,6 +4405,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4348
4405
|
showY2MinorGridLines,
|
|
4349
4406
|
showLineSmoothing,
|
|
4350
4407
|
dataValuesDisplay,
|
|
4408
|
+
showXMajorTicks,
|
|
4409
|
+
xAxisMajorTickSize: xAxisMajorTickSizeNum,
|
|
4351
4410
|
showYMajorTicks,
|
|
4352
4411
|
showY2MajorTicks,
|
|
4353
4412
|
yAxisMajorTickSize: yAxisMajorTickSizeNum,
|
|
@@ -4359,7 +4418,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4359
4418
|
yAxisMinorTickSize: yAxisMinorTickSizeNum,
|
|
4360
4419
|
y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
|
|
4361
4420
|
showYAxisWithZero,
|
|
4362
|
-
showY2AxisWithZero
|
|
4421
|
+
showY2AxisWithZero,
|
|
4422
|
+
showXAxisLine,
|
|
4423
|
+
showYAxisLine,
|
|
4424
|
+
showY2AxisLine,
|
|
4425
|
+
xAxisMaxLabelParts
|
|
4363
4426
|
}
|
|
4364
4427
|
));
|
|
4365
4428
|
}, [
|
|
@@ -4374,6 +4437,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4374
4437
|
seriesOverrides,
|
|
4375
4438
|
legend,
|
|
4376
4439
|
legendLabels,
|
|
4440
|
+
legendTruncation,
|
|
4377
4441
|
scaleConfig,
|
|
4378
4442
|
onClick,
|
|
4379
4443
|
handleChartClick,
|
|
@@ -4392,6 +4456,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4392
4456
|
showY2MinorGridLines,
|
|
4393
4457
|
showLineSmoothing,
|
|
4394
4458
|
dataValuesDisplay,
|
|
4459
|
+
showXMajorTicks,
|
|
4460
|
+
xAxisMajorTickSizeNum,
|
|
4395
4461
|
showYMajorTicks,
|
|
4396
4462
|
showY2MajorTicks,
|
|
4397
4463
|
yAxisMajorTickSizeNum,
|
|
@@ -4404,7 +4470,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4404
4470
|
y2AxisMinorTickSizeNum,
|
|
4405
4471
|
showYAxisWithZero,
|
|
4406
4472
|
showY2AxisWithZero,
|
|
4407
|
-
|
|
4473
|
+
showXAxisLine,
|
|
4474
|
+
showYAxisLine,
|
|
4475
|
+
showY2AxisLine,
|
|
4476
|
+
legendMode,
|
|
4477
|
+
xAxisMaxLabelParts
|
|
4408
4478
|
]);
|
|
4409
4479
|
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
4410
4480
|
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
|