@splunk/visualizations 28.4.0 → 28.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Area.config.js +28 -7
- package/Area.config.js.map +2 -2
- package/Area.js +106 -39
- package/Area.js.map +2 -2
- package/Bar.config.js +28 -7
- package/Bar.config.js.map +2 -2
- package/Bar.js +106 -39
- package/Bar.js.map +2 -2
- package/Bubble.config.js +4 -4
- package/Bubble.config.js.map +2 -2
- package/Bubble.js +78 -30
- package/Bubble.js.map +2 -2
- package/CHANGELOG.external.md +89 -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 +106 -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 +122 -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.js.map +2 -2
- package/NetworkGraph.js +365 -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 +118 -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 +246 -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/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
|
@@ -1033,6 +1033,9 @@ var isTrellisEnabled = ({ options, featureFlags }) => {
|
|
|
1033
1033
|
const { splitByLayout = visualization_schemas_exports.LAYOUT_TYPE.Off } = options;
|
|
1034
1034
|
return isTrellisFeatureFlagOn({ featureFlags }) && splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
1035
1035
|
};
|
|
1036
|
+
var isAcceleratedRenderFeatureFlagOn = ({ featureFlags }) => {
|
|
1037
|
+
return Boolean(featureFlags == null ? void 0 : featureFlags.visualizations_enableAcceleratedRender);
|
|
1038
|
+
};
|
|
1036
1039
|
var AxesChartDataConfig = {
|
|
1037
1040
|
label: (0, i18n_exports._)("Data configurations"),
|
|
1038
1041
|
layout: [
|
|
@@ -1166,9 +1169,6 @@ var AxesChartDataConfigBubble = {
|
|
|
1166
1169
|
}
|
|
1167
1170
|
])
|
|
1168
1171
|
};
|
|
1169
|
-
var isAcceleratedRenderFeatureFlagOn = ({ featureFlags }) => {
|
|
1170
|
-
return Boolean(featureFlags == null ? void 0 : featureFlags.visualizations_enableAcceleratedRender);
|
|
1171
|
-
};
|
|
1172
1172
|
var AcceleratedRenderEditorLayout = [
|
|
1173
1173
|
[
|
|
1174
1174
|
{
|
|
@@ -1178,7 +1178,7 @@ var AcceleratedRenderEditorLayout = [
|
|
|
1178
1178
|
showEditor: isAcceleratedRenderFeatureFlagOn,
|
|
1179
1179
|
editorProps: {
|
|
1180
1180
|
help: (0, i18n_exports._)(
|
|
1181
|
-
"Render visualizations faster for large datasets.
|
|
1181
|
+
"Render visualizations faster for large datasets. Split series is not available in this mode."
|
|
1182
1182
|
),
|
|
1183
1183
|
helpFormat: "under"
|
|
1184
1184
|
// helpTextLink: {
|
|
@@ -1335,6 +1335,10 @@ var isTrellisEnabled3 = ({ options, featureFlags }) => {
|
|
|
1335
1335
|
const { splitByLayout = visualization_schemas_exports.LAYOUT_TYPE.Off } = options;
|
|
1336
1336
|
return isTrellisFeatureFlagOn3({ featureFlags }) && splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
1337
1337
|
};
|
|
1338
|
+
var isAcceleratedRenderEnabled = ({ options, featureFlags }) => {
|
|
1339
|
+
const { acceleratedRender } = options;
|
|
1340
|
+
return isAcceleratedRenderFeatureFlagOn({ featureFlags }) && acceleratedRender;
|
|
1341
|
+
};
|
|
1338
1342
|
var AxesChartDataDisplayBase = {
|
|
1339
1343
|
label: (0, i18n_exports._)("Data display"),
|
|
1340
1344
|
layout: [
|
|
@@ -1395,7 +1399,8 @@ var AxesChartDataDisplayBase = {
|
|
|
1395
1399
|
{
|
|
1396
1400
|
label: (0, i18n_exports._)("Split series"),
|
|
1397
1401
|
option: "showSplitSeries",
|
|
1398
|
-
editor: "editor.toggle"
|
|
1402
|
+
editor: "editor.toggle",
|
|
1403
|
+
isDisabled: isAcceleratedRenderEnabled
|
|
1399
1404
|
}
|
|
1400
1405
|
],
|
|
1401
1406
|
[
|
|
@@ -1403,7 +1408,23 @@ var AxesChartDataDisplayBase = {
|
|
|
1403
1408
|
label: (0, i18n_exports._)("Independent y-axis for split series"),
|
|
1404
1409
|
option: "showIndependentYRanges",
|
|
1405
1410
|
editor: "editor.checkbox",
|
|
1406
|
-
showEditor: ({ options }) => options.showSplitSeries
|
|
1411
|
+
showEditor: ({ options, featureFlags }) => options.showSplitSeries && !isAcceleratedRenderEnabled({ options, featureFlags })
|
|
1412
|
+
}
|
|
1413
|
+
],
|
|
1414
|
+
[
|
|
1415
|
+
{
|
|
1416
|
+
label: (0, i18n_exports._)("Step position"),
|
|
1417
|
+
option: "stepPosition",
|
|
1418
|
+
editor: "editor.radioBar",
|
|
1419
|
+
editorProps: {
|
|
1420
|
+
values: [
|
|
1421
|
+
{ label: (0, i18n_exports._)("Off"), value: "off" },
|
|
1422
|
+
{ label: (0, i18n_exports._)("Before"), value: "before" },
|
|
1423
|
+
{ label: (0, i18n_exports._)("After"), value: "after" }
|
|
1424
|
+
]
|
|
1425
|
+
},
|
|
1426
|
+
showEditor: ({ options, featureFlags }) => isAcceleratedRenderEnabled({ options, featureFlags })
|
|
1427
|
+
// step position is only supported when accelerated render is enabled
|
|
1407
1428
|
}
|
|
1408
1429
|
],
|
|
1409
1430
|
...TimechartTrellisEditorConfig
|
|
@@ -1863,7 +1884,7 @@ var AxesChartLegendWithTrellisAndMode = ({
|
|
|
1863
1884
|
{ label: (0, i18n_exports._)("Bottom"), value: "bottom" },
|
|
1864
1885
|
{ label: (0, i18n_exports._)("Off"), value: "off" }
|
|
1865
1886
|
],
|
|
1866
|
-
tooltip: showLegendTooltip
|
|
1887
|
+
tooltip: showLegendTooltip ? (0, i18n_exports._)('Legend mode must be "Standard" to configure legend display') : void 0
|
|
1867
1888
|
},
|
|
1868
1889
|
isDisabled: showLegendTooltip ? ({ options }) => options.legendMode === "seriesCompare" : void 0,
|
|
1869
1890
|
overrideDefaultValue: ({ options }) => (options == null ? void 0 : options.splitByLayout) === "trellis" ? "off" : "right"
|
|
@@ -2761,7 +2782,7 @@ var Cover = styled_components_default.div`
|
|
|
2761
2782
|
bottom: 0;
|
|
2762
2783
|
`;
|
|
2763
2784
|
var Blocker = styled_components_default.div.attrs({
|
|
2764
|
-
"data-splunk-visualization-version": "28.
|
|
2785
|
+
"data-splunk-visualization-version": "28.5.0 - b192418b7"
|
|
2765
2786
|
})`
|
|
2766
2787
|
position: relative;
|
|
2767
2788
|
width: 100%;
|
|
@@ -2842,7 +2863,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
2842
2863
|
FixSizeItem,
|
|
2843
2864
|
{
|
|
2844
2865
|
"data-test": "fix-size-item",
|
|
2845
|
-
"data-splunk-visualization-version": "28.
|
|
2866
|
+
"data-splunk-visualization-version": "28.5.0 - b192418b7",
|
|
2846
2867
|
width,
|
|
2847
2868
|
height,
|
|
2848
2869
|
backgroundColor
|
|
@@ -3242,16 +3263,14 @@ var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
|
|
|
3242
3263
|
splitDataSources[val] = (0, lodash_exports.cloneDeep)(
|
|
3243
3264
|
(0, lodash_exports.omit)(dataSource, ["primary.data.fields", "primary.data.columns"])
|
|
3244
3265
|
);
|
|
3245
|
-
splitDataSources[val].primary.data.fields = [
|
|
3246
|
-
{ name: fields[0].name },
|
|
3247
|
-
...dataSourceKeys.map((k) => ({
|
|
3248
|
-
name: k
|
|
3249
|
-
}))
|
|
3250
|
-
];
|
|
3266
|
+
splitDataSources[val].primary.data.fields = [{ name: fields[0].name }];
|
|
3251
3267
|
splitDataSources[val].primary.data.columns = [[...columns[0]]];
|
|
3252
3268
|
dataSourceKeys.forEach((dsKey) => {
|
|
3253
3269
|
fields.forEach((field, idx) => {
|
|
3254
3270
|
if (field.data_source === dsKey && (field.splitby_value === val || field.name === val)) {
|
|
3271
|
+
splitDataSources[val].primary.data.fields.push({
|
|
3272
|
+
name: dsKey
|
|
3273
|
+
});
|
|
3255
3274
|
splitDataSources[val].primary.data.columns.push([...columns[idx]]);
|
|
3256
3275
|
}
|
|
3257
3276
|
});
|
|
@@ -3644,25 +3663,27 @@ var parseAxisValue = (val) => {
|
|
|
3644
3663
|
const num = typeof val === "number" ? val : Number.parseFloat(val);
|
|
3645
3664
|
return Number.isNaN(num) ? void 0 : num;
|
|
3646
3665
|
};
|
|
3647
|
-
var
|
|
3648
|
-
|
|
3666
|
+
var parseXAxisLineVisibility = (visibility) => {
|
|
3667
|
+
if (visibility === "hide") return false;
|
|
3668
|
+
if (visibility === "show") return true;
|
|
3669
|
+
return void 0;
|
|
3670
|
+
};
|
|
3649
3671
|
var getLegend = (props) => {
|
|
3650
3672
|
const legendPlacement = props == null ? void 0 : props.legendDisplay;
|
|
3651
|
-
const { isSeriesCompare } = props;
|
|
3673
|
+
const { isSeriesCompare, legendTruncation } = props;
|
|
3652
3674
|
const commonLegendProps = {
|
|
3653
3675
|
center: true,
|
|
3654
3676
|
fontSize: 12,
|
|
3655
3677
|
largerTiles: true,
|
|
3656
|
-
hideSeriesValue: !isSeriesCompare
|
|
3678
|
+
hideSeriesValue: !isSeriesCompare,
|
|
3657
3679
|
// Show values if in seriesCompare mode
|
|
3680
|
+
legendTruncation
|
|
3658
3681
|
};
|
|
3659
3682
|
switch (legendPlacement) {
|
|
3660
3683
|
case "off":
|
|
3661
3684
|
return false;
|
|
3662
3685
|
case "left":
|
|
3663
|
-
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
|
|
3664
|
-
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
3665
|
-
}, commonLegendProps));
|
|
3686
|
+
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
3666
3687
|
case "bottom":
|
|
3667
3688
|
return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
|
|
3668
3689
|
wrap: true
|
|
@@ -3672,9 +3693,7 @@ var getLegend = (props) => {
|
|
|
3672
3693
|
wrap: true
|
|
3673
3694
|
}, commonLegendProps));
|
|
3674
3695
|
default:
|
|
3675
|
-
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
|
|
3676
|
-
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
3677
|
-
}, commonLegendProps));
|
|
3696
|
+
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
3678
3697
|
}
|
|
3679
3698
|
};
|
|
3680
3699
|
var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
|
|
@@ -3735,9 +3754,7 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
|
|
|
3735
3754
|
if (yAxisAbbreviation !== "none") {
|
|
3736
3755
|
yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
|
|
3737
3756
|
}
|
|
3738
|
-
if (yAxisAbbreviation
|
|
3739
|
-
yConfig.y.width = 55;
|
|
3740
|
-
} else {
|
|
3757
|
+
if (yAxisAbbreviation !== "none") {
|
|
3741
3758
|
yConfig.y.width = label && label.length > 0 ? 30 : 10;
|
|
3742
3759
|
}
|
|
3743
3760
|
if (yAxisLabelVisibility === "hide") {
|
|
@@ -3760,6 +3777,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
3760
3777
|
y2Config.y2.type = scaleType;
|
|
3761
3778
|
if (axisAbbreviation !== "none") {
|
|
3762
3779
|
y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
|
|
3780
|
+
y2Config.y2.width = label && label.length > 0 ? 50 : 10;
|
|
3763
3781
|
} else if (roundAxisLabelsToInteger) {
|
|
3764
3782
|
y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
|
|
3765
3783
|
}
|
|
@@ -3775,7 +3793,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
3775
3793
|
}
|
|
3776
3794
|
return y2Config;
|
|
3777
3795
|
};
|
|
3778
|
-
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField) => {
|
|
3796
|
+
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
|
|
3779
3797
|
const seriesConfig = {};
|
|
3780
3798
|
let spanGaps;
|
|
3781
3799
|
let replaceNullsWithZero;
|
|
@@ -3802,6 +3820,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
3802
3820
|
);
|
|
3803
3821
|
if (shouldAssignToY2) {
|
|
3804
3822
|
seriesConfig[field].overrides.scale = "y2";
|
|
3823
|
+
} else {
|
|
3824
|
+
seriesConfig[field].overrides.scale = "y";
|
|
3805
3825
|
}
|
|
3806
3826
|
}
|
|
3807
3827
|
if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
|
|
@@ -3814,6 +3834,11 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
3814
3834
|
if (fieldDashStyle) {
|
|
3815
3835
|
seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
3816
3836
|
}
|
|
3837
|
+
const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
|
|
3838
|
+
const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
|
|
3839
|
+
if (fieldStepPosition && fieldStepPosition !== "off") {
|
|
3840
|
+
seriesConfig[field].stepPosition = fieldStepPosition;
|
|
3841
|
+
}
|
|
3817
3842
|
if (replaceNullsWithZero !== void 0) {
|
|
3818
3843
|
seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
|
|
3819
3844
|
}
|
|
@@ -3996,6 +4021,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3996
4021
|
backgroundColor,
|
|
3997
4022
|
defaultFontColor,
|
|
3998
4023
|
additionalTooltipValues,
|
|
4024
|
+
xAxisLineVisibility: xAxisLineVisibility,
|
|
4025
|
+
yAxisLineVisibility,
|
|
4026
|
+
y2AxisLineVisibility,
|
|
3999
4027
|
showYAxisWithZero: showYAxisWithZeroFromProps,
|
|
4000
4028
|
showY2AxisWithZero: showY2AxisWithZeroFromProps
|
|
4001
4029
|
} = _a, otherOptions = __objRest(_a, [
|
|
@@ -4019,6 +4047,10 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4019
4047
|
"backgroundColor",
|
|
4020
4048
|
"defaultFontColor",
|
|
4021
4049
|
"additionalTooltipValues",
|
|
4050
|
+
// Extract axis line visibility options from props
|
|
4051
|
+
"xAxisLineVisibility",
|
|
4052
|
+
"yAxisLineVisibility",
|
|
4053
|
+
"y2AxisLineVisibility",
|
|
4022
4054
|
// Extract showYAxisWithZero directly from props for accelerated render mode
|
|
4023
4055
|
"showYAxisWithZero",
|
|
4024
4056
|
"showY2AxisWithZero"
|
|
@@ -4031,6 +4063,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4031
4063
|
fieldColors,
|
|
4032
4064
|
legendLabels: legendLabelsStr,
|
|
4033
4065
|
legendMode,
|
|
4066
|
+
legendTruncation,
|
|
4034
4067
|
"axisTitleX.text": xAxisTitleText,
|
|
4035
4068
|
"axisTitleY.text": yAxisTitleText,
|
|
4036
4069
|
"axisTitleY2.text": y2AxisTitleText,
|
|
@@ -4039,6 +4072,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4039
4072
|
"axisTitleY2.visibility": y2AxisTitleVisibility,
|
|
4040
4073
|
"axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
|
|
4041
4074
|
"axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
|
|
4075
|
+
"axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
|
|
4042
4076
|
"axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
|
|
4043
4077
|
"axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
|
|
4044
4078
|
"axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
|
|
@@ -4056,6 +4090,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4056
4090
|
lineWidth,
|
|
4057
4091
|
lineDashStyle,
|
|
4058
4092
|
fieldDashStyles: lineDashStylesByFieldStr,
|
|
4093
|
+
stepPosition,
|
|
4094
|
+
fieldStepPositions: stepPositionsByFieldStr,
|
|
4059
4095
|
yAxisMin: yAxisMinRaw,
|
|
4060
4096
|
yAxisMax: yAxisMaxRaw,
|
|
4061
4097
|
y2AxisMin: y2AxisMinRaw,
|
|
@@ -4066,6 +4102,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4066
4102
|
showYMinorGridLines,
|
|
4067
4103
|
showY2MinorGridLines,
|
|
4068
4104
|
showLineSmoothing,
|
|
4105
|
+
xAxisMajorTickVisibility,
|
|
4106
|
+
xAxisMajorTickSize,
|
|
4069
4107
|
yAxisMajorTickVisibility,
|
|
4070
4108
|
y2AxisMajorTickVisibility,
|
|
4071
4109
|
yAxisMajorTickSize,
|
|
@@ -4082,10 +4120,14 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4082
4120
|
const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
|
|
4083
4121
|
const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
|
|
4084
4122
|
const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
|
|
4123
|
+
const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
|
|
4085
4124
|
const showYMajorTicks = yAxisMajorTickVisibility === "show";
|
|
4086
4125
|
const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
|
|
4087
4126
|
const showYMinorTicks = yAxisMinorTickVisibility === "show";
|
|
4088
4127
|
const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
|
|
4128
|
+
const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
|
|
4129
|
+
const showYAxisLine = yAxisLineVisibility === "show";
|
|
4130
|
+
const showY2AxisLine = y2AxisLineVisibility === "show";
|
|
4089
4131
|
const yAxisMin = parseAxisValue(yAxisMinRaw);
|
|
4090
4132
|
const yAxisMax = parseAxisValue(yAxisMaxRaw);
|
|
4091
4133
|
const y2AxisMin = parseAxisValue(y2AxisMinRaw);
|
|
@@ -4100,13 +4142,15 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4100
4142
|
y2AxisMajorUnitFromSimpleXML,
|
|
4101
4143
|
y2AxisMajorTickInterval
|
|
4102
4144
|
);
|
|
4103
|
-
const
|
|
4104
|
-
const
|
|
4105
|
-
const
|
|
4106
|
-
const
|
|
4145
|
+
const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
|
|
4146
|
+
const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
|
|
4147
|
+
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
|
|
4148
|
+
const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
|
|
4149
|
+
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
|
|
4107
4150
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
4108
4151
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
4109
4152
|
const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
|
|
4153
|
+
const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
|
|
4110
4154
|
const legendLabels = parseArrayOption(legendLabelsStr);
|
|
4111
4155
|
const bgColor = backgroundColor || bgColorFromOptions;
|
|
4112
4156
|
const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
|
|
@@ -4194,7 +4238,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4194
4238
|
nullValueMode,
|
|
4195
4239
|
markerDisplay,
|
|
4196
4240
|
lineDashStyle,
|
|
4197
|
-
lineDashStylesByField
|
|
4241
|
+
lineDashStylesByField,
|
|
4242
|
+
stepPosition,
|
|
4243
|
+
stepPositionsByField
|
|
4198
4244
|
),
|
|
4199
4245
|
[
|
|
4200
4246
|
yFields,
|
|
@@ -4205,7 +4251,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4205
4251
|
nullValueMode,
|
|
4206
4252
|
markerDisplay,
|
|
4207
4253
|
lineDashStyle,
|
|
4208
|
-
lineDashStylesByField
|
|
4254
|
+
lineDashStylesByField,
|
|
4255
|
+
stepPosition,
|
|
4256
|
+
stepPositionsByField
|
|
4209
4257
|
]
|
|
4210
4258
|
);
|
|
4211
4259
|
const chartingEventAnnotations = (0, react_exports.useMemo)(
|
|
@@ -4220,9 +4268,14 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4220
4268
|
() => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
|
|
4221
4269
|
[xScaleConfig, yScaleConfig, y2ScaleConfig]
|
|
4222
4270
|
);
|
|
4271
|
+
const isSeriesCompare = legendMode === "seriesCompare";
|
|
4223
4272
|
const legend = (0, react_exports.useMemo)(
|
|
4224
|
-
() => getLegend({
|
|
4225
|
-
|
|
4273
|
+
() => getLegend({
|
|
4274
|
+
legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
|
|
4275
|
+
isSeriesCompare,
|
|
4276
|
+
legendTruncation
|
|
4277
|
+
}),
|
|
4278
|
+
[legendDisplay, isSeriesCompare, legendTruncation]
|
|
4226
4279
|
);
|
|
4227
4280
|
const handleChartClick = react_exports.useCallback(
|
|
4228
4281
|
(event) => {
|
|
@@ -4327,6 +4380,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4327
4380
|
seriesConfig: seriesOverrides,
|
|
4328
4381
|
legend,
|
|
4329
4382
|
legendLabels,
|
|
4383
|
+
legendTruncation,
|
|
4330
4384
|
isSeriesCompare: legendMode === "seriesCompare",
|
|
4331
4385
|
maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
|
|
4332
4386
|
scaleConfig,
|
|
@@ -4348,6 +4402,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4348
4402
|
showY2MinorGridLines,
|
|
4349
4403
|
showLineSmoothing,
|
|
4350
4404
|
dataValuesDisplay,
|
|
4405
|
+
showXMajorTicks,
|
|
4406
|
+
xAxisMajorTickSize: xAxisMajorTickSizeNum,
|
|
4351
4407
|
showYMajorTicks,
|
|
4352
4408
|
showY2MajorTicks,
|
|
4353
4409
|
yAxisMajorTickSize: yAxisMajorTickSizeNum,
|
|
@@ -4359,7 +4415,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4359
4415
|
yAxisMinorTickSize: yAxisMinorTickSizeNum,
|
|
4360
4416
|
y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
|
|
4361
4417
|
showYAxisWithZero,
|
|
4362
|
-
showY2AxisWithZero
|
|
4418
|
+
showY2AxisWithZero,
|
|
4419
|
+
showXAxisLine,
|
|
4420
|
+
showYAxisLine,
|
|
4421
|
+
showY2AxisLine,
|
|
4422
|
+
xAxisMaxLabelParts
|
|
4363
4423
|
}
|
|
4364
4424
|
));
|
|
4365
4425
|
}, [
|
|
@@ -4374,6 +4434,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4374
4434
|
seriesOverrides,
|
|
4375
4435
|
legend,
|
|
4376
4436
|
legendLabels,
|
|
4437
|
+
legendTruncation,
|
|
4377
4438
|
scaleConfig,
|
|
4378
4439
|
onClick,
|
|
4379
4440
|
handleChartClick,
|
|
@@ -4392,6 +4453,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4392
4453
|
showY2MinorGridLines,
|
|
4393
4454
|
showLineSmoothing,
|
|
4394
4455
|
dataValuesDisplay,
|
|
4456
|
+
showXMajorTicks,
|
|
4457
|
+
xAxisMajorTickSizeNum,
|
|
4395
4458
|
showYMajorTicks,
|
|
4396
4459
|
showY2MajorTicks,
|
|
4397
4460
|
yAxisMajorTickSizeNum,
|
|
@@ -4404,7 +4467,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4404
4467
|
y2AxisMinorTickSizeNum,
|
|
4405
4468
|
showYAxisWithZero,
|
|
4406
4469
|
showY2AxisWithZero,
|
|
4407
|
-
|
|
4470
|
+
showXAxisLine,
|
|
4471
|
+
showYAxisLine,
|
|
4472
|
+
showY2AxisLine,
|
|
4473
|
+
legendMode,
|
|
4474
|
+
xAxisMaxLabelParts
|
|
4408
4475
|
]);
|
|
4409
4476
|
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
4410
4477
|
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
|