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