@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/Line.js
CHANGED
|
@@ -1024,6 +1024,9 @@ var isTrellisEnabled = ({ options, featureFlags }) => {
|
|
|
1024
1024
|
const { splitByLayout = visualization_schemas_exports.LAYOUT_TYPE.Off } = options;
|
|
1025
1025
|
return isTrellisFeatureFlagOn({ featureFlags }) && splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
1026
1026
|
};
|
|
1027
|
+
var isAcceleratedRenderFeatureFlagOn = ({ featureFlags }) => {
|
|
1028
|
+
return Boolean(featureFlags == null ? void 0 : featureFlags.visualizations_enableAcceleratedRender);
|
|
1029
|
+
};
|
|
1027
1030
|
var AxesChartDataConfig = {
|
|
1028
1031
|
label: (0, i18n_exports._)("Data configurations"),
|
|
1029
1032
|
layout: [
|
|
@@ -1157,9 +1160,6 @@ var AxesChartDataConfigBubble = {
|
|
|
1157
1160
|
}
|
|
1158
1161
|
])
|
|
1159
1162
|
};
|
|
1160
|
-
var isAcceleratedRenderFeatureFlagOn = ({ featureFlags }) => {
|
|
1161
|
-
return Boolean(featureFlags == null ? void 0 : featureFlags.visualizations_enableAcceleratedRender);
|
|
1162
|
-
};
|
|
1163
1163
|
var AcceleratedRenderEditorLayout = [
|
|
1164
1164
|
[
|
|
1165
1165
|
{
|
|
@@ -1169,7 +1169,7 @@ var AcceleratedRenderEditorLayout = [
|
|
|
1169
1169
|
showEditor: isAcceleratedRenderFeatureFlagOn,
|
|
1170
1170
|
editorProps: {
|
|
1171
1171
|
help: (0, i18n_exports._)(
|
|
1172
|
-
"Render visualizations faster for large datasets.
|
|
1172
|
+
"Render visualizations faster for large datasets. Split series is not available in this mode."
|
|
1173
1173
|
),
|
|
1174
1174
|
helpFormat: "under"
|
|
1175
1175
|
// helpTextLink: {
|
|
@@ -1326,6 +1326,10 @@ var isTrellisEnabled3 = ({ options, featureFlags }) => {
|
|
|
1326
1326
|
const { splitByLayout = visualization_schemas_exports.LAYOUT_TYPE.Off } = options;
|
|
1327
1327
|
return isTrellisFeatureFlagOn3({ featureFlags }) && splitByLayout === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
1328
1328
|
};
|
|
1329
|
+
var isAcceleratedRenderEnabled = ({ options, featureFlags }) => {
|
|
1330
|
+
const { acceleratedRender } = options;
|
|
1331
|
+
return isAcceleratedRenderFeatureFlagOn({ featureFlags }) && acceleratedRender;
|
|
1332
|
+
};
|
|
1329
1333
|
var AxesChartDataDisplayBase = {
|
|
1330
1334
|
label: (0, i18n_exports._)("Data display"),
|
|
1331
1335
|
layout: [
|
|
@@ -1386,7 +1390,8 @@ var AxesChartDataDisplayBase = {
|
|
|
1386
1390
|
{
|
|
1387
1391
|
label: (0, i18n_exports._)("Split series"),
|
|
1388
1392
|
option: "showSplitSeries",
|
|
1389
|
-
editor: "editor.toggle"
|
|
1393
|
+
editor: "editor.toggle",
|
|
1394
|
+
isDisabled: isAcceleratedRenderEnabled
|
|
1390
1395
|
}
|
|
1391
1396
|
],
|
|
1392
1397
|
[
|
|
@@ -1394,7 +1399,23 @@ var AxesChartDataDisplayBase = {
|
|
|
1394
1399
|
label: (0, i18n_exports._)("Independent y-axis for split series"),
|
|
1395
1400
|
option: "showIndependentYRanges",
|
|
1396
1401
|
editor: "editor.checkbox",
|
|
1397
|
-
showEditor: ({ options }) => options.showSplitSeries
|
|
1402
|
+
showEditor: ({ options, featureFlags }) => options.showSplitSeries && !isAcceleratedRenderEnabled({ options, featureFlags })
|
|
1403
|
+
}
|
|
1404
|
+
],
|
|
1405
|
+
[
|
|
1406
|
+
{
|
|
1407
|
+
label: (0, i18n_exports._)("Step position"),
|
|
1408
|
+
option: "stepPosition",
|
|
1409
|
+
editor: "editor.radioBar",
|
|
1410
|
+
editorProps: {
|
|
1411
|
+
values: [
|
|
1412
|
+
{ label: (0, i18n_exports._)("Off"), value: "off" },
|
|
1413
|
+
{ label: (0, i18n_exports._)("Before"), value: "before" },
|
|
1414
|
+
{ label: (0, i18n_exports._)("After"), value: "after" }
|
|
1415
|
+
]
|
|
1416
|
+
},
|
|
1417
|
+
showEditor: ({ options, featureFlags }) => isAcceleratedRenderEnabled({ options, featureFlags })
|
|
1418
|
+
// step position is only supported when accelerated render is enabled
|
|
1398
1419
|
}
|
|
1399
1420
|
],
|
|
1400
1421
|
...TimechartTrellisEditorConfig
|
|
@@ -1581,7 +1602,7 @@ var AxesChartLegendWithTrellisAndMode = ({
|
|
|
1581
1602
|
{ label: (0, i18n_exports._)("Bottom"), value: "bottom" },
|
|
1582
1603
|
{ label: (0, i18n_exports._)("Off"), value: "off" }
|
|
1583
1604
|
],
|
|
1584
|
-
tooltip: showLegendTooltip
|
|
1605
|
+
tooltip: showLegendTooltip ? (0, i18n_exports._)('Legend mode must be "Standard" to configure legend display') : void 0
|
|
1585
1606
|
},
|
|
1586
1607
|
isDisabled: showLegendTooltip ? ({ options }) => options.legendMode === "seriesCompare" : void 0,
|
|
1587
1608
|
overrideDefaultValue: ({ options }) => (options == null ? void 0 : options.splitByLayout) === "trellis" ? "off" : "right"
|
|
@@ -2741,7 +2762,7 @@ var Cover = styled_components_default.div`
|
|
|
2741
2762
|
bottom: 0;
|
|
2742
2763
|
`;
|
|
2743
2764
|
var Blocker = styled_components_default.div.attrs({
|
|
2744
|
-
"data-splunk-visualization-version": "28.
|
|
2765
|
+
"data-splunk-visualization-version": "28.5.0 - b192418b7"
|
|
2745
2766
|
})`
|
|
2746
2767
|
position: relative;
|
|
2747
2768
|
width: 100%;
|
|
@@ -2822,7 +2843,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
2822
2843
|
FixSizeItem,
|
|
2823
2844
|
{
|
|
2824
2845
|
"data-test": "fix-size-item",
|
|
2825
|
-
"data-splunk-visualization-version": "28.
|
|
2846
|
+
"data-splunk-visualization-version": "28.5.0 - b192418b7",
|
|
2826
2847
|
width,
|
|
2827
2848
|
height,
|
|
2828
2849
|
backgroundColor
|
|
@@ -3222,16 +3243,14 @@ var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
|
|
|
3222
3243
|
splitDataSources[val] = (0, lodash_exports.cloneDeep)(
|
|
3223
3244
|
(0, lodash_exports.omit)(dataSource, ["primary.data.fields", "primary.data.columns"])
|
|
3224
3245
|
);
|
|
3225
|
-
splitDataSources[val].primary.data.fields = [
|
|
3226
|
-
{ name: fields[0].name },
|
|
3227
|
-
...dataSourceKeys.map((k) => ({
|
|
3228
|
-
name: k
|
|
3229
|
-
}))
|
|
3230
|
-
];
|
|
3246
|
+
splitDataSources[val].primary.data.fields = [{ name: fields[0].name }];
|
|
3231
3247
|
splitDataSources[val].primary.data.columns = [[...columns[0]]];
|
|
3232
3248
|
dataSourceKeys.forEach((dsKey) => {
|
|
3233
3249
|
fields.forEach((field, idx) => {
|
|
3234
3250
|
if (field.data_source === dsKey && (field.splitby_value === val || field.name === val)) {
|
|
3251
|
+
splitDataSources[val].primary.data.fields.push({
|
|
3252
|
+
name: dsKey
|
|
3253
|
+
});
|
|
3235
3254
|
splitDataSources[val].primary.data.columns.push([...columns[idx]]);
|
|
3236
3255
|
}
|
|
3237
3256
|
});
|
|
@@ -3622,25 +3641,27 @@ var parseAxisValue = (val) => {
|
|
|
3622
3641
|
const num = typeof val === "number" ? val : Number.parseFloat(val);
|
|
3623
3642
|
return Number.isNaN(num) ? void 0 : num;
|
|
3624
3643
|
};
|
|
3625
|
-
var
|
|
3626
|
-
|
|
3644
|
+
var parseXAxisLineVisibility = (visibility) => {
|
|
3645
|
+
if (visibility === "hide") return false;
|
|
3646
|
+
if (visibility === "show") return true;
|
|
3647
|
+
return void 0;
|
|
3648
|
+
};
|
|
3627
3649
|
var getLegend = (props) => {
|
|
3628
3650
|
const legendPlacement = props == null ? void 0 : props.legendDisplay;
|
|
3629
|
-
const { isSeriesCompare } = props;
|
|
3651
|
+
const { isSeriesCompare, legendTruncation } = props;
|
|
3630
3652
|
const commonLegendProps = {
|
|
3631
3653
|
center: true,
|
|
3632
3654
|
fontSize: 12,
|
|
3633
3655
|
largerTiles: true,
|
|
3634
|
-
hideSeriesValue: !isSeriesCompare
|
|
3656
|
+
hideSeriesValue: !isSeriesCompare,
|
|
3635
3657
|
// Show values if in seriesCompare mode
|
|
3658
|
+
legendTruncation
|
|
3636
3659
|
};
|
|
3637
3660
|
switch (legendPlacement) {
|
|
3638
3661
|
case "off":
|
|
3639
3662
|
return false;
|
|
3640
3663
|
case "left":
|
|
3641
|
-
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
|
|
3642
|
-
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
3643
|
-
}, commonLegendProps));
|
|
3664
|
+
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
3644
3665
|
case "bottom":
|
|
3645
3666
|
return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
|
|
3646
3667
|
wrap: true
|
|
@@ -3650,9 +3671,7 @@ var getLegend = (props) => {
|
|
|
3650
3671
|
wrap: true
|
|
3651
3672
|
}, commonLegendProps));
|
|
3652
3673
|
default:
|
|
3653
|
-
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
|
|
3654
|
-
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
3655
|
-
}, commonLegendProps));
|
|
3674
|
+
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
3656
3675
|
}
|
|
3657
3676
|
};
|
|
3658
3677
|
var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
|
|
@@ -3713,9 +3732,7 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
|
|
|
3713
3732
|
if (yAxisAbbreviation !== "none") {
|
|
3714
3733
|
yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
|
|
3715
3734
|
}
|
|
3716
|
-
if (yAxisAbbreviation
|
|
3717
|
-
yConfig.y.width = 55;
|
|
3718
|
-
} else {
|
|
3735
|
+
if (yAxisAbbreviation !== "none") {
|
|
3719
3736
|
yConfig.y.width = label && label.length > 0 ? 30 : 10;
|
|
3720
3737
|
}
|
|
3721
3738
|
if (yAxisLabelVisibility === "hide") {
|
|
@@ -3738,6 +3755,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
3738
3755
|
y2Config.y2.type = scaleType;
|
|
3739
3756
|
if (axisAbbreviation !== "none") {
|
|
3740
3757
|
y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
|
|
3758
|
+
y2Config.y2.width = label && label.length > 0 ? 50 : 10;
|
|
3741
3759
|
} else if (roundAxisLabelsToInteger) {
|
|
3742
3760
|
y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
|
|
3743
3761
|
}
|
|
@@ -3753,7 +3771,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
3753
3771
|
}
|
|
3754
3772
|
return y2Config;
|
|
3755
3773
|
};
|
|
3756
|
-
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField) => {
|
|
3774
|
+
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
|
|
3757
3775
|
const seriesConfig = {};
|
|
3758
3776
|
let spanGaps;
|
|
3759
3777
|
let replaceNullsWithZero;
|
|
@@ -3780,6 +3798,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
3780
3798
|
);
|
|
3781
3799
|
if (shouldAssignToY2) {
|
|
3782
3800
|
seriesConfig[field].overrides.scale = "y2";
|
|
3801
|
+
} else {
|
|
3802
|
+
seriesConfig[field].overrides.scale = "y";
|
|
3783
3803
|
}
|
|
3784
3804
|
}
|
|
3785
3805
|
if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
|
|
@@ -3792,6 +3812,11 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
3792
3812
|
if (fieldDashStyle) {
|
|
3793
3813
|
seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
3794
3814
|
}
|
|
3815
|
+
const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
|
|
3816
|
+
const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
|
|
3817
|
+
if (fieldStepPosition && fieldStepPosition !== "off") {
|
|
3818
|
+
seriesConfig[field].stepPosition = fieldStepPosition;
|
|
3819
|
+
}
|
|
3795
3820
|
if (replaceNullsWithZero !== void 0) {
|
|
3796
3821
|
seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
|
|
3797
3822
|
}
|
|
@@ -3974,6 +3999,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3974
3999
|
backgroundColor,
|
|
3975
4000
|
defaultFontColor,
|
|
3976
4001
|
additionalTooltipValues,
|
|
4002
|
+
xAxisLineVisibility: xAxisLineVisibility,
|
|
4003
|
+
yAxisLineVisibility,
|
|
4004
|
+
y2AxisLineVisibility,
|
|
3977
4005
|
showYAxisWithZero: showYAxisWithZeroFromProps,
|
|
3978
4006
|
showY2AxisWithZero: showY2AxisWithZeroFromProps
|
|
3979
4007
|
} = _a, otherOptions = __objRest(_a, [
|
|
@@ -3997,6 +4025,10 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3997
4025
|
"backgroundColor",
|
|
3998
4026
|
"defaultFontColor",
|
|
3999
4027
|
"additionalTooltipValues",
|
|
4028
|
+
// Extract axis line visibility options from props
|
|
4029
|
+
"xAxisLineVisibility",
|
|
4030
|
+
"yAxisLineVisibility",
|
|
4031
|
+
"y2AxisLineVisibility",
|
|
4000
4032
|
// Extract showYAxisWithZero directly from props for accelerated render mode
|
|
4001
4033
|
"showYAxisWithZero",
|
|
4002
4034
|
"showY2AxisWithZero"
|
|
@@ -4009,6 +4041,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4009
4041
|
fieldColors,
|
|
4010
4042
|
legendLabels: legendLabelsStr,
|
|
4011
4043
|
legendMode,
|
|
4044
|
+
legendTruncation,
|
|
4012
4045
|
"axisTitleX.text": xAxisTitleText,
|
|
4013
4046
|
"axisTitleY.text": yAxisTitleText,
|
|
4014
4047
|
"axisTitleY2.text": y2AxisTitleText,
|
|
@@ -4017,6 +4050,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4017
4050
|
"axisTitleY2.visibility": y2AxisTitleVisibility,
|
|
4018
4051
|
"axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
|
|
4019
4052
|
"axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
|
|
4053
|
+
"axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
|
|
4020
4054
|
"axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
|
|
4021
4055
|
"axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
|
|
4022
4056
|
"axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
|
|
@@ -4034,6 +4068,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4034
4068
|
lineWidth,
|
|
4035
4069
|
lineDashStyle,
|
|
4036
4070
|
fieldDashStyles: lineDashStylesByFieldStr,
|
|
4071
|
+
stepPosition,
|
|
4072
|
+
fieldStepPositions: stepPositionsByFieldStr,
|
|
4037
4073
|
yAxisMin: yAxisMinRaw,
|
|
4038
4074
|
yAxisMax: yAxisMaxRaw,
|
|
4039
4075
|
y2AxisMin: y2AxisMinRaw,
|
|
@@ -4044,6 +4080,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4044
4080
|
showYMinorGridLines,
|
|
4045
4081
|
showY2MinorGridLines,
|
|
4046
4082
|
showLineSmoothing,
|
|
4083
|
+
xAxisMajorTickVisibility,
|
|
4084
|
+
xAxisMajorTickSize,
|
|
4047
4085
|
yAxisMajorTickVisibility,
|
|
4048
4086
|
y2AxisMajorTickVisibility,
|
|
4049
4087
|
yAxisMajorTickSize,
|
|
@@ -4060,10 +4098,14 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4060
4098
|
const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
|
|
4061
4099
|
const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
|
|
4062
4100
|
const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
|
|
4101
|
+
const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
|
|
4063
4102
|
const showYMajorTicks = yAxisMajorTickVisibility === "show";
|
|
4064
4103
|
const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
|
|
4065
4104
|
const showYMinorTicks = yAxisMinorTickVisibility === "show";
|
|
4066
4105
|
const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
|
|
4106
|
+
const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
|
|
4107
|
+
const showYAxisLine = yAxisLineVisibility === "show";
|
|
4108
|
+
const showY2AxisLine = y2AxisLineVisibility === "show";
|
|
4067
4109
|
const yAxisMin = parseAxisValue(yAxisMinRaw);
|
|
4068
4110
|
const yAxisMax = parseAxisValue(yAxisMaxRaw);
|
|
4069
4111
|
const y2AxisMin = parseAxisValue(y2AxisMinRaw);
|
|
@@ -4078,13 +4120,15 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4078
4120
|
y2AxisMajorUnitFromSimpleXML,
|
|
4079
4121
|
y2AxisMajorTickInterval
|
|
4080
4122
|
);
|
|
4081
|
-
const
|
|
4082
|
-
const
|
|
4083
|
-
const
|
|
4084
|
-
const
|
|
4123
|
+
const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
|
|
4124
|
+
const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
|
|
4125
|
+
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
|
|
4126
|
+
const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
|
|
4127
|
+
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
|
|
4085
4128
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
4086
4129
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
4087
4130
|
const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
|
|
4131
|
+
const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
|
|
4088
4132
|
const legendLabels = parseArrayOption(legendLabelsStr);
|
|
4089
4133
|
const bgColor = backgroundColor || bgColorFromOptions;
|
|
4090
4134
|
const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
|
|
@@ -4172,7 +4216,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4172
4216
|
nullValueMode,
|
|
4173
4217
|
markerDisplay,
|
|
4174
4218
|
lineDashStyle,
|
|
4175
|
-
lineDashStylesByField
|
|
4219
|
+
lineDashStylesByField,
|
|
4220
|
+
stepPosition,
|
|
4221
|
+
stepPositionsByField
|
|
4176
4222
|
),
|
|
4177
4223
|
[
|
|
4178
4224
|
yFields,
|
|
@@ -4183,7 +4229,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4183
4229
|
nullValueMode,
|
|
4184
4230
|
markerDisplay,
|
|
4185
4231
|
lineDashStyle,
|
|
4186
|
-
lineDashStylesByField
|
|
4232
|
+
lineDashStylesByField,
|
|
4233
|
+
stepPosition,
|
|
4234
|
+
stepPositionsByField
|
|
4187
4235
|
]
|
|
4188
4236
|
);
|
|
4189
4237
|
const chartingEventAnnotations = (0, react_exports.useMemo)(
|
|
@@ -4198,9 +4246,14 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4198
4246
|
() => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
|
|
4199
4247
|
[xScaleConfig, yScaleConfig, y2ScaleConfig]
|
|
4200
4248
|
);
|
|
4249
|
+
const isSeriesCompare = legendMode === "seriesCompare";
|
|
4201
4250
|
const legend = (0, react_exports.useMemo)(
|
|
4202
|
-
() => getLegend({
|
|
4203
|
-
|
|
4251
|
+
() => getLegend({
|
|
4252
|
+
legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
|
|
4253
|
+
isSeriesCompare,
|
|
4254
|
+
legendTruncation
|
|
4255
|
+
}),
|
|
4256
|
+
[legendDisplay, isSeriesCompare, legendTruncation]
|
|
4204
4257
|
);
|
|
4205
4258
|
const handleChartClick = react_exports.useCallback(
|
|
4206
4259
|
(event) => {
|
|
@@ -4305,6 +4358,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4305
4358
|
seriesConfig: seriesOverrides,
|
|
4306
4359
|
legend,
|
|
4307
4360
|
legendLabels,
|
|
4361
|
+
legendTruncation,
|
|
4308
4362
|
isSeriesCompare: legendMode === "seriesCompare",
|
|
4309
4363
|
maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
|
|
4310
4364
|
scaleConfig,
|
|
@@ -4326,6 +4380,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4326
4380
|
showY2MinorGridLines,
|
|
4327
4381
|
showLineSmoothing,
|
|
4328
4382
|
dataValuesDisplay,
|
|
4383
|
+
showXMajorTicks,
|
|
4384
|
+
xAxisMajorTickSize: xAxisMajorTickSizeNum,
|
|
4329
4385
|
showYMajorTicks,
|
|
4330
4386
|
showY2MajorTicks,
|
|
4331
4387
|
yAxisMajorTickSize: yAxisMajorTickSizeNum,
|
|
@@ -4337,7 +4393,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4337
4393
|
yAxisMinorTickSize: yAxisMinorTickSizeNum,
|
|
4338
4394
|
y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
|
|
4339
4395
|
showYAxisWithZero,
|
|
4340
|
-
showY2AxisWithZero
|
|
4396
|
+
showY2AxisWithZero,
|
|
4397
|
+
showXAxisLine,
|
|
4398
|
+
showYAxisLine,
|
|
4399
|
+
showY2AxisLine,
|
|
4400
|
+
xAxisMaxLabelParts
|
|
4341
4401
|
}
|
|
4342
4402
|
));
|
|
4343
4403
|
}, [
|
|
@@ -4352,6 +4412,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4352
4412
|
seriesOverrides,
|
|
4353
4413
|
legend,
|
|
4354
4414
|
legendLabels,
|
|
4415
|
+
legendTruncation,
|
|
4355
4416
|
scaleConfig,
|
|
4356
4417
|
onClick,
|
|
4357
4418
|
handleChartClick,
|
|
@@ -4370,6 +4431,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4370
4431
|
showY2MinorGridLines,
|
|
4371
4432
|
showLineSmoothing,
|
|
4372
4433
|
dataValuesDisplay,
|
|
4434
|
+
showXMajorTicks,
|
|
4435
|
+
xAxisMajorTickSizeNum,
|
|
4373
4436
|
showYMajorTicks,
|
|
4374
4437
|
showY2MajorTicks,
|
|
4375
4438
|
yAxisMajorTickSizeNum,
|
|
@@ -4382,7 +4445,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
4382
4445
|
y2AxisMinorTickSizeNum,
|
|
4383
4446
|
showYAxisWithZero,
|
|
4384
4447
|
showY2AxisWithZero,
|
|
4385
|
-
|
|
4448
|
+
showXAxisLine,
|
|
4449
|
+
showYAxisLine,
|
|
4450
|
+
showY2AxisLine,
|
|
4451
|
+
legendMode,
|
|
4452
|
+
xAxisMaxLabelParts
|
|
4386
4453
|
]);
|
|
4387
4454
|
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
4388
4455
|
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
|
|
@@ -4730,6 +4797,8 @@ var transformOptions = (originalOptions) => {
|
|
|
4730
4797
|
"showYMinorGridLines",
|
|
4731
4798
|
"showY2MinorGridLines",
|
|
4732
4799
|
"showLineSmoothing",
|
|
4800
|
+
"xAxisMajorTickVisibility",
|
|
4801
|
+
"xAxisMajorTickSize",
|
|
4733
4802
|
"yAxisMajorTickVisibility",
|
|
4734
4803
|
"y2AxisMajorTickVisibility",
|
|
4735
4804
|
"yAxisMajorTickSize",
|
|
@@ -4738,7 +4807,11 @@ var transformOptions = (originalOptions) => {
|
|
|
4738
4807
|
"y2AxisMinorTickVisibility",
|
|
4739
4808
|
"yAxisMinorTickSize",
|
|
4740
4809
|
"y2AxisMinorTickSize",
|
|
4741
|
-
"
|
|
4810
|
+
"xAxisLineVisibility",
|
|
4811
|
+
"yAxisLineVisibility",
|
|
4812
|
+
"y2AxisLineVisibility",
|
|
4813
|
+
"legendMode",
|
|
4814
|
+
"legendTruncation"
|
|
4742
4815
|
// Note: yAxisMajorTickInterval, y2AxisMajorTickInterval, showYAxisWithZero, and showY2AxisWithZero
|
|
4743
4816
|
// are NOT canvas-specific. They're mapped to SimpleXML props in lineOptionsSCMapping
|
|
4744
4817
|
];
|
|
@@ -4786,6 +4859,8 @@ var convertToLineSCProperties = (originalOptions) => {
|
|
|
4786
4859
|
dataValuesDisplay: "showDataLabels",
|
|
4787
4860
|
nullValueDisplay: "nullValueMode",
|
|
4788
4861
|
lineDashStylesByField: "fieldDashStyles",
|
|
4862
|
+
stepPositionsByField: "fieldStepPositions",
|
|
4863
|
+
stepPosition: "stepPosition",
|
|
4789
4864
|
xAxisLabelRotation: "xAxisMajorLabelRotation",
|
|
4790
4865
|
xAxisLabelVisibility: "xAxisMajorLabelVisibility",
|
|
4791
4866
|
seriesColorsByField: "fieldColors",
|
|
@@ -4828,7 +4903,13 @@ var convertToLineSCProperties = (originalOptions) => {
|
|
|
4828
4903
|
off: "none"
|
|
4829
4904
|
}
|
|
4830
4905
|
};
|
|
4831
|
-
const stingValues = [
|
|
4906
|
+
const stingValues = [
|
|
4907
|
+
"fieldDashStyles",
|
|
4908
|
+
"fieldStepPositions",
|
|
4909
|
+
"seriesColors",
|
|
4910
|
+
"fieldColors",
|
|
4911
|
+
"legendLabels"
|
|
4912
|
+
];
|
|
4832
4913
|
return convertMarkerOptions(
|
|
4833
4914
|
(0, propUtils_exports.convertToSCProperties)(originalOptions, lineOptionsSCMapping, lineOptionValuesSCMapping, stingValues),
|
|
4834
4915
|
lineOptionValuesSCMapping
|