@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GaugeGraph.d.ts","sourceRoot":"","sources":["../../src/SingleValueRadial/PureSingleValueRadial/GaugeGraph.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"GaugeGraph.d.ts","sourceRoot":"","sources":["../../src/SingleValueRadial/PureSingleValueRadial/GaugeGraph.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,UAAU,eAAe;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACpE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,OAAO,CAAC;CAC5B;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAyRzC,CAAC;AAcF,eAAe,UAAU,CAAC"}
|
package/SingleValueRadial.js
CHANGED
|
@@ -911,8 +911,8 @@ var SingleValueBasic_default = SingleValueBasic;
|
|
|
911
911
|
|
|
912
912
|
// src/SingleValueRadial/PureSingleValueRadial/RadialGraph.jsx
|
|
913
913
|
var RadialGraph = ({
|
|
914
|
-
progress,
|
|
915
|
-
strokeWidth,
|
|
914
|
+
progress = 0,
|
|
915
|
+
strokeWidth = 12,
|
|
916
916
|
backgroundColor = colorConstants_exports.RADIAL_BACKGROUND_COLOR,
|
|
917
917
|
progressColor = colorConstants_exports.RADIAL_STROKE_COLOR,
|
|
918
918
|
width = 200,
|
|
@@ -961,10 +961,6 @@ RadialGraph.propTypes = {
|
|
|
961
961
|
width: prop_types_default.number,
|
|
962
962
|
height: prop_types_default.number
|
|
963
963
|
};
|
|
964
|
-
RadialGraph.defaultProps = {
|
|
965
|
-
progress: 0,
|
|
966
|
-
strokeWidth: 12
|
|
967
|
-
};
|
|
968
964
|
var RadialGraph_default = RadialGraph;
|
|
969
965
|
|
|
970
966
|
// src/SingleValueRadial/PureSingleValueRadial/utils/displayUtils.js
|
|
@@ -1121,7 +1117,7 @@ var computeTextWidth = (text, font) => {
|
|
|
1121
1117
|
var GaugeGraph = ({
|
|
1122
1118
|
width = 200,
|
|
1123
1119
|
height = 200,
|
|
1124
|
-
strokeWidth =
|
|
1120
|
+
strokeWidth = 12,
|
|
1125
1121
|
radialBackgroundColor = colorConstants_exports.RADIAL_BACKGROUND_COLOR,
|
|
1126
1122
|
fontColor,
|
|
1127
1123
|
formattedGaugeRanges,
|
|
@@ -1155,7 +1151,7 @@ var GaugeGraph = ({
|
|
|
1155
1151
|
const cy = semicircleRadius + strokeWidth / 2 + cyOffset;
|
|
1156
1152
|
let majorValue;
|
|
1157
1153
|
if (typeof propMajorValue === "string") {
|
|
1158
|
-
majorValue =
|
|
1154
|
+
majorValue = parseFloat(propMajorValue);
|
|
1159
1155
|
} else {
|
|
1160
1156
|
majorValue = propMajorValue;
|
|
1161
1157
|
}
|
|
@@ -1353,11 +1349,6 @@ GaugeGraph.propTypes = {
|
|
|
1353
1349
|
minValue: prop_types_exports.number,
|
|
1354
1350
|
showRadialGraph: prop_types_exports.bool
|
|
1355
1351
|
};
|
|
1356
|
-
GaugeGraph.defaultProps = {
|
|
1357
|
-
strokeWidth: 12,
|
|
1358
|
-
formattedGaugeRanges: [],
|
|
1359
|
-
majorValue: "N/A"
|
|
1360
|
-
};
|
|
1361
1352
|
var GaugeGraph_default = GaugeGraph;
|
|
1362
1353
|
|
|
1363
1354
|
// src/SingleValueRadial/PureSingleValueRadial/RadialLayout.jsx
|
|
@@ -1580,25 +1571,26 @@ var Container = styled_components_default.div`
|
|
|
1580
1571
|
var SingleValueRadial = (_a) => {
|
|
1581
1572
|
var props = __objRest(_a, []);
|
|
1582
1573
|
const {
|
|
1583
|
-
width,
|
|
1574
|
+
width = "100%",
|
|
1584
1575
|
height = 250,
|
|
1585
1576
|
style,
|
|
1586
1577
|
isGaugeOn,
|
|
1587
1578
|
gaugeRanges,
|
|
1588
1579
|
majorFontSize,
|
|
1589
|
-
majorValue,
|
|
1580
|
+
majorValue = "N/A",
|
|
1590
1581
|
majorValueDisplay,
|
|
1591
|
-
majorValueField,
|
|
1592
|
-
minValue,
|
|
1593
|
-
maxValue,
|
|
1582
|
+
majorValueField = "",
|
|
1583
|
+
minValue = 0,
|
|
1584
|
+
maxValue = 100,
|
|
1594
1585
|
trendValue,
|
|
1595
1586
|
trendFontSize,
|
|
1596
|
-
unitPosition,
|
|
1597
|
-
numberPrecision,
|
|
1598
|
-
shouldUseThousandSeparators,
|
|
1599
|
-
shouldAbbreviateTrendValue,
|
|
1600
|
-
shouldAbbreviateMajorValue,
|
|
1601
|
-
onValueClick
|
|
1587
|
+
unitPosition = "after",
|
|
1588
|
+
numberPrecision = 0,
|
|
1589
|
+
shouldUseThousandSeparators = true,
|
|
1590
|
+
shouldAbbreviateTrendValue = false,
|
|
1591
|
+
shouldAbbreviateMajorValue = false,
|
|
1592
|
+
onValueClick = () => {
|
|
1593
|
+
},
|
|
1602
1594
|
splitByLayout,
|
|
1603
1595
|
trellisKey = "",
|
|
1604
1596
|
trellisSplitBy = ""
|
|
@@ -1649,7 +1641,7 @@ var SingleValueRadial = (_a) => {
|
|
|
1649
1641
|
return null;
|
|
1650
1642
|
}
|
|
1651
1643
|
const { underLabel } = props;
|
|
1652
|
-
let { trendDisplay, unit } = props;
|
|
1644
|
+
let { trendDisplay = "absolute", unit } = props;
|
|
1653
1645
|
let { width: graphWidth, height: graphHeight } = getRadialGraphDimensions({
|
|
1654
1646
|
width: containerWidth,
|
|
1655
1647
|
height: containerHeight
|
|
@@ -1778,25 +1770,6 @@ SingleValueRadial.propTypes = {
|
|
|
1778
1770
|
gaugeComponent: prop_types_exports.element,
|
|
1779
1771
|
gaugeRanges: prop_types_exports.array
|
|
1780
1772
|
};
|
|
1781
|
-
SingleValueRadial.defaultProps = {
|
|
1782
|
-
width: "100%",
|
|
1783
|
-
height: 250,
|
|
1784
|
-
majorValue: "N/A",
|
|
1785
|
-
majorValueField: "",
|
|
1786
|
-
minValue: 0,
|
|
1787
|
-
maxValue: 100,
|
|
1788
|
-
trendDisplay: "absolute",
|
|
1789
|
-
trendIndicatorPosition: "standard",
|
|
1790
|
-
shouldAbbreviateTrendValue: false,
|
|
1791
|
-
shouldAbbreviateMajorValue: false,
|
|
1792
|
-
unitPosition: "after",
|
|
1793
|
-
numberPrecision: 0,
|
|
1794
|
-
shouldUseThousandSeparators: true,
|
|
1795
|
-
onValueClick: () => {
|
|
1796
|
-
},
|
|
1797
|
-
trellisKey: "",
|
|
1798
|
-
trellisSplitBy: ""
|
|
1799
|
-
};
|
|
1800
1773
|
var SingleValueRadial_default = (0, styled_components_exports.withTheme)(SingleValueRadial);
|
|
1801
1774
|
|
|
1802
1775
|
// esm-externals:@splunk/themes/getSettingsFromThemedProps
|
|
@@ -2143,7 +2116,7 @@ var Cover = styled_components_default.div`
|
|
|
2143
2116
|
bottom: 0;
|
|
2144
2117
|
`;
|
|
2145
2118
|
var Blocker = styled_components_default.div.attrs({
|
|
2146
|
-
"data-splunk-visualization-version": "28.
|
|
2119
|
+
"data-splunk-visualization-version": "28.5.0 - b192418b7"
|
|
2147
2120
|
})`
|
|
2148
2121
|
position: relative;
|
|
2149
2122
|
width: 100%;
|
|
@@ -2224,7 +2197,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
2224
2197
|
FixSizeItem,
|
|
2225
2198
|
{
|
|
2226
2199
|
"data-test": "fix-size-item",
|
|
2227
|
-
"data-splunk-visualization-version": "28.
|
|
2200
|
+
"data-splunk-visualization-version": "28.5.0 - b192418b7",
|
|
2228
2201
|
width,
|
|
2229
2202
|
height,
|
|
2230
2203
|
backgroundColor
|
|
@@ -2841,16 +2814,14 @@ var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
|
|
|
2841
2814
|
splitDataSources[val] = (0, lodash_exports.cloneDeep)(
|
|
2842
2815
|
(0, lodash_exports.omit)(dataSource, ["primary.data.fields", "primary.data.columns"])
|
|
2843
2816
|
);
|
|
2844
|
-
splitDataSources[val].primary.data.fields = [
|
|
2845
|
-
{ name: fields[0].name },
|
|
2846
|
-
...dataSourceKeys.map((k) => ({
|
|
2847
|
-
name: k
|
|
2848
|
-
}))
|
|
2849
|
-
];
|
|
2817
|
+
splitDataSources[val].primary.data.fields = [{ name: fields[0].name }];
|
|
2850
2818
|
splitDataSources[val].primary.data.columns = [[...columns[0]]];
|
|
2851
2819
|
dataSourceKeys.forEach((dsKey) => {
|
|
2852
2820
|
fields.forEach((field, idx) => {
|
|
2853
2821
|
if (field.data_source === dsKey && (field.splitby_value === val || field.name === val)) {
|
|
2822
|
+
splitDataSources[val].primary.data.fields.push({
|
|
2823
|
+
name: dsKey
|
|
2824
|
+
});
|
|
2854
2825
|
splitDataSources[val].primary.data.columns.push([...columns[idx]]);
|
|
2855
2826
|
}
|
|
2856
2827
|
});
|
|
@@ -3136,25 +3107,27 @@ var parseAxisValue = (val) => {
|
|
|
3136
3107
|
const num = typeof val === "number" ? val : Number.parseFloat(val);
|
|
3137
3108
|
return Number.isNaN(num) ? void 0 : num;
|
|
3138
3109
|
};
|
|
3139
|
-
var
|
|
3140
|
-
|
|
3110
|
+
var parseXAxisLineVisibility = (visibility) => {
|
|
3111
|
+
if (visibility === "hide") return false;
|
|
3112
|
+
if (visibility === "show") return true;
|
|
3113
|
+
return void 0;
|
|
3114
|
+
};
|
|
3141
3115
|
var getLegend = (props) => {
|
|
3142
3116
|
const legendPlacement = props == null ? void 0 : props.legendDisplay;
|
|
3143
|
-
const { isSeriesCompare } = props;
|
|
3117
|
+
const { isSeriesCompare, legendTruncation } = props;
|
|
3144
3118
|
const commonLegendProps = {
|
|
3145
3119
|
center: true,
|
|
3146
3120
|
fontSize: 12,
|
|
3147
3121
|
largerTiles: true,
|
|
3148
|
-
hideSeriesValue: !isSeriesCompare
|
|
3122
|
+
hideSeriesValue: !isSeriesCompare,
|
|
3149
3123
|
// Show values if in seriesCompare mode
|
|
3124
|
+
legendTruncation
|
|
3150
3125
|
};
|
|
3151
3126
|
switch (legendPlacement) {
|
|
3152
3127
|
case "off":
|
|
3153
3128
|
return false;
|
|
3154
3129
|
case "left":
|
|
3155
|
-
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
|
|
3156
|
-
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
3157
|
-
}, commonLegendProps));
|
|
3130
|
+
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
3158
3131
|
case "bottom":
|
|
3159
3132
|
return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
|
|
3160
3133
|
wrap: true
|
|
@@ -3164,9 +3137,7 @@ var getLegend = (props) => {
|
|
|
3164
3137
|
wrap: true
|
|
3165
3138
|
}, commonLegendProps));
|
|
3166
3139
|
default:
|
|
3167
|
-
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
|
|
3168
|
-
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
3169
|
-
}, commonLegendProps));
|
|
3140
|
+
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
3170
3141
|
}
|
|
3171
3142
|
};
|
|
3172
3143
|
var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
|
|
@@ -3227,9 +3198,7 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
|
|
|
3227
3198
|
if (yAxisAbbreviation !== "none") {
|
|
3228
3199
|
yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
|
|
3229
3200
|
}
|
|
3230
|
-
if (yAxisAbbreviation
|
|
3231
|
-
yConfig.y.width = 55;
|
|
3232
|
-
} else {
|
|
3201
|
+
if (yAxisAbbreviation !== "none") {
|
|
3233
3202
|
yConfig.y.width = label && label.length > 0 ? 30 : 10;
|
|
3234
3203
|
}
|
|
3235
3204
|
if (yAxisLabelVisibility === "hide") {
|
|
@@ -3252,6 +3221,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
3252
3221
|
y2Config.y2.type = scaleType;
|
|
3253
3222
|
if (axisAbbreviation !== "none") {
|
|
3254
3223
|
y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
|
|
3224
|
+
y2Config.y2.width = label && label.length > 0 ? 50 : 10;
|
|
3255
3225
|
} else if (roundAxisLabelsToInteger) {
|
|
3256
3226
|
y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
|
|
3257
3227
|
}
|
|
@@ -3267,7 +3237,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
3267
3237
|
}
|
|
3268
3238
|
return y2Config;
|
|
3269
3239
|
};
|
|
3270
|
-
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField) => {
|
|
3240
|
+
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
|
|
3271
3241
|
const seriesConfig = {};
|
|
3272
3242
|
let spanGaps;
|
|
3273
3243
|
let replaceNullsWithZero;
|
|
@@ -3294,6 +3264,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
3294
3264
|
);
|
|
3295
3265
|
if (shouldAssignToY2) {
|
|
3296
3266
|
seriesConfig[field].overrides.scale = "y2";
|
|
3267
|
+
} else {
|
|
3268
|
+
seriesConfig[field].overrides.scale = "y";
|
|
3297
3269
|
}
|
|
3298
3270
|
}
|
|
3299
3271
|
if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
|
|
@@ -3306,6 +3278,11 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
3306
3278
|
if (fieldDashStyle) {
|
|
3307
3279
|
seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
3308
3280
|
}
|
|
3281
|
+
const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
|
|
3282
|
+
const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
|
|
3283
|
+
if (fieldStepPosition && fieldStepPosition !== "off") {
|
|
3284
|
+
seriesConfig[field].stepPosition = fieldStepPosition;
|
|
3285
|
+
}
|
|
3309
3286
|
if (replaceNullsWithZero !== void 0) {
|
|
3310
3287
|
seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
|
|
3311
3288
|
}
|
|
@@ -3488,6 +3465,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3488
3465
|
backgroundColor,
|
|
3489
3466
|
defaultFontColor,
|
|
3490
3467
|
additionalTooltipValues,
|
|
3468
|
+
xAxisLineVisibility: xAxisLineVisibility,
|
|
3469
|
+
yAxisLineVisibility,
|
|
3470
|
+
y2AxisLineVisibility,
|
|
3491
3471
|
showYAxisWithZero: showYAxisWithZeroFromProps,
|
|
3492
3472
|
showY2AxisWithZero: showY2AxisWithZeroFromProps
|
|
3493
3473
|
} = _a, otherOptions = __objRest(_a, [
|
|
@@ -3511,6 +3491,10 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3511
3491
|
"backgroundColor",
|
|
3512
3492
|
"defaultFontColor",
|
|
3513
3493
|
"additionalTooltipValues",
|
|
3494
|
+
// Extract axis line visibility options from props
|
|
3495
|
+
"xAxisLineVisibility",
|
|
3496
|
+
"yAxisLineVisibility",
|
|
3497
|
+
"y2AxisLineVisibility",
|
|
3514
3498
|
// Extract showYAxisWithZero directly from props for accelerated render mode
|
|
3515
3499
|
"showYAxisWithZero",
|
|
3516
3500
|
"showY2AxisWithZero"
|
|
@@ -3523,6 +3507,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3523
3507
|
fieldColors,
|
|
3524
3508
|
legendLabels: legendLabelsStr,
|
|
3525
3509
|
legendMode,
|
|
3510
|
+
legendTruncation,
|
|
3526
3511
|
"axisTitleX.text": xAxisTitleText,
|
|
3527
3512
|
"axisTitleY.text": yAxisTitleText,
|
|
3528
3513
|
"axisTitleY2.text": y2AxisTitleText,
|
|
@@ -3531,6 +3516,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3531
3516
|
"axisTitleY2.visibility": y2AxisTitleVisibility,
|
|
3532
3517
|
"axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
|
|
3533
3518
|
"axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
|
|
3519
|
+
"axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
|
|
3534
3520
|
"axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
|
|
3535
3521
|
"axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
|
|
3536
3522
|
"axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
|
|
@@ -3548,6 +3534,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3548
3534
|
lineWidth,
|
|
3549
3535
|
lineDashStyle,
|
|
3550
3536
|
fieldDashStyles: lineDashStylesByFieldStr,
|
|
3537
|
+
stepPosition,
|
|
3538
|
+
fieldStepPositions: stepPositionsByFieldStr,
|
|
3551
3539
|
yAxisMin: yAxisMinRaw,
|
|
3552
3540
|
yAxisMax: yAxisMaxRaw,
|
|
3553
3541
|
y2AxisMin: y2AxisMinRaw,
|
|
@@ -3558,6 +3546,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3558
3546
|
showYMinorGridLines,
|
|
3559
3547
|
showY2MinorGridLines,
|
|
3560
3548
|
showLineSmoothing,
|
|
3549
|
+
xAxisMajorTickVisibility,
|
|
3550
|
+
xAxisMajorTickSize,
|
|
3561
3551
|
yAxisMajorTickVisibility,
|
|
3562
3552
|
y2AxisMajorTickVisibility,
|
|
3563
3553
|
yAxisMajorTickSize,
|
|
@@ -3574,10 +3564,14 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3574
3564
|
const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
|
|
3575
3565
|
const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
|
|
3576
3566
|
const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
|
|
3567
|
+
const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
|
|
3577
3568
|
const showYMajorTicks = yAxisMajorTickVisibility === "show";
|
|
3578
3569
|
const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
|
|
3579
3570
|
const showYMinorTicks = yAxisMinorTickVisibility === "show";
|
|
3580
3571
|
const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
|
|
3572
|
+
const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
|
|
3573
|
+
const showYAxisLine = yAxisLineVisibility === "show";
|
|
3574
|
+
const showY2AxisLine = y2AxisLineVisibility === "show";
|
|
3581
3575
|
const yAxisMin = parseAxisValue(yAxisMinRaw);
|
|
3582
3576
|
const yAxisMax = parseAxisValue(yAxisMaxRaw);
|
|
3583
3577
|
const y2AxisMin = parseAxisValue(y2AxisMinRaw);
|
|
@@ -3592,13 +3586,15 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3592
3586
|
y2AxisMajorUnitFromSimpleXML,
|
|
3593
3587
|
y2AxisMajorTickInterval
|
|
3594
3588
|
);
|
|
3595
|
-
const
|
|
3596
|
-
const
|
|
3597
|
-
const
|
|
3598
|
-
const
|
|
3589
|
+
const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
|
|
3590
|
+
const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
|
|
3591
|
+
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
|
|
3592
|
+
const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
|
|
3593
|
+
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
|
|
3599
3594
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
3600
3595
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
3601
3596
|
const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
|
|
3597
|
+
const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
|
|
3602
3598
|
const legendLabels = parseArrayOption(legendLabelsStr);
|
|
3603
3599
|
const bgColor = backgroundColor || bgColorFromOptions;
|
|
3604
3600
|
const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
|
|
@@ -3686,7 +3682,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3686
3682
|
nullValueMode,
|
|
3687
3683
|
markerDisplay,
|
|
3688
3684
|
lineDashStyle,
|
|
3689
|
-
lineDashStylesByField
|
|
3685
|
+
lineDashStylesByField,
|
|
3686
|
+
stepPosition,
|
|
3687
|
+
stepPositionsByField
|
|
3690
3688
|
),
|
|
3691
3689
|
[
|
|
3692
3690
|
yFields,
|
|
@@ -3697,7 +3695,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3697
3695
|
nullValueMode,
|
|
3698
3696
|
markerDisplay,
|
|
3699
3697
|
lineDashStyle,
|
|
3700
|
-
lineDashStylesByField
|
|
3698
|
+
lineDashStylesByField,
|
|
3699
|
+
stepPosition,
|
|
3700
|
+
stepPositionsByField
|
|
3701
3701
|
]
|
|
3702
3702
|
);
|
|
3703
3703
|
const chartingEventAnnotations = (0, react_exports.useMemo)(
|
|
@@ -3712,9 +3712,14 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3712
3712
|
() => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
|
|
3713
3713
|
[xScaleConfig, yScaleConfig, y2ScaleConfig]
|
|
3714
3714
|
);
|
|
3715
|
+
const isSeriesCompare = legendMode === "seriesCompare";
|
|
3715
3716
|
const legend = (0, react_exports.useMemo)(
|
|
3716
|
-
() => getLegend({
|
|
3717
|
-
|
|
3717
|
+
() => getLegend({
|
|
3718
|
+
legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
|
|
3719
|
+
isSeriesCompare,
|
|
3720
|
+
legendTruncation
|
|
3721
|
+
}),
|
|
3722
|
+
[legendDisplay, isSeriesCompare, legendTruncation]
|
|
3718
3723
|
);
|
|
3719
3724
|
const handleChartClick = react_exports.useCallback(
|
|
3720
3725
|
(event) => {
|
|
@@ -3819,6 +3824,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3819
3824
|
seriesConfig: seriesOverrides,
|
|
3820
3825
|
legend,
|
|
3821
3826
|
legendLabels,
|
|
3827
|
+
legendTruncation,
|
|
3822
3828
|
isSeriesCompare: legendMode === "seriesCompare",
|
|
3823
3829
|
maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
|
|
3824
3830
|
scaleConfig,
|
|
@@ -3840,6 +3846,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3840
3846
|
showY2MinorGridLines,
|
|
3841
3847
|
showLineSmoothing,
|
|
3842
3848
|
dataValuesDisplay,
|
|
3849
|
+
showXMajorTicks,
|
|
3850
|
+
xAxisMajorTickSize: xAxisMajorTickSizeNum,
|
|
3843
3851
|
showYMajorTicks,
|
|
3844
3852
|
showY2MajorTicks,
|
|
3845
3853
|
yAxisMajorTickSize: yAxisMajorTickSizeNum,
|
|
@@ -3851,7 +3859,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3851
3859
|
yAxisMinorTickSize: yAxisMinorTickSizeNum,
|
|
3852
3860
|
y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
|
|
3853
3861
|
showYAxisWithZero,
|
|
3854
|
-
showY2AxisWithZero
|
|
3862
|
+
showY2AxisWithZero,
|
|
3863
|
+
showXAxisLine,
|
|
3864
|
+
showYAxisLine,
|
|
3865
|
+
showY2AxisLine,
|
|
3866
|
+
xAxisMaxLabelParts
|
|
3855
3867
|
}
|
|
3856
3868
|
));
|
|
3857
3869
|
}, [
|
|
@@ -3866,6 +3878,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3866
3878
|
seriesOverrides,
|
|
3867
3879
|
legend,
|
|
3868
3880
|
legendLabels,
|
|
3881
|
+
legendTruncation,
|
|
3869
3882
|
scaleConfig,
|
|
3870
3883
|
onClick,
|
|
3871
3884
|
handleChartClick,
|
|
@@ -3884,6 +3897,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3884
3897
|
showY2MinorGridLines,
|
|
3885
3898
|
showLineSmoothing,
|
|
3886
3899
|
dataValuesDisplay,
|
|
3900
|
+
showXMajorTicks,
|
|
3901
|
+
xAxisMajorTickSizeNum,
|
|
3887
3902
|
showYMajorTicks,
|
|
3888
3903
|
showY2MajorTicks,
|
|
3889
3904
|
yAxisMajorTickSizeNum,
|
|
@@ -3896,7 +3911,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3896
3911
|
y2AxisMinorTickSizeNum,
|
|
3897
3912
|
showYAxisWithZero,
|
|
3898
3913
|
showY2AxisWithZero,
|
|
3899
|
-
|
|
3914
|
+
showXAxisLine,
|
|
3915
|
+
showYAxisLine,
|
|
3916
|
+
showY2AxisLine,
|
|
3917
|
+
legendMode,
|
|
3918
|
+
xAxisMaxLabelParts
|
|
3900
3919
|
]);
|
|
3901
3920
|
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
3902
3921
|
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
|