@splunk/visualizations 28.3.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/Area.d.ts.map +1 -1
- package/Area.config.js +28 -8
- package/Area.config.js.map +2 -2
- package/Area.js +583 -120
- package/Area.js.map +3 -3
- package/Bar/Bar.d.ts.map +1 -1
- package/Bar.config.js +28 -8
- package/Bar.config.js.map +2 -2
- package/Bar.js +593 -120
- package/Bar.js.map +3 -3
- package/Bubble.config.js +4 -5
- package/Bubble.config.js.map +2 -2
- package/Bubble.js +554 -98
- package/Bubble.js.map +3 -3
- package/CHANGELOG.external.md +165 -0
- package/ChoroplethSvg/ChoroplethSvg.d.ts +4 -3
- package/ChoroplethSvg/ChoroplethSvg.d.ts.map +1 -1
- package/ChoroplethSvg.config.js +1 -3
- package/ChoroplethSvg.config.js.map +2 -2
- package/ChoroplethSvg.js +595 -111
- package/ChoroplethSvg.js.map +4 -4
- package/Column/Column.d.ts.map +1 -1
- package/Column.config.js +28 -8
- package/Column.config.js.map +2 -2
- package/Column.js +583 -120
- package/Column.js.map +3 -3
- package/Ellipse/config.d.ts.map +1 -1
- package/Ellipse.config.js +14 -5
- package/Ellipse.config.js.map +4 -4
- package/Ellipse.js +640 -159
- package/Ellipse.js.map +4 -4
- package/Events/PureEvents/PureEvents.d.ts.map +1 -1
- package/Events.js +668 -157
- package/Events.js.map +4 -4
- package/FillerGauge/FillerGauge.d.ts.map +1 -1
- package/FillerGauge/PureFillerGauge/FillerGauge.d.ts.map +1 -1
- package/FillerGauge.js +751 -169
- package/FillerGauge.js.map +4 -4
- package/Image/Image.d.ts.map +1 -1
- package/Image.js +620 -116
- package/Image.js.map +4 -4
- package/Line/Line.d.ts.map +1 -1
- package/Line/lineUtils.d.ts.map +1 -1
- package/Line/mockdata/LineData.d.ts +154 -0
- package/Line/mockdata/LineData.d.ts.map +1 -1
- package/Line.config.js +28 -8
- package/Line.config.js.map +2 -2
- package/Line.js +704 -122
- package/Line.js.map +3 -3
- package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts +5 -0
- package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/components/Graph.d.ts +9 -1
- package/LinkGraph/PureLinkGraph/components/Graph.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/components/GraphStyles.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/components/Node.d.ts +1 -0
- package/LinkGraph/PureLinkGraph/components/Node.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/components/Nodes.d.ts +1 -0
- package/LinkGraph/PureLinkGraph/components/Nodes.d.ts.map +1 -1
- package/LinkGraph/PureLinkGraph/measurementUtils.d.ts +16 -0
- package/LinkGraph/PureLinkGraph/measurementUtils.d.ts.map +1 -0
- package/LinkGraph/PureLinkGraph/utils/iconLoader.d.ts.map +1 -1
- package/LinkGraph/config.d.ts.map +1 -1
- package/LinkGraph.config.js +15 -1
- package/LinkGraph.config.js.map +2 -2
- package/LinkGraph.js +1411 -662
- package/LinkGraph.js.map +4 -4
- package/Map/Map.d.ts +2 -2
- package/Map/Map.d.ts.map +1 -1
- package/Map/PureMap/BubbleLayer.d.ts +5 -0
- package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
- package/Map/PureMap/ClusterLayer.d.ts.map +1 -1
- package/Map/PureMap/LocalChoroplethLayer.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/PureMap/PureMapContainer.d.ts.map +1 -1
- package/Map/PureMap/Tooltip.d.ts.map +1 -1
- package/Map/config.d.ts.map +1 -1
- package/Map.config.js +0 -1
- package/Map.config.js.map +2 -2
- package/Map.js +831 -247
- package/Map.js.map +4 -4
- package/Markdown/Markdown.d.ts.map +1 -1
- package/Markdown/config.d.ts.map +1 -1
- package/Markdown.config.js +14 -5
- package/Markdown.config.js.map +4 -4
- package/Markdown.js +619 -109
- package/Markdown.js.map +4 -4
- package/MarkerGauge/MarkerGauge.d.ts +5 -1
- package/MarkerGauge/MarkerGauge.d.ts.map +1 -1
- package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts +4 -0
- package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts.map +1 -1
- package/MarkerGauge/config.d.ts.map +1 -1
- package/MarkerGauge.config.js +121 -3
- package/MarkerGauge.config.js.map +3 -3
- package/MarkerGauge.js +1535 -172
- package/MarkerGauge.js.map +4 -4
- package/NetworkGraph/NetworkGraph.d.ts +22 -0
- package/NetworkGraph/NetworkGraph.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts +60 -0
- package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/components/Link.d.ts +19 -0
- package/NetworkGraph/PureNetworkGraph/components/Link.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts +29 -0
- package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/components/Node.d.ts +27 -0
- package/NetworkGraph/PureNetworkGraph/components/Node.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/components/Tooltip.d.ts +12 -0
- package/NetworkGraph/PureNetworkGraph/components/Tooltip.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts +13 -0
- package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/mockdata/data.d.ts +140 -0
- package/NetworkGraph/PureNetworkGraph/mockdata/data.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/mockdata/datasource.d.ts +89 -0
- package/NetworkGraph/PureNetworkGraph/mockdata/datasource.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts +78 -0
- package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/utils/forceLayout.d.ts +47 -0
- package/NetworkGraph/PureNetworkGraph/utils/forceLayout.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/utils/iconLoader.d.ts +78 -0
- package/NetworkGraph/PureNetworkGraph/utils/iconLoader.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphShared.d.ts +111 -0
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphShared.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts +122 -0
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -0
- package/NetworkGraph/config.d.ts +4 -0
- package/NetworkGraph/config.d.ts.map +1 -0
- package/NetworkGraph/index.d.ts +3 -0
- package/NetworkGraph/index.d.ts.map +1 -0
- package/NetworkGraph.config.js +938 -0
- package/NetworkGraph.config.js.map +7 -0
- package/NetworkGraph.js +7053 -0
- package/NetworkGraph.js.map +7 -0
- 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 +664 -228
- 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 +610 -118
- package/Pie.js.map +3 -3
- package/Punchcard.js +579 -92
- package/Punchcard.js.map +4 -4
- package/Rectangle/config.d.ts.map +1 -1
- package/Rectangle.config.js +14 -5
- package/Rectangle.config.js.map +4 -4
- package/Rectangle.js +611 -130
- 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 +814 -429
- package/Sankey.js.map +4 -4
- package/Scatter/Scatter.d.ts.map +1 -1
- package/Scatter.config.js +168 -148
- package/Scatter.config.js.map +4 -4
- package/Scatter.js +733 -260
- package/Scatter.js.map +4 -4
- package/SingleValue/SingleValue.d.ts.map +1 -1
- package/SingleValue/config.d.ts.map +1 -1
- package/SingleValue.config.js +15 -2
- package/SingleValue.config.js.map +2 -2
- package/SingleValue.js +733 -229
- package/SingleValue.js.map +3 -3
- package/SingleValueBasic.js.map +1 -1
- package/SingleValueIcon/SingleValueIcon.d.ts.map +1 -1
- package/SingleValueIcon/config.d.ts.map +1 -1
- package/SingleValueIcon.config.js +14 -6
- package/SingleValueIcon.config.js.map +4 -4
- package/SingleValueIcon.js +612 -182
- package/SingleValueIcon.js.map +4 -4
- package/SingleValueRadial/PureSingleValueRadial/GaugeGraph.d.ts.map +1 -1
- package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts +0 -8
- package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts.map +1 -1
- package/SingleValueRadial/SingleValueRadial.d.ts.map +1 -1
- package/SingleValueRadial.config.js +0 -1
- package/SingleValueRadial.config.js.map +2 -2
- package/SingleValueRadial.js +594 -182
- package/SingleValueRadial.js.map +4 -4
- package/SparkLine.js +46 -8
- package/SparkLine.js.map +2 -2
- package/Table/PureTable.d.ts +10 -0
- package/Table/PureTable.d.ts.map +1 -1
- package/Table/Table.d.ts.map +1 -1
- package/Table/cells/SparklineCell.d.ts.map +1 -1
- package/Table/config.d.ts.map +1 -1
- package/Table/hooks.d.ts +6 -0
- package/Table/hooks.d.ts.map +1 -1
- package/Table.config.js +1 -1
- package/Table.config.js.map +2 -2
- package/Table.js +836 -253
- package/Table.js.map +4 -4
- package/Timeline/PureTimeline/PureTimeline.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/CursorPlugin.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineLegend.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/config.d.ts.map +1 -1
- package/Timeline.config.js +31 -12
- package/Timeline.config.js.map +4 -4
- package/Timeline.js +785 -247
- package/Timeline.js.map +4 -4
- package/common/Charting.d.ts +5 -0
- package/common/Charting.d.ts.map +1 -1
- package/common/Charting.js +12 -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/ThemesDoc.js +0 -1
- package/common/ThemesDoc.js.map +2 -2
- package/common/TimeSeriesChartWrapper.d.ts +24 -11
- package/common/TimeSeriesChartWrapper.d.ts.map +1 -1
- package/common/TimeSeriesChartWrapper.js +617 -91
- package/common/TimeSeriesChartWrapper.js.map +4 -4
- package/common/chartingUtils.d.ts +52 -6
- package/common/chartingUtils.d.ts.map +1 -1
- package/common/chartingUtils.js +116 -17
- package/common/chartingUtils.js.map +3 -3
- 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/hocs/withTrellis.d.ts.map +1 -1
- package/common/interfaces/DashboardVizProps.d.ts +0 -3
- package/common/interfaces/DashboardVizProps.d.ts.map +1 -1
- package/common/interfaces/DataSource.d.ts +1 -1
- package/common/interfaces/DataSource.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/shapeUtils.js +5 -20
- package/common/shapeUtils.js.map +2 -2
- package/common/utils/dataUtils.d.ts.map +1 -1
- package/common/utils/dataUtils.js +5 -4
- package/common/utils/dataUtils.js.map +2 -2
- package/common/utils/mapUtils.js +16 -9
- package/common/utils/mapUtils.js.map +2 -2
- package/common/utils/singleValueUtils.js +17 -18
- package/common/utils/singleValueUtils.js.map +2 -2
- package/common/utils/textUtils.d.ts +20 -0
- package/common/utils/textUtils.d.ts.map +1 -0
- package/common/utils/textUtils.js +76 -0
- package/common/utils/textUtils.js.map +7 -0
- package/common/utils/trellisUtils.d.ts.map +1 -1
- package/common/utils/trellisUtils.js +16 -20
- package/common/utils/trellisUtils.js.map +2 -2
- package/common/withDashboardViz.d.ts.map +1 -1
- package/common/withDashboardViz.js +600 -92
- package/common/withDashboardViz.js.map +4 -4
- package/package.json +46 -39
- package/common/utils/styleUtils.d.ts +0 -2
- package/common/utils/styleUtils.d.ts.map +0 -1
- package/common/utils/styleUtils.js +0 -30
- package/common/utils/styleUtils.js.map +0 -7
package/Punchcard.js
CHANGED
|
@@ -754,7 +754,7 @@ var Cover = styled_components_default.div`
|
|
|
754
754
|
bottom: 0;
|
|
755
755
|
`;
|
|
756
756
|
var Blocker = styled_components_default.div.attrs({
|
|
757
|
-
"data-splunk-visualization-version": "28.
|
|
757
|
+
"data-splunk-visualization-version": "28.5.0 - b192418b7"
|
|
758
758
|
})`
|
|
759
759
|
position: relative;
|
|
760
760
|
width: 100%;
|
|
@@ -844,7 +844,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
844
844
|
FixSizeItem,
|
|
845
845
|
{
|
|
846
846
|
"data-test": "fix-size-item",
|
|
847
|
-
"data-splunk-visualization-version": "28.
|
|
847
|
+
"data-splunk-visualization-version": "28.5.0 - b192418b7",
|
|
848
848
|
width,
|
|
849
849
|
height,
|
|
850
850
|
backgroundColor
|
|
@@ -940,6 +940,7 @@ __reExport(numberUtils_exports, require("@splunk/visualizations-shared/numberUti
|
|
|
940
940
|
var numberUtils_default = "default" in defaultImport27 ? defaultImport27.default : defaultImport27;
|
|
941
941
|
|
|
942
942
|
// src/common/utils/dataUtils.ts
|
|
943
|
+
var getFieldName = (field) => typeof field === "string" ? field : field.name;
|
|
943
944
|
var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices) => {
|
|
944
945
|
const dataLength = data.length;
|
|
945
946
|
const downsampledIndices = [];
|
|
@@ -1056,9 +1057,9 @@ var tryToCoerceAllDisplayedFields = (ds, xField, yFields, fieldTypes, options) =
|
|
|
1056
1057
|
let xColumn = [];
|
|
1057
1058
|
const yColumns = [];
|
|
1058
1059
|
const canDownsample = !ds.data.fields.some((field, index) => {
|
|
1059
|
-
var _a
|
|
1060
|
-
const fieldName = (
|
|
1061
|
-
const fieldType = (
|
|
1060
|
+
var _a;
|
|
1061
|
+
const fieldName = getFieldName(field);
|
|
1062
|
+
const fieldType = (_a = fieldTypes[index]) != null ? _a : "unknown";
|
|
1062
1063
|
const column = ds.data.columns[index];
|
|
1063
1064
|
let hasDisplayedColumnThatCantBeDownsampled = false;
|
|
1064
1065
|
if (fieldName === xField) {
|
|
@@ -1423,6 +1424,16 @@ var mapToValues = (optionValuesSCMapping) => (options) => {
|
|
|
1423
1424
|
});
|
|
1424
1425
|
return convertedOptions;
|
|
1425
1426
|
};
|
|
1427
|
+
var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
|
|
1428
|
+
const rangeSelectEventHandler = eventHandlers.find(
|
|
1429
|
+
(eventHandler) => {
|
|
1430
|
+
var _a;
|
|
1431
|
+
return (_a = eventHandler.options.events) == null ? void 0 : _a.includes("range.select");
|
|
1432
|
+
}
|
|
1433
|
+
);
|
|
1434
|
+
const xAxisIsTime = xField === "_time";
|
|
1435
|
+
return !!rangeSelectEventHandler && xAxisIsTime;
|
|
1436
|
+
};
|
|
1426
1437
|
var canvasSupportedTimeSeriesCharts = ["splunk.line"];
|
|
1427
1438
|
var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
|
|
1428
1439
|
return canvasSupportedTimeSeriesCharts.indexOf(vizConfigKey) > -1;
|
|
@@ -1443,17 +1454,34 @@ var filterChartDataFromInternalFields = (chartData) => {
|
|
|
1443
1454
|
var convert2DArrayToNumbers = (arr) => {
|
|
1444
1455
|
return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
|
|
1445
1456
|
};
|
|
1446
|
-
var
|
|
1447
|
-
|
|
1457
|
+
var parseAxisValue = (val) => {
|
|
1458
|
+
if (val === void 0 || val === null || val === "auto" || val === "") {
|
|
1459
|
+
return void 0;
|
|
1460
|
+
}
|
|
1461
|
+
const num = typeof val === "number" ? val : Number.parseFloat(val);
|
|
1462
|
+
return Number.isNaN(num) ? void 0 : num;
|
|
1463
|
+
};
|
|
1464
|
+
var parseXAxisLineVisibility = (visibility) => {
|
|
1465
|
+
if (visibility === "hide") return false;
|
|
1466
|
+
if (visibility === "show") return true;
|
|
1467
|
+
return void 0;
|
|
1468
|
+
};
|
|
1448
1469
|
var getLegend = (props) => {
|
|
1449
1470
|
const legendPlacement = props == null ? void 0 : props.legendDisplay;
|
|
1471
|
+
const { isSeriesCompare, legendTruncation } = props;
|
|
1472
|
+
const commonLegendProps = {
|
|
1473
|
+
center: true,
|
|
1474
|
+
fontSize: 12,
|
|
1475
|
+
largerTiles: true,
|
|
1476
|
+
hideSeriesValue: !isSeriesCompare,
|
|
1477
|
+
// Show values if in seriesCompare mode
|
|
1478
|
+
legendTruncation
|
|
1479
|
+
};
|
|
1450
1480
|
switch (legendPlacement) {
|
|
1451
1481
|
case "off":
|
|
1452
1482
|
return false;
|
|
1453
1483
|
case "left":
|
|
1454
|
-
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
|
|
1455
|
-
width: SideLegendWidth
|
|
1456
|
-
}, commonLegendProps));
|
|
1484
|
+
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
1457
1485
|
case "bottom":
|
|
1458
1486
|
return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
|
|
1459
1487
|
wrap: true
|
|
@@ -1463,9 +1491,7 @@ var getLegend = (props) => {
|
|
|
1463
1491
|
wrap: true
|
|
1464
1492
|
}, commonLegendProps));
|
|
1465
1493
|
default:
|
|
1466
|
-
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
|
|
1467
|
-
width: SideLegendWidth
|
|
1468
|
-
}, commonLegendProps));
|
|
1494
|
+
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
1469
1495
|
}
|
|
1470
1496
|
};
|
|
1471
1497
|
var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
|
|
@@ -1500,22 +1526,25 @@ var ellipsisAxisTitle = (axisTitle, containerSpacing, fontSize = 12) => {
|
|
|
1500
1526
|
const end = axisTitle.slice(-halfChars);
|
|
1501
1527
|
return `${start}...${end}`;
|
|
1502
1528
|
};
|
|
1503
|
-
var
|
|
1529
|
+
var getFieldName2 = (field) => {
|
|
1504
1530
|
const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
|
|
1505
1531
|
return fieldName;
|
|
1506
1532
|
};
|
|
1507
1533
|
var getFieldNames = (fields) => {
|
|
1508
|
-
return fields.map((field) =>
|
|
1534
|
+
return fields.map((field) => getFieldName2(field));
|
|
1509
1535
|
};
|
|
1510
|
-
var getXScaleConfig = (label, xAxisLabelVisibility) => {
|
|
1536
|
+
var getXScaleConfig = (label, xAxisLabelVisibility, xAxisLabelRotation) => {
|
|
1511
1537
|
const xConfig = { x: {} };
|
|
1512
1538
|
xConfig.x.label = label;
|
|
1513
1539
|
if (xAxisLabelVisibility === "hide") {
|
|
1514
1540
|
xConfig.x.hideLabels = true;
|
|
1515
1541
|
}
|
|
1542
|
+
if (xAxisLabelRotation !== void 0) {
|
|
1543
|
+
xConfig.x.labelRotation = xAxisLabelRotation;
|
|
1544
|
+
}
|
|
1516
1545
|
return xConfig;
|
|
1517
1546
|
};
|
|
1518
|
-
var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility) => {
|
|
1547
|
+
var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax) => {
|
|
1519
1548
|
const scaleType = yAxisScale != null ? yAxisScale : "linear";
|
|
1520
1549
|
const yConfig = { y: {} };
|
|
1521
1550
|
yConfig.y.label = label;
|
|
@@ -1523,34 +1552,46 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
|
|
|
1523
1552
|
if (yAxisAbbreviation !== "none") {
|
|
1524
1553
|
yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
|
|
1525
1554
|
}
|
|
1526
|
-
if (yAxisAbbreviation
|
|
1527
|
-
yConfig.y.width = 55;
|
|
1528
|
-
} else {
|
|
1555
|
+
if (yAxisAbbreviation !== "none") {
|
|
1529
1556
|
yConfig.y.width = label && label.length > 0 ? 30 : 10;
|
|
1530
1557
|
}
|
|
1531
1558
|
if (yAxisLabelVisibility === "hide") {
|
|
1532
1559
|
yConfig.y.hideLabels = true;
|
|
1533
1560
|
}
|
|
1561
|
+
if (yAxisMin !== void 0 || yAxisMax !== void 0) {
|
|
1562
|
+
yConfig.y.range = (u, dataMin, dataMax) => {
|
|
1563
|
+
const min = yAxisMin != null ? yAxisMin : dataMin;
|
|
1564
|
+
const max = yAxisMax != null ? yAxisMax : dataMax;
|
|
1565
|
+
return [min, max];
|
|
1566
|
+
};
|
|
1567
|
+
}
|
|
1534
1568
|
return yConfig;
|
|
1535
1569
|
};
|
|
1536
|
-
var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility) => {
|
|
1570
|
+
var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility, y2AxisMin, y2AxisMax) => {
|
|
1537
1571
|
const y2Config = { y2: {} };
|
|
1538
1572
|
const scaleType = axisScale != null ? axisScale : "linear";
|
|
1539
1573
|
y2Config.y2.label = label;
|
|
1540
1574
|
y2Config.y2.side = "right";
|
|
1541
|
-
y2Config.y2.showGrid = false;
|
|
1542
1575
|
y2Config.y2.type = scaleType;
|
|
1543
1576
|
if (axisAbbreviation !== "none") {
|
|
1544
1577
|
y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
|
|
1578
|
+
y2Config.y2.width = label && label.length > 0 ? 50 : 10;
|
|
1545
1579
|
} else if (roundAxisLabelsToInteger) {
|
|
1546
1580
|
y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
|
|
1547
1581
|
}
|
|
1548
1582
|
if (y2AxisLabelVisibility === "hide") {
|
|
1549
1583
|
y2Config.y2.hideLabels = true;
|
|
1550
1584
|
}
|
|
1585
|
+
if (y2AxisMin !== void 0 || y2AxisMax !== void 0) {
|
|
1586
|
+
y2Config.y2.range = (u, dataMin, dataMax) => {
|
|
1587
|
+
const min = y2AxisMin != null ? y2AxisMin : dataMin;
|
|
1588
|
+
const max = y2AxisMax != null ? y2AxisMax : dataMax;
|
|
1589
|
+
return [min, max];
|
|
1590
|
+
};
|
|
1591
|
+
}
|
|
1551
1592
|
return y2Config;
|
|
1552
1593
|
};
|
|
1553
|
-
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay) => {
|
|
1594
|
+
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
|
|
1554
1595
|
const seriesConfig = {};
|
|
1555
1596
|
let spanGaps;
|
|
1556
1597
|
let replaceNullsWithZero;
|
|
@@ -1577,6 +1618,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
1577
1618
|
);
|
|
1578
1619
|
if (shouldAssignToY2) {
|
|
1579
1620
|
seriesConfig[field].overrides.scale = "y2";
|
|
1621
|
+
} else {
|
|
1622
|
+
seriesConfig[field].overrides.scale = "y";
|
|
1580
1623
|
}
|
|
1581
1624
|
}
|
|
1582
1625
|
if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
|
|
@@ -1585,12 +1628,92 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
1585
1628
|
if (markerDisplay !== void 0) {
|
|
1586
1629
|
seriesConfig[field].markerDisplay = markerDisplay;
|
|
1587
1630
|
}
|
|
1631
|
+
const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
|
|
1632
|
+
if (fieldDashStyle) {
|
|
1633
|
+
seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
1634
|
+
}
|
|
1635
|
+
const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
|
|
1636
|
+
const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
|
|
1637
|
+
if (fieldStepPosition && fieldStepPosition !== "off") {
|
|
1638
|
+
seriesConfig[field].stepPosition = fieldStepPosition;
|
|
1639
|
+
}
|
|
1588
1640
|
if (replaceNullsWithZero !== void 0) {
|
|
1589
1641
|
seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
|
|
1590
1642
|
}
|
|
1591
1643
|
});
|
|
1592
1644
|
return seriesConfig;
|
|
1593
1645
|
};
|
|
1646
|
+
var findRangeIndices = (xData, startValue, endValue) => {
|
|
1647
|
+
let startXIndex = -1;
|
|
1648
|
+
let endXIndex = -1;
|
|
1649
|
+
const xDataEpoch = xData.map((val) => {
|
|
1650
|
+
if (typeof val === "string") {
|
|
1651
|
+
return new Date(val).getTime() / 1e3;
|
|
1652
|
+
}
|
|
1653
|
+
return val;
|
|
1654
|
+
});
|
|
1655
|
+
for (let i = 0; i < xDataEpoch.length; i += 1) {
|
|
1656
|
+
if (xDataEpoch[i] >= startValue) {
|
|
1657
|
+
startXIndex = i;
|
|
1658
|
+
break;
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
if (startXIndex === -1 && xDataEpoch.length > 0) {
|
|
1662
|
+
startXIndex = xDataEpoch.length - 1;
|
|
1663
|
+
}
|
|
1664
|
+
for (let i = xDataEpoch.length - 1; i >= 0; i -= 1) {
|
|
1665
|
+
if (xDataEpoch[i] <= endValue) {
|
|
1666
|
+
endXIndex = i;
|
|
1667
|
+
break;
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
if (endXIndex === -1 && xDataEpoch.length > 0) {
|
|
1671
|
+
endXIndex = 0;
|
|
1672
|
+
}
|
|
1673
|
+
return { startXIndex, endXIndex };
|
|
1674
|
+
};
|
|
1675
|
+
|
|
1676
|
+
// src/common/hooks/useTrellisEnabled.ts
|
|
1677
|
+
var useTrellisFeatureFlagOn = () => {
|
|
1678
|
+
const context = (0, react_exports.useContext)(FeatureFlagContext_default);
|
|
1679
|
+
return Boolean(context == null ? void 0 : context.visualizations_enableTrellis);
|
|
1680
|
+
};
|
|
1681
|
+
var useTrellisEnabled = (layoutType = visualization_schemas_exports.LAYOUT_TYPE.Off) => {
|
|
1682
|
+
const trellisFeatureEnabled = useTrellisFeatureFlagOn();
|
|
1683
|
+
return trellisFeatureEnabled && layoutType === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
1684
|
+
};
|
|
1685
|
+
|
|
1686
|
+
// src/common/components/TrellisTitle.tsx
|
|
1687
|
+
var TRELLIS_TITLE_HEIGHT = 28;
|
|
1688
|
+
var TrellisTitleText = styled_components_default.div`
|
|
1689
|
+
margin-left: 10px;
|
|
1690
|
+
margin-right: 10px;
|
|
1691
|
+
padding-top: 8px;
|
|
1692
|
+
text-overflow: ellipsis;
|
|
1693
|
+
white-space: nowrap;
|
|
1694
|
+
overflow: hidden;
|
|
1695
|
+
`;
|
|
1696
|
+
var TrellisTitleDiv = styled_components_default.div`
|
|
1697
|
+
height: ${TRELLIS_TITLE_HEIGHT}px;
|
|
1698
|
+
font-size: 14px;
|
|
1699
|
+
font-weight: 700;
|
|
1700
|
+
color: ${(props) => props.fontColor};
|
|
1701
|
+
background-color: ${(props) => props.backgroundColor};
|
|
1702
|
+
box-shadow: 0 1px ${(props) => props.backgroundColor}; // this is added to avoid a 1px gap between title and viz divs that showed up intermittently because of pixel rounding error in chrome.
|
|
1703
|
+
`;
|
|
1704
|
+
var TrellisTitle = (props) => {
|
|
1705
|
+
const titleText = String(props.trellisKey).toString();
|
|
1706
|
+
return /* @__PURE__ */ react_exports.createElement(
|
|
1707
|
+
TrellisTitleDiv,
|
|
1708
|
+
{
|
|
1709
|
+
fontColor: props.fontColor,
|
|
1710
|
+
backgroundColor: props.backgroundColor,
|
|
1711
|
+
"data-test": "trellis-title",
|
|
1712
|
+
title: titleText
|
|
1713
|
+
},
|
|
1714
|
+
/* @__PURE__ */ react_exports.createElement(TrellisTitleText, null, titleText)
|
|
1715
|
+
);
|
|
1716
|
+
};
|
|
1594
1717
|
|
|
1595
1718
|
// src/common/TimeSeriesChartWrapper.tsx
|
|
1596
1719
|
var TimeSeriesChartContainer = styled_components_default.div`
|
|
@@ -1601,38 +1724,123 @@ var TimeSeriesChartContainer = styled_components_default.div`
|
|
|
1601
1724
|
position: absolute !important; // This is needed for canvas element export pdf/png to work correctly
|
|
1602
1725
|
}
|
|
1603
1726
|
`;
|
|
1604
|
-
var
|
|
1727
|
+
var appendTrellisToPayload = (payload, trellisKey, trellisSplitBy) => {
|
|
1728
|
+
const result = __spreadValues({}, payload);
|
|
1729
|
+
if (trellisSplitBy) {
|
|
1730
|
+
result["trellis.name"] = trellisSplitBy;
|
|
1731
|
+
}
|
|
1732
|
+
if (trellisKey) {
|
|
1733
|
+
result["trellis.value"] = trellisKey;
|
|
1734
|
+
}
|
|
1735
|
+
return result;
|
|
1736
|
+
};
|
|
1737
|
+
var hasMouseoverPayloadChanged = (currentPayload, previousPayload) => {
|
|
1738
|
+
if (!previousPayload) {
|
|
1739
|
+
return true;
|
|
1740
|
+
}
|
|
1741
|
+
if (currentPayload.index !== previousPayload.index) {
|
|
1742
|
+
return true;
|
|
1743
|
+
}
|
|
1744
|
+
if (currentPayload.seriesIndex !== previousPayload.seriesIndex) {
|
|
1745
|
+
return true;
|
|
1746
|
+
}
|
|
1747
|
+
if (currentPayload["trellis.name"] !== previousPayload["trellis.name"]) {
|
|
1748
|
+
return true;
|
|
1749
|
+
}
|
|
1750
|
+
if (currentPayload["trellis.value"] !== previousPayload["trellis.value"]) {
|
|
1751
|
+
return true;
|
|
1752
|
+
}
|
|
1753
|
+
return false;
|
|
1754
|
+
};
|
|
1755
|
+
var handleClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
|
|
1605
1756
|
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(chartEvent, "value", "seriesKey")), {
|
|
1606
1757
|
name: chartEvent.seriesKey
|
|
1607
1758
|
});
|
|
1608
1759
|
delete payload.seriesKey;
|
|
1609
1760
|
if (chartEvent.rowContext) {
|
|
1610
|
-
Object.
|
|
1611
|
-
payload
|
|
1612
|
-
|
|
1761
|
+
Object.assign(
|
|
1762
|
+
payload,
|
|
1763
|
+
Object.keys(chartEvent.rowContext).reduce((acc, fieldName) => {
|
|
1764
|
+
acc[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
|
|
1765
|
+
return acc;
|
|
1766
|
+
}, {})
|
|
1767
|
+
);
|
|
1613
1768
|
}
|
|
1769
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1614
1770
|
if (onClick) {
|
|
1615
1771
|
onClick({
|
|
1616
1772
|
type: "point.click",
|
|
1617
1773
|
originalEvent: chartEvent,
|
|
1618
|
-
payload
|
|
1774
|
+
payload: updatedPayload
|
|
1619
1775
|
});
|
|
1620
1776
|
}
|
|
1621
1777
|
};
|
|
1622
|
-
var handleLegendClick = (chartEvent, onClick) => {
|
|
1778
|
+
var handleLegendClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
|
|
1623
1779
|
const payload = {
|
|
1624
1780
|
name: chartEvent
|
|
1625
1781
|
};
|
|
1782
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1626
1783
|
if (onClick) {
|
|
1627
1784
|
onClick({
|
|
1628
1785
|
type: "legend.click",
|
|
1629
1786
|
originalEvent: chartEvent,
|
|
1630
|
-
payload
|
|
1787
|
+
payload: updatedPayload
|
|
1788
|
+
});
|
|
1789
|
+
}
|
|
1790
|
+
};
|
|
1791
|
+
var handleRangeSelection = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
|
|
1792
|
+
var _a;
|
|
1793
|
+
if (!rangeEvent) {
|
|
1794
|
+
return;
|
|
1795
|
+
}
|
|
1796
|
+
const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
|
|
1797
|
+
const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
|
|
1798
|
+
const payload = {
|
|
1799
|
+
startXIndex,
|
|
1800
|
+
startXValue: rangeEvent.start,
|
|
1801
|
+
endXIndex,
|
|
1802
|
+
endXValue: rangeEvent.end
|
|
1803
|
+
};
|
|
1804
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1805
|
+
if (onSelect) {
|
|
1806
|
+
onSelect({
|
|
1807
|
+
type: "range.selectBeforeZoom",
|
|
1808
|
+
originalEvent: rangeEvent,
|
|
1809
|
+
payload: updatedPayload
|
|
1810
|
+
});
|
|
1811
|
+
}
|
|
1812
|
+
};
|
|
1813
|
+
var handleRangeZoom = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
|
|
1814
|
+
var _a;
|
|
1815
|
+
const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
|
|
1816
|
+
const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
|
|
1817
|
+
const payload = {
|
|
1818
|
+
startXIndex,
|
|
1819
|
+
startXValue: rangeEvent.start,
|
|
1820
|
+
endXIndex,
|
|
1821
|
+
endXValue: rangeEvent.end
|
|
1822
|
+
};
|
|
1823
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1824
|
+
if (onSelect) {
|
|
1825
|
+
onSelect({
|
|
1826
|
+
type: "range.select",
|
|
1827
|
+
originalEvent: rangeEvent,
|
|
1828
|
+
payload: updatedPayload
|
|
1631
1829
|
});
|
|
1632
1830
|
}
|
|
1633
1831
|
};
|
|
1832
|
+
var parseArrayOption = (value) => {
|
|
1833
|
+
if (Array.isArray(value)) {
|
|
1834
|
+
return value;
|
|
1835
|
+
}
|
|
1836
|
+
if (value) {
|
|
1837
|
+
return JSON.parse(value);
|
|
1838
|
+
}
|
|
1839
|
+
return void 0;
|
|
1840
|
+
};
|
|
1634
1841
|
var TimeSeriesChartWrapper = (props) => {
|
|
1635
|
-
|
|
1842
|
+
var _b, _c, _d;
|
|
1843
|
+
const _a = props, {
|
|
1636
1844
|
width,
|
|
1637
1845
|
height,
|
|
1638
1846
|
chartData,
|
|
@@ -1645,12 +1853,57 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1645
1853
|
markerDisplay,
|
|
1646
1854
|
onClick,
|
|
1647
1855
|
onPointMouseOver,
|
|
1648
|
-
onPointMouseOut
|
|
1649
|
-
|
|
1650
|
-
|
|
1856
|
+
onPointMouseOut,
|
|
1857
|
+
onSelect,
|
|
1858
|
+
splitByLayout,
|
|
1859
|
+
trellisKey,
|
|
1860
|
+
trellisSplitBy,
|
|
1651
1861
|
backgroundColor,
|
|
1862
|
+
defaultFontColor,
|
|
1863
|
+
additionalTooltipValues,
|
|
1864
|
+
xAxisLineVisibility: xAxisLineVisibility,
|
|
1865
|
+
yAxisLineVisibility,
|
|
1866
|
+
y2AxisLineVisibility,
|
|
1867
|
+
showYAxisWithZero: showYAxisWithZeroFromProps,
|
|
1868
|
+
showY2AxisWithZero: showY2AxisWithZeroFromProps
|
|
1869
|
+
} = _a, otherOptions = __objRest(_a, [
|
|
1870
|
+
"width",
|
|
1871
|
+
"height",
|
|
1872
|
+
"chartData",
|
|
1873
|
+
"options",
|
|
1874
|
+
"userLocale",
|
|
1875
|
+
"annotationX",
|
|
1876
|
+
"annotationLabel",
|
|
1877
|
+
"annotationColor",
|
|
1878
|
+
"legendDisplay",
|
|
1879
|
+
"markerDisplay",
|
|
1880
|
+
"onClick",
|
|
1881
|
+
"onPointMouseOver",
|
|
1882
|
+
"onPointMouseOut",
|
|
1883
|
+
"onSelect",
|
|
1884
|
+
"splitByLayout",
|
|
1885
|
+
"trellisKey",
|
|
1886
|
+
"trellisSplitBy",
|
|
1887
|
+
"backgroundColor",
|
|
1888
|
+
"defaultFontColor",
|
|
1889
|
+
"additionalTooltipValues",
|
|
1890
|
+
// Extract axis line visibility options from props
|
|
1891
|
+
"xAxisLineVisibility",
|
|
1892
|
+
"yAxisLineVisibility",
|
|
1893
|
+
"y2AxisLineVisibility",
|
|
1894
|
+
// Extract showYAxisWithZero directly from props for accelerated render mode
|
|
1895
|
+
"showYAxisWithZero",
|
|
1896
|
+
"showY2AxisWithZero"
|
|
1897
|
+
]);
|
|
1898
|
+
const { eventHandlers, xField: xFieldFromProps } = otherOptions;
|
|
1899
|
+
const trellisEnabled = useTrellisEnabled(splitByLayout);
|
|
1900
|
+
const {
|
|
1901
|
+
backgroundColor: bgColorFromOptions,
|
|
1652
1902
|
seriesColors: seriesColorsStr,
|
|
1653
1903
|
fieldColors,
|
|
1904
|
+
legendLabels: legendLabelsStr,
|
|
1905
|
+
legendMode,
|
|
1906
|
+
legendTruncation,
|
|
1654
1907
|
"axisTitleX.text": xAxisTitleText,
|
|
1655
1908
|
"axisTitleY.text": yAxisTitleText,
|
|
1656
1909
|
"axisTitleY2.text": y2AxisTitleText,
|
|
@@ -1658,8 +1911,12 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1658
1911
|
"axisTitleY.visibility": yAxisTitleVisibility,
|
|
1659
1912
|
"axisTitleY2.visibility": y2AxisTitleVisibility,
|
|
1660
1913
|
"axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
|
|
1914
|
+
"axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
|
|
1915
|
+
"axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
|
|
1661
1916
|
"axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
|
|
1917
|
+
"axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
|
|
1662
1918
|
"axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
|
|
1919
|
+
"axisLabelsY2.majorUnit": y2AxisMajorUnitFromSimpleXML,
|
|
1663
1920
|
"axisY.abbreviation": yAxisAbbreviation,
|
|
1664
1921
|
"axisY.scale": yAxisScale,
|
|
1665
1922
|
"axisY2.abbreviation": y2AxisAbbreviation,
|
|
@@ -1669,10 +1926,73 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1669
1926
|
"axisLabelsY2.integerUnits": y2IntegerUnits,
|
|
1670
1927
|
"chart.overlayFields": overlayFieldsStr,
|
|
1671
1928
|
"chart.nullValueMode": nullValueMode,
|
|
1672
|
-
|
|
1929
|
+
"chart.showDataLabels": showDataLabels,
|
|
1930
|
+
lineWidth,
|
|
1931
|
+
lineDashStyle,
|
|
1932
|
+
fieldDashStyles: lineDashStylesByFieldStr,
|
|
1933
|
+
stepPosition,
|
|
1934
|
+
fieldStepPositions: stepPositionsByFieldStr,
|
|
1935
|
+
yAxisMin: yAxisMinRaw,
|
|
1936
|
+
yAxisMax: yAxisMaxRaw,
|
|
1937
|
+
y2AxisMin: y2AxisMinRaw,
|
|
1938
|
+
y2AxisMax: y2AxisMaxRaw,
|
|
1939
|
+
showXMajorGridLines,
|
|
1940
|
+
showYMajorGridLines,
|
|
1941
|
+
showY2MajorGridLines,
|
|
1942
|
+
showYMinorGridLines,
|
|
1943
|
+
showY2MinorGridLines,
|
|
1944
|
+
showLineSmoothing,
|
|
1945
|
+
xAxisMajorTickVisibility,
|
|
1946
|
+
xAxisMajorTickSize,
|
|
1947
|
+
yAxisMajorTickVisibility,
|
|
1948
|
+
y2AxisMajorTickVisibility,
|
|
1949
|
+
yAxisMajorTickSize,
|
|
1950
|
+
y2AxisMajorTickSize,
|
|
1951
|
+
yAxisMajorTickInterval,
|
|
1952
|
+
y2AxisMajorTickInterval,
|
|
1953
|
+
yAxisMinorTickVisibility,
|
|
1954
|
+
y2AxisMinorTickVisibility,
|
|
1955
|
+
yAxisMinorTickSize,
|
|
1956
|
+
y2AxisMinorTickSize,
|
|
1957
|
+
showYAxisWithZero: showYAxisWithZeroFromOptions,
|
|
1958
|
+
showY2AxisWithZero: showY2AxisWithZeroFromOptions
|
|
1673
1959
|
} = options;
|
|
1960
|
+
const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
|
|
1961
|
+
const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
|
|
1962
|
+
const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
|
|
1963
|
+
const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
|
|
1964
|
+
const showYMajorTicks = yAxisMajorTickVisibility === "show";
|
|
1965
|
+
const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
|
|
1966
|
+
const showYMinorTicks = yAxisMinorTickVisibility === "show";
|
|
1967
|
+
const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
|
|
1968
|
+
const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
|
|
1969
|
+
const showYAxisLine = yAxisLineVisibility === "show";
|
|
1970
|
+
const showY2AxisLine = y2AxisLineVisibility === "show";
|
|
1971
|
+
const yAxisMin = parseAxisValue(yAxisMinRaw);
|
|
1972
|
+
const yAxisMax = parseAxisValue(yAxisMaxRaw);
|
|
1973
|
+
const y2AxisMin = parseAxisValue(y2AxisMinRaw);
|
|
1974
|
+
const y2AxisMax = parseAxisValue(y2AxisMaxRaw);
|
|
1975
|
+
const parseTickInterval = (simpleXMLValue, canvasValue) => {
|
|
1976
|
+
if (simpleXMLValue) return Number(simpleXMLValue);
|
|
1977
|
+
if (canvasValue) return Number(canvasValue);
|
|
1978
|
+
return void 0;
|
|
1979
|
+
};
|
|
1980
|
+
const yAxisMajorTickIntervalNum = parseTickInterval(yAxisMajorUnitFromSimpleXML, yAxisMajorTickInterval);
|
|
1981
|
+
const y2AxisMajorTickIntervalNum = parseTickInterval(
|
|
1982
|
+
y2AxisMajorUnitFromSimpleXML,
|
|
1983
|
+
y2AxisMajorTickInterval
|
|
1984
|
+
);
|
|
1985
|
+
const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
|
|
1986
|
+
const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
|
|
1987
|
+
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
|
|
1988
|
+
const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
|
|
1989
|
+
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
|
|
1674
1990
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
1675
1991
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
1992
|
+
const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
|
|
1993
|
+
const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
|
|
1994
|
+
const legendLabels = parseArrayOption(legendLabelsStr);
|
|
1995
|
+
const bgColor = backgroundColor || bgColorFromOptions;
|
|
1676
1996
|
const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
|
|
1677
1997
|
const [containerHeight, setContainerHeight] = react_exports.useState(Number(props.height));
|
|
1678
1998
|
const cachedHandleResize = react_exports.useCallback((w, h) => {
|
|
@@ -1683,31 +2003,64 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1683
2003
|
fields: chartData.fields,
|
|
1684
2004
|
columns: chartData.seriesList
|
|
1685
2005
|
});
|
|
1686
|
-
const xField =
|
|
2006
|
+
const xField = getFieldName2(filteredChartData.fields[0]);
|
|
1687
2007
|
const yFields = getFieldNames(
|
|
1688
2008
|
filteredChartData.fields.length > 1 ? filteredChartData.fields.slice(1) : []
|
|
1689
2009
|
);
|
|
1690
|
-
const y2Fields =
|
|
1691
|
-
|
|
2010
|
+
const y2Fields = (0, react_exports.useMemo)(
|
|
2011
|
+
() => y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [],
|
|
2012
|
+
[y2FieldsStr]
|
|
2013
|
+
);
|
|
2014
|
+
const overlayFields = (0, react_exports.useMemo)(
|
|
2015
|
+
() => overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [],
|
|
2016
|
+
[overlayFieldsStr]
|
|
2017
|
+
);
|
|
1692
2018
|
let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
|
|
1693
2019
|
xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
|
|
1694
|
-
|
|
2020
|
+
const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
|
|
2021
|
+
let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility);
|
|
1695
2022
|
yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
|
|
1696
2023
|
const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
|
|
1697
2024
|
let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
|
|
1698
2025
|
y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
|
|
1699
|
-
const xScaleConfig =
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
2026
|
+
const xScaleConfig = (0, react_exports.useMemo)(
|
|
2027
|
+
() => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
|
|
2028
|
+
[xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
|
|
2029
|
+
);
|
|
2030
|
+
const yScaleConfig = (0, react_exports.useMemo)(
|
|
2031
|
+
() => getYScaleConfig(
|
|
2032
|
+
yAxisTitle,
|
|
2033
|
+
yAxisAbbreviation,
|
|
2034
|
+
yAxisScale,
|
|
2035
|
+
yAxisLabelVisibility,
|
|
2036
|
+
yAxisMin,
|
|
2037
|
+
yAxisMax
|
|
2038
|
+
),
|
|
2039
|
+
[yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax]
|
|
2040
|
+
);
|
|
2041
|
+
const y2ScaleConfig = (0, react_exports.useMemo)(() => {
|
|
2042
|
+
if (y2Enabled) {
|
|
2043
|
+
return getY2ScaleConfig(
|
|
2044
|
+
y2AxisTitle,
|
|
2045
|
+
y2AxisAbbreviation,
|
|
2046
|
+
y2AxisScale,
|
|
2047
|
+
y2IntegerUnits,
|
|
2048
|
+
y2AxisLabelVisibility,
|
|
2049
|
+
y2AxisMin,
|
|
2050
|
+
y2AxisMax
|
|
2051
|
+
);
|
|
2052
|
+
}
|
|
2053
|
+
return {};
|
|
2054
|
+
}, [
|
|
2055
|
+
y2Enabled,
|
|
2056
|
+
y2AxisTitle,
|
|
2057
|
+
y2AxisAbbreviation,
|
|
2058
|
+
y2AxisScale,
|
|
2059
|
+
y2IntegerUnits,
|
|
2060
|
+
y2AxisLabelVisibility,
|
|
2061
|
+
y2AxisMin,
|
|
2062
|
+
y2AxisMax
|
|
2063
|
+
]);
|
|
1711
2064
|
const uplotContainerElement = (0, react_exports.useRef)(null);
|
|
1712
2065
|
const seriesDataFormatted = [
|
|
1713
2066
|
filteredChartData.columns[0],
|
|
@@ -1723,9 +2076,25 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1723
2076
|
overlayFields,
|
|
1724
2077
|
y2Enabled,
|
|
1725
2078
|
nullValueMode,
|
|
1726
|
-
markerDisplay
|
|
2079
|
+
markerDisplay,
|
|
2080
|
+
lineDashStyle,
|
|
2081
|
+
lineDashStylesByField,
|
|
2082
|
+
stepPosition,
|
|
2083
|
+
stepPositionsByField
|
|
1727
2084
|
),
|
|
1728
|
-
[
|
|
2085
|
+
[
|
|
2086
|
+
yFields,
|
|
2087
|
+
y2Fields,
|
|
2088
|
+
lineWidth,
|
|
2089
|
+
overlayFields,
|
|
2090
|
+
y2Enabled,
|
|
2091
|
+
nullValueMode,
|
|
2092
|
+
markerDisplay,
|
|
2093
|
+
lineDashStyle,
|
|
2094
|
+
lineDashStylesByField,
|
|
2095
|
+
stepPosition,
|
|
2096
|
+
stepPositionsByField
|
|
2097
|
+
]
|
|
1729
2098
|
);
|
|
1730
2099
|
const chartingEventAnnotations = (0, react_exports.useMemo)(
|
|
1731
2100
|
() => getAnnotationsForCanvas({
|
|
@@ -1739,25 +2108,59 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1739
2108
|
() => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
|
|
1740
2109
|
[xScaleConfig, yScaleConfig, y2ScaleConfig]
|
|
1741
2110
|
);
|
|
1742
|
-
const
|
|
2111
|
+
const isSeriesCompare = legendMode === "seriesCompare";
|
|
2112
|
+
const legend = (0, react_exports.useMemo)(
|
|
2113
|
+
() => getLegend({
|
|
2114
|
+
legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
|
|
2115
|
+
isSeriesCompare,
|
|
2116
|
+
legendTruncation
|
|
2117
|
+
}),
|
|
2118
|
+
[legendDisplay, isSeriesCompare, legendTruncation]
|
|
2119
|
+
);
|
|
1743
2120
|
const handleChartClick = react_exports.useCallback(
|
|
1744
2121
|
(event) => {
|
|
1745
2122
|
if (onClick) {
|
|
1746
|
-
handleClick(event, onClick);
|
|
2123
|
+
handleClick(event, onClick, trellisKey, trellisSplitBy);
|
|
1747
2124
|
}
|
|
1748
2125
|
},
|
|
1749
|
-
[onClick]
|
|
2126
|
+
[onClick, trellisKey, trellisSplitBy]
|
|
1750
2127
|
);
|
|
1751
2128
|
const handleChartLegendClick = react_exports.useCallback(
|
|
1752
2129
|
(event) => {
|
|
1753
2130
|
if (onClick) {
|
|
1754
|
-
handleLegendClick(event, onClick);
|
|
2131
|
+
handleLegendClick(event, onClick, trellisKey, trellisSplitBy);
|
|
1755
2132
|
}
|
|
1756
2133
|
},
|
|
1757
|
-
[onClick]
|
|
2134
|
+
[onClick, trellisKey, trellisSplitBy]
|
|
2135
|
+
);
|
|
2136
|
+
const handleChartRangeSelection = react_exports.useCallback(
|
|
2137
|
+
(range3) => {
|
|
2138
|
+
if (onSelect) {
|
|
2139
|
+
handleRangeSelection(range3, onSelect, chartData, trellisKey, trellisSplitBy);
|
|
2140
|
+
}
|
|
2141
|
+
},
|
|
2142
|
+
[onSelect, chartData, trellisKey, trellisSplitBy]
|
|
2143
|
+
);
|
|
2144
|
+
const handleChartRangeZoom = react_exports.useCallback(
|
|
2145
|
+
(range3) => {
|
|
2146
|
+
if (onSelect) {
|
|
2147
|
+
handleRangeZoom(range3, onSelect, chartData, trellisKey, trellisSplitBy);
|
|
2148
|
+
}
|
|
2149
|
+
},
|
|
2150
|
+
[onSelect, chartData, trellisKey, trellisSplitBy]
|
|
2151
|
+
);
|
|
2152
|
+
const xFieldToUse = xFieldFromProps || xField;
|
|
2153
|
+
const enableSearchZoom = react_exports.useMemo(
|
|
2154
|
+
() => shouldEnableSearchZoom(eventHandlers, xFieldToUse),
|
|
2155
|
+
[eventHandlers, xFieldToUse]
|
|
1758
2156
|
);
|
|
1759
2157
|
const lastPayloadRef = react_exports.useRef(null);
|
|
1760
2158
|
const lastOriginalEventRef = react_exports.useRef(null);
|
|
2159
|
+
const previousMouseoverPayloadRef = react_exports.useRef(null);
|
|
2160
|
+
const additionalTooltipValuesRef = react_exports.useRef(additionalTooltipValues);
|
|
2161
|
+
react_exports.useEffect(() => {
|
|
2162
|
+
additionalTooltipValuesRef.current = additionalTooltipValues;
|
|
2163
|
+
}, [additionalTooltipValues]);
|
|
1761
2164
|
const handleChartCrosshairChange = react_exports.useCallback(
|
|
1762
2165
|
(event) => {
|
|
1763
2166
|
if (onPointMouseOver || onPointMouseOut) {
|
|
@@ -1769,6 +2172,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1769
2172
|
payload: lastPayloadRef.current
|
|
1770
2173
|
});
|
|
1771
2174
|
}
|
|
2175
|
+
previousMouseoverPayloadRef.current = null;
|
|
1772
2176
|
return;
|
|
1773
2177
|
}
|
|
1774
2178
|
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
|
|
@@ -1776,25 +2180,36 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1776
2180
|
});
|
|
1777
2181
|
delete payload.seriesKey;
|
|
1778
2182
|
if (event.rowContext) {
|
|
1779
|
-
Object.
|
|
1780
|
-
payload
|
|
1781
|
-
|
|
2183
|
+
Object.assign(
|
|
2184
|
+
payload,
|
|
2185
|
+
Object.keys(event.rowContext).reduce((acc, fieldName) => {
|
|
2186
|
+
acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
|
|
2187
|
+
return acc;
|
|
2188
|
+
}, {})
|
|
2189
|
+
);
|
|
2190
|
+
}
|
|
2191
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
2192
|
+
if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
|
|
2193
|
+
return;
|
|
1782
2194
|
}
|
|
1783
|
-
lastPayloadRef.current =
|
|
2195
|
+
lastPayloadRef.current = updatedPayload;
|
|
1784
2196
|
lastOriginalEventRef.current = event;
|
|
2197
|
+
previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
|
|
1785
2198
|
if (onPointMouseOver) {
|
|
1786
2199
|
onPointMouseOver({
|
|
1787
2200
|
type: "point.mouseover",
|
|
1788
2201
|
originalEvent: event,
|
|
1789
|
-
payload
|
|
2202
|
+
payload: updatedPayload
|
|
1790
2203
|
});
|
|
1791
2204
|
}
|
|
1792
2205
|
}
|
|
1793
2206
|
},
|
|
1794
|
-
[onPointMouseOver, onPointMouseOut]
|
|
2207
|
+
[onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
|
|
1795
2208
|
);
|
|
1796
|
-
const
|
|
1797
|
-
|
|
2209
|
+
const dataKey = `${(_b = chartData.columns[0]) == null ? void 0 : _b[0]}-${(_c = chartData.columns[0]) == null ? void 0 : _c[chartData.columns[0].length - 1]}-${(_d = chartData.columns[0]) == null ? void 0 : _d.length}`;
|
|
2210
|
+
const memoizedChart = (0, react_exports.useMemo)(() => {
|
|
2211
|
+
const computedOnRangeZoom = onSelect ? handleChartRangeZoom : void 0;
|
|
2212
|
+
return /* @__PURE__ */ react_exports.createElement(visualization_canvas_exports.RangeSelectionProvider, { key: dataKey }, /* @__PURE__ */ react_exports.createElement(
|
|
1798
2213
|
visualization_canvas_exports.TimeSeriesChart,
|
|
1799
2214
|
{
|
|
1800
2215
|
data: chartData,
|
|
@@ -1804,49 +2219,121 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1804
2219
|
seriesColorsByField,
|
|
1805
2220
|
seriesConfig: seriesOverrides,
|
|
1806
2221
|
legend,
|
|
2222
|
+
legendLabels,
|
|
2223
|
+
legendTruncation,
|
|
2224
|
+
isSeriesCompare: legendMode === "seriesCompare",
|
|
2225
|
+
maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
|
|
1807
2226
|
scaleConfig,
|
|
1808
2227
|
timestampFormat: "expanded",
|
|
1809
2228
|
onCrosshairClick: onClick ? handleChartClick : void 0,
|
|
1810
2229
|
onCrosshairChange: onPointMouseOver || onPointMouseOut ? handleChartCrosshairChange : void 0,
|
|
1811
2230
|
onSeriesClick: onClick ? handleChartLegendClick : void 0,
|
|
2231
|
+
onRangeSelection: handleChartRangeSelection,
|
|
2232
|
+
onRangeZoom: computedOnRangeZoom,
|
|
2233
|
+
serverSideZoom: enableSearchZoom,
|
|
1812
2234
|
userLocale,
|
|
1813
2235
|
events: chartingEventAnnotations,
|
|
1814
|
-
eventsConfig: { renderer: triangleEventAnnotationRenderer }
|
|
2236
|
+
eventsConfig: { renderer: triangleEventAnnotationRenderer },
|
|
2237
|
+
additionalTooltipValuesRef,
|
|
2238
|
+
showXMajorGridLines,
|
|
2239
|
+
showYMajorGridLines,
|
|
2240
|
+
showY2MajorGridLines,
|
|
2241
|
+
showYMinorGridLines,
|
|
2242
|
+
showY2MinorGridLines,
|
|
2243
|
+
showLineSmoothing,
|
|
2244
|
+
dataValuesDisplay,
|
|
2245
|
+
showXMajorTicks,
|
|
2246
|
+
xAxisMajorTickSize: xAxisMajorTickSizeNum,
|
|
2247
|
+
showYMajorTicks,
|
|
2248
|
+
showY2MajorTicks,
|
|
2249
|
+
yAxisMajorTickSize: yAxisMajorTickSizeNum,
|
|
2250
|
+
y2AxisMajorTickSize: y2AxisMajorTickSizeNum,
|
|
2251
|
+
yAxisMajorTickInterval: yAxisMajorTickIntervalNum,
|
|
2252
|
+
y2AxisMajorTickInterval: y2AxisMajorTickIntervalNum,
|
|
2253
|
+
showYMinorTicks,
|
|
2254
|
+
showY2MinorTicks,
|
|
2255
|
+
yAxisMinorTickSize: yAxisMinorTickSizeNum,
|
|
2256
|
+
y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
|
|
2257
|
+
showYAxisWithZero,
|
|
2258
|
+
showY2AxisWithZero,
|
|
2259
|
+
showXAxisLine,
|
|
2260
|
+
showYAxisLine,
|
|
2261
|
+
showY2AxisLine,
|
|
2262
|
+
xAxisMaxLabelParts
|
|
1815
2263
|
}
|
|
1816
|
-
)
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
2264
|
+
));
|
|
2265
|
+
}, [
|
|
2266
|
+
onSelect,
|
|
2267
|
+
handleChartRangeZoom,
|
|
2268
|
+
dataKey,
|
|
2269
|
+
chartData,
|
|
2270
|
+
containerWidth,
|
|
2271
|
+
containerHeight,
|
|
2272
|
+
seriesColors,
|
|
2273
|
+
seriesColorsByField,
|
|
2274
|
+
seriesOverrides,
|
|
2275
|
+
legend,
|
|
2276
|
+
legendLabels,
|
|
2277
|
+
legendTruncation,
|
|
2278
|
+
scaleConfig,
|
|
2279
|
+
onClick,
|
|
2280
|
+
handleChartClick,
|
|
2281
|
+
onPointMouseOver,
|
|
2282
|
+
onPointMouseOut,
|
|
2283
|
+
handleChartCrosshairChange,
|
|
2284
|
+
handleChartLegendClick,
|
|
2285
|
+
handleChartRangeSelection,
|
|
2286
|
+
enableSearchZoom,
|
|
2287
|
+
userLocale,
|
|
2288
|
+
chartingEventAnnotations,
|
|
2289
|
+
showXMajorGridLines,
|
|
2290
|
+
showYMajorGridLines,
|
|
2291
|
+
showY2MajorGridLines,
|
|
2292
|
+
showYMinorGridLines,
|
|
2293
|
+
showY2MinorGridLines,
|
|
2294
|
+
showLineSmoothing,
|
|
2295
|
+
dataValuesDisplay,
|
|
2296
|
+
showXMajorTicks,
|
|
2297
|
+
xAxisMajorTickSizeNum,
|
|
2298
|
+
showYMajorTicks,
|
|
2299
|
+
showY2MajorTicks,
|
|
2300
|
+
yAxisMajorTickSizeNum,
|
|
2301
|
+
y2AxisMajorTickSizeNum,
|
|
2302
|
+
yAxisMajorTickIntervalNum,
|
|
2303
|
+
y2AxisMajorTickIntervalNum,
|
|
2304
|
+
showYMinorTicks,
|
|
2305
|
+
showY2MinorTicks,
|
|
2306
|
+
yAxisMinorTickSizeNum,
|
|
2307
|
+
y2AxisMinorTickSizeNum,
|
|
2308
|
+
showYAxisWithZero,
|
|
2309
|
+
showY2AxisWithZero,
|
|
2310
|
+
showXAxisLine,
|
|
2311
|
+
showYAxisLine,
|
|
2312
|
+
showY2AxisLine,
|
|
2313
|
+
legendMode,
|
|
2314
|
+
xAxisMaxLabelParts
|
|
2315
|
+
]);
|
|
1836
2316
|
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
1837
|
-
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor }, memoizedChart);
|
|
1838
|
-
}, [
|
|
1839
|
-
return /* @__PURE__ */ react_exports.createElement(
|
|
2317
|
+
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
|
|
2318
|
+
}, [bgColor, memoizedChart]);
|
|
2319
|
+
return /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, trellisEnabled && /* @__PURE__ */ react_exports.createElement(
|
|
2320
|
+
TrellisTitle,
|
|
2321
|
+
{
|
|
2322
|
+
trellisKey,
|
|
2323
|
+
backgroundColor: bgColor,
|
|
2324
|
+
fontColor: defaultFontColor
|
|
2325
|
+
}
|
|
2326
|
+
), /* @__PURE__ */ react_exports.createElement(
|
|
1840
2327
|
TimeSeriesChartContainer,
|
|
1841
2328
|
{
|
|
1842
|
-
height,
|
|
2329
|
+
height: trellisEnabled ? Number(height) - TRELLIS_TITLE_HEIGHT : height,
|
|
1843
2330
|
width,
|
|
1844
2331
|
ref: uplotContainerElement,
|
|
1845
2332
|
"data-test": "timeseries-chart-wrapper"
|
|
1846
2333
|
},
|
|
1847
2334
|
/* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }),
|
|
1848
2335
|
memoizedVisualization
|
|
1849
|
-
);
|
|
2336
|
+
));
|
|
1850
2337
|
};
|
|
1851
2338
|
var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
|
|
1852
2339
|
|