@splunk/visualizations 28.2.3 → 28.4.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 -0
- package/Area/areaUtils.d.ts.map +1 -0
- package/Area/config.d.ts.map +1 -0
- package/Area/index.d.ts.map +1 -0
- package/Area.config.js +0 -1
- package/Area.config.js.map +2 -2
- package/Area.js +711 -184
- package/Area.js.map +4 -4
- package/Bar/Bar.d.ts.map +1 -0
- package/Bar/barUtils.d.ts.map +1 -0
- package/Bar/config.d.ts.map +1 -0
- package/Bar/index.d.ts.map +1 -0
- package/Bar.config.js +0 -1
- package/Bar.config.js.map +2 -2
- package/Bar.js +721 -184
- package/Bar.js.map +4 -4
- package/Bubble/Bubble.d.ts.map +1 -0
- package/Bubble/bubbleUtils.d.ts.map +1 -0
- package/Bubble/config.d.ts.map +1 -0
- package/Bubble/index.d.ts.map +1 -0
- package/Bubble.config.js +0 -1
- package/Bubble.config.js.map +2 -2
- package/Bubble.js +706 -167
- package/Bubble.js.map +4 -4
- package/CHANGELOG.external.md +99 -2
- package/{dist/types/ChoroplethSvg → ChoroplethSvg}/ChoroplethSvg.d.ts +4 -3
- package/ChoroplethSvg/ChoroplethSvg.d.ts.map +1 -0
- package/ChoroplethSvg/ErrorMessage/ErrorMessage.d.ts.map +1 -0
- package/ChoroplethSvg/PureChoroplethSvg/PureChoroplethSvg.d.ts.map +1 -0
- package/ChoroplethSvg/PureChoroplethSvg/SvgChoroplethDynamic.d.ts.map +1 -0
- package/ChoroplethSvg/PureChoroplethSvg/SvgMutator.d.ts.map +1 -0
- package/ChoroplethSvg/config.d.ts.map +1 -0
- package/ChoroplethSvg/index.d.ts.map +1 -0
- package/ChoroplethSvg.config.js +1 -3
- package/ChoroplethSvg.config.js.map +2 -2
- package/ChoroplethSvg.js +661 -109
- package/ChoroplethSvg.js.map +4 -4
- package/Column/Column.d.ts.map +1 -0
- package/Column/columnUtils.d.ts.map +1 -0
- package/Column/config.d.ts.map +1 -0
- package/Column/index.d.ts.map +1 -0
- package/Column.config.js +0 -1
- package/Column.config.js.map +2 -2
- package/Column.js +711 -184
- package/Column.js.map +4 -4
- package/Ellipse/Ellipse.d.ts.map +1 -0
- package/Ellipse/config.d.ts.map +1 -0
- package/Ellipse/index.d.ts.map +1 -0
- package/Ellipse.js +649 -107
- package/Ellipse.js.map +4 -4
- package/Events/EventUtils.d.ts.map +1 -0
- package/Events/Events.d.ts.map +1 -0
- package/Events/PureEvents/FieldSummaryTooltip.d.ts.map +1 -0
- package/Events/PureEvents/PureEvents.d.ts.map +1 -0
- package/Events/PureEvents/TimeControlsPopover.d.ts.map +1 -0
- package/Events/config.d.ts.map +1 -0
- package/Events/index.d.ts.map +1 -0
- package/Events.js +780 -193
- package/Events.js.map +4 -4
- package/FillerGauge/FillerGauge.d.ts.map +1 -0
- package/FillerGauge/PureFillerGauge/FillerGauge.d.ts.map +1 -0
- package/FillerGauge/config.d.ts.map +1 -0
- package/FillerGauge/index.d.ts.map +1 -0
- package/FillerGauge.js +656 -143
- package/FillerGauge.js.map +4 -4
- package/Image/Image.d.ts.map +1 -0
- package/Image/ImageApi.d.ts.map +1 -0
- package/Image/config.d.ts.map +1 -0
- package/Image/index.d.ts.map +1 -0
- package/Image.js +687 -113
- package/Image.js.map +4 -4
- package/LICENSE.md +0 -1
- package/Line/Line.d.ts.map +1 -0
- package/Line/config.d.ts.map +1 -0
- package/Line/index.d.ts.map +1 -0
- package/Line/lineUtils.d.ts.map +1 -0
- package/{dist/types/Line → Line}/mockdata/LineData.d.ts +59 -0
- package/Line/mockdata/LineData.d.ts.map +1 -0
- package/Line.config.js +0 -1
- package/Line.config.js.map +2 -2
- package/Line.js +817 -185
- package/Line.js.map +4 -4
- package/LinkGraph/ESTestDataSources.d.ts.map +1 -0
- package/LinkGraph/ESTestTemplate.d.ts.map +1 -0
- package/LinkGraph/LinkGraph.d.ts.map +1 -0
- package/{dist/types/LinkGraph → LinkGraph}/PureLinkGraph/PureLinkGraph.d.ts +5 -0
- package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts.map +1 -0
- package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts.map +1 -0
- package/LinkGraph/PureLinkGraph/components/Edges.d.ts.map +1 -0
- package/LinkGraph/PureLinkGraph/components/Field.d.ts.map +1 -0
- package/LinkGraph/PureLinkGraph/components/FieldStyles.d.ts.map +1 -0
- package/{dist/types/LinkGraph → LinkGraph}/PureLinkGraph/components/Graph.d.ts +9 -1
- package/LinkGraph/PureLinkGraph/components/Graph.d.ts.map +1 -0
- package/LinkGraph/PureLinkGraph/components/GraphStyles.d.ts.map +1 -0
- package/{dist/types/LinkGraph → LinkGraph}/PureLinkGraph/components/Node.d.ts +1 -0
- package/LinkGraph/PureLinkGraph/components/Node.d.ts.map +1 -0
- package/{dist/types/LinkGraph → LinkGraph}/PureLinkGraph/components/Nodes.d.ts +1 -0
- package/LinkGraph/PureLinkGraph/components/Nodes.d.ts.map +1 -0
- package/LinkGraph/PureLinkGraph/measurementUtils.d.ts +16 -0
- package/LinkGraph/PureLinkGraph/measurementUtils.d.ts.map +1 -0
- package/{dist/types/LinkGraph → LinkGraph}/PureLinkGraph/utils/iconLoader.d.ts.map +1 -1
- package/LinkGraph/config.d.ts.map +1 -0
- package/LinkGraph/index.d.ts.map +1 -0
- package/LinkGraph.config.js +15 -1
- package/LinkGraph.config.js.map +2 -2
- package/LinkGraph.js +1476 -657
- package/LinkGraph.js.map +4 -4
- package/{dist/types/Map → Map}/Map.d.ts +2 -2
- package/Map/Map.d.ts.map +1 -0
- package/{dist/types/Map → Map}/PureMap/BubbleLayer.d.ts +5 -0
- package/Map/PureMap/BubbleLayer.d.ts.map +1 -0
- package/Map/PureMap/ChoroplethLayer.d.ts.map +1 -0
- package/Map/PureMap/ClusterLayer.d.ts.map +1 -0
- package/Map/PureMap/LocalChoroplethLayer.d.ts.map +1 -0
- package/{dist/types/Map → Map}/PureMap/MapUtils.d.ts +10 -6
- package/Map/PureMap/MapUtils.d.ts.map +1 -0
- package/Map/PureMap/MarkerLayer.d.ts.map +1 -0
- package/Map/PureMap/MarkerWrapper.d.ts.map +1 -0
- package/Map/PureMap/PureMap.d.ts.map +1 -0
- package/Map/PureMap/PureMapContainer.d.ts.map +1 -0
- package/Map/PureMap/Tooltip.d.ts.map +1 -0
- package/{dist/types/Map → Map}/PureMap/mockdata/data.d.ts +21 -17
- package/Map/PureMap/mockdata/data.d.ts.map +1 -0
- package/Map/config.d.ts.map +1 -0
- package/Map/index.d.ts.map +1 -0
- package/Map.config.js +0 -1
- package/Map.config.js.map +2 -2
- package/Map.js +1002 -319
- package/Map.js.map +4 -4
- package/Markdown/Markdown.d.ts.map +1 -0
- package/Markdown/config.d.ts.map +1 -0
- package/Markdown/index.d.ts.map +1 -0
- package/Markdown.js +669 -98
- package/Markdown.js.map +4 -4
- package/{dist/types/MarkerGauge → MarkerGauge}/MarkerGauge.d.ts +5 -1
- package/MarkerGauge/MarkerGauge.d.ts.map +1 -0
- package/{dist/types/MarkerGauge → MarkerGauge}/PureMarkerGauge/MarkerGauge.d.ts +4 -0
- package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts.map +1 -0
- package/MarkerGauge/config.d.ts.map +1 -0
- package/MarkerGauge/index.d.ts.map +1 -0
- package/MarkerGauge.config.js +121 -3
- package/MarkerGauge.config.js.map +3 -3
- package/MarkerGauge.js +1439 -145
- 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/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 +123 -0
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -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 +6793 -0
- package/NetworkGraph.js.map +7 -0
- package/ParallelCoordinates/ParallelCoordinates.d.ts.map +1 -0
- package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts.map +1 -0
- package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesCanvas.d.ts.map +1 -0
- package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts.map +1 -0
- package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesPrompt.d.ts.map +1 -0
- package/ParallelCoordinates/config.d.ts.map +1 -0
- package/ParallelCoordinates/index.d.ts.map +1 -0
- package/ParallelCoordinates/mockdata/arrayValueData.d.ts.map +1 -0
- package/ParallelCoordinates/mockdata/sampleCarData.d.ts.map +1 -0
- package/ParallelCoordinates/mockdata/sampleCarNumericalData.d.ts.map +1 -0
- package/ParallelCoordinates/mockdata/sampleFoodData.d.ts.map +1 -0
- package/ParallelCoordinates/mockdata/sampleStringNumericalData.d.ts.map +1 -0
- package/ParallelCoordinates.js +666 -99
- package/ParallelCoordinates.js.map +4 -4
- package/Pie/Pie.d.ts.map +1 -0
- package/Pie/config.d.ts.map +1 -0
- package/Pie/index.d.ts.map +1 -0
- package/Pie/pieUtils.d.ts.map +1 -0
- package/Pie.config.js +13 -0
- package/Pie.config.js.map +2 -2
- package/Pie.js +744 -188
- package/Pie.js.map +4 -4
- package/Punchcard/Punchcard.d.ts.map +1 -0
- package/Punchcard/PurePunchcard/Punchcard.d.ts.map +1 -0
- package/Punchcard/PurePunchcard/src/PunchcardAxis.d.ts.map +1 -0
- package/Punchcard/PurePunchcard/src/PunchcardBubble.d.ts.map +1 -0
- package/Punchcard/PurePunchcard/src/PunchcardChartArea.d.ts.map +1 -0
- package/Punchcard/PurePunchcard/src/PunchcardGridLines.d.ts.map +1 -0
- package/Punchcard/PurePunchcard/src/PunchcardLegend.d.ts.map +1 -0
- package/Punchcard/PurePunchcard/src/PunchcardRow.d.ts.map +1 -0
- package/Punchcard/PurePunchcard/src/utils/punchcardUtils.d.ts.map +1 -0
- package/Punchcard/config.d.ts.map +1 -0
- package/Punchcard/index.d.ts.map +1 -0
- package/Punchcard/punchcardUtils.d.ts.map +1 -0
- package/Punchcard.js +663 -109
- package/Punchcard.js.map +4 -4
- package/README.md +1 -1
- package/Rectangle/Rectangle.d.ts.map +1 -0
- package/Rectangle/config.d.ts.map +1 -0
- package/Rectangle/index.d.ts.map +1 -0
- package/Rectangle.config.js +13 -22
- package/Rectangle.config.js.map +4 -4
- package/Rectangle.js +671 -138
- package/Rectangle.js.map +4 -4
- package/Sankey/PureSankey/PureSankey.d.ts.map +1 -0
- package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -0
- package/Sankey/PureSankey/SankeyModels.d.ts.map +1 -0
- package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -0
- package/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -0
- package/Sankey/PureSankey/SankeyUtils.d.ts.map +1 -0
- package/Sankey/PureSankey/mockdata/data.d.ts.map +1 -0
- package/Sankey/Sankey.d.ts.map +1 -0
- package/Sankey/config.d.ts.map +1 -0
- package/Sankey/index.d.ts.map +1 -0
- package/Sankey.js +683 -114
- package/Sankey.js.map +4 -4
- package/Scatter/Scatter.d.ts.map +1 -0
- package/Scatter/config.d.ts.map +1 -0
- package/Scatter/index.d.ts.map +1 -0
- package/Scatter/mockdata/data.d.ts.map +1 -0
- package/Scatter/scatterUtils.d.ts.map +1 -0
- package/Scatter.config.js +0 -1
- package/Scatter.config.js.map +2 -2
- package/Scatter.js +721 -184
- package/Scatter.js.map +4 -4
- package/SingleValue/SingleValue.d.ts.map +1 -0
- package/SingleValue/config.d.ts.map +1 -0
- package/SingleValue/index.d.ts.map +1 -0
- package/SingleValue.config.js +15 -2
- package/SingleValue.config.js.map +2 -2
- package/SingleValue.js +864 -226
- package/SingleValue.js.map +3 -3
- package/SingleValueBasic/index.d.ts.map +1 -0
- package/SingleValueBasic.js +22 -13
- package/SingleValueBasic.js.map +2 -2
- package/SingleValueIcon/SingleValueIcon.d.ts.map +1 -0
- package/SingleValueIcon/config.d.ts.map +1 -0
- package/SingleValueIcon/index.d.ts.map +1 -0
- package/SingleValueIcon.config.js +0 -1
- package/SingleValueIcon.config.js.map +2 -2
- package/SingleValueIcon.js +661 -142
- package/SingleValueIcon.js.map +3 -3
- package/SingleValueRadial/PureSingleValueRadial/GaugeGraph.d.ts.map +1 -0
- package/{dist/types/SingleValueRadial → SingleValueRadial}/PureSingleValueRadial/utils/gaugeUtils.d.ts +0 -8
- package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts.map +1 -0
- package/SingleValueRadial/SingleValueRadial.d.ts.map +1 -0
- package/SingleValueRadial/config.d.ts.map +1 -0
- package/SingleValueRadial/index.d.ts.map +1 -0
- package/SingleValueRadial.config.js +0 -1
- package/SingleValueRadial.config.js.map +2 -2
- package/SingleValueRadial.js +660 -140
- package/SingleValueRadial.js.map +4 -4
- package/SparkLine/index.d.ts.map +1 -0
- package/SparkLine.js +111 -45
- package/SparkLine.js.map +2 -2
- package/{dist/types/Table → Table}/PureTable.d.ts +10 -0
- package/Table/PureTable.d.ts.map +1 -0
- package/Table/Table.d.ts +18 -0
- package/Table/Table.d.ts.map +1 -0
- package/Table/cells/ArrayCell.d.ts.map +1 -0
- package/Table/cells/SparklineCell.d.ts.map +1 -0
- package/Table/cells/SwitchTableCell.d.ts.map +1 -0
- package/Table/cells/TextCell.d.ts.map +1 -0
- package/Table/cells/index.d.ts.map +1 -0
- package/Table/config.d.ts.map +1 -0
- package/{dist/types/Table → Table}/hooks.d.ts +5 -5
- package/Table/hooks.d.ts.map +1 -0
- package/Table/index.d.ts.map +1 -0
- package/Table.config.js +1 -1
- package/Table.config.js.map +2 -2
- package/Table.js +1115 -375
- package/Table.js.map +4 -4
- package/Timeline/PureTimeline/PureTimeline.d.ts.map +1 -0
- package/Timeline/PureTimeline/src/CursorPlugin.d.ts.map +1 -0
- package/Timeline/PureTimeline/src/TimelineLegend.d.ts.map +1 -0
- package/{dist/types/Timeline → Timeline}/PureTimeline/src/TimelinePlugin.d.ts +3 -1
- package/Timeline/PureTimeline/src/TimelinePlugin.d.ts.map +1 -0
- package/Timeline/PureTimeline/src/TimelineTooltip.d.ts.map +1 -0
- package/Timeline/PureTimeline/src/TimelineUplot.d.ts.map +1 -0
- package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -0
- package/{dist/types/Timeline → Timeline}/PureTimeline/src/XAxisPlugin.d.ts +2 -1
- package/Timeline/PureTimeline/src/XAxisPlugin.d.ts.map +1 -0
- package/{dist/types/Timeline → Timeline}/PureTimeline/src/utils/timelineUtils.d.ts +26 -2
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -0
- package/Timeline/Timeline.d.ts.map +1 -0
- package/Timeline/config.d.ts +4 -0
- package/Timeline/config.d.ts.map +1 -0
- package/Timeline/index.d.ts.map +1 -0
- package/Timeline/mockdata/basicTimelineData.d.ts.map +1 -0
- package/Timeline/mockdata/categoricalTimelineData.d.ts.map +1 -0
- package/Timeline/mockdata/timelineDataSource.d.ts.map +1 -0
- package/Timeline.config.js +30 -21
- package/Timeline.config.js.map +4 -4
- package/Timeline.js +1287 -467
- package/Timeline.js.map +4 -4
- package/{dist/types/common → common}/Charting.d.ts +7 -0
- package/common/Charting.d.ts.map +1 -0
- package/common/Charting.js +59 -34
- package/common/Charting.js.map +4 -4
- package/common/ChartingApi.d.ts.map +1 -0
- package/common/DocExampleWithVizSandbox.d.ts.map +1 -0
- package/common/DocExampleWithVizSandbox.js.map +1 -1
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.d.ts.map +1 -0
- package/common/OverviewDoc.js.map +1 -1
- package/common/SplunkVisualization.d.ts.map +1 -0
- package/common/SplunkVisualizationApi.d.ts.map +1 -0
- package/common/ThemedDefaults.d.ts.map +1 -0
- package/common/ThemesDoc.js +0 -1
- package/common/ThemesDoc.js.map +2 -2
- package/common/TimeSeriesChartWrapper.d.ts +31 -0
- package/common/TimeSeriesChartWrapper.d.ts.map +1 -0
- package/common/TimeSeriesChartWrapper.js +693 -74
- package/common/TimeSeriesChartWrapper.js.map +4 -4
- package/{dist/types/common → common}/chartingUtils.d.ts +55 -5
- package/common/chartingUtils.d.ts.map +1 -0
- package/common/chartingUtils.js +120 -9
- package/common/chartingUtils.js.map +3 -3
- package/common/components/IconPlaceholder.d.ts.map +1 -0
- package/common/components/MissingPropsMessage.d.ts.map +1 -0
- package/common/components/TrellisTitle.d.ts.map +1 -0
- package/common/configContext/singleValueContext.d.ts.map +1 -0
- package/common/docUtils.d.ts.map +1 -0
- package/common/docUtils.js +1 -1
- package/common/docUtils.js.map +2 -2
- package/common/editorConfig/AxesChartColorAndStyle.d.ts.map +1 -0
- package/common/editorConfig/AxesChartDataConfig.d.ts.map +1 -0
- package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -0
- package/common/editorConfig/AxesChartLegend.d.ts.map +1 -0
- package/common/editorConfig/AxesChartXGridAndLabels.d.ts.map +1 -0
- package/common/editorConfig/AxesChartY2GridAndLabels.d.ts.map +1 -0
- package/common/editorConfig/AxesChartYGridAndLabels.d.ts.map +1 -0
- package/common/editorConfig/BackgroundColor.d.ts.map +1 -0
- package/common/editorConfig/DynamicFillColorEditor.d.ts.map +1 -0
- package/common/editorConfig/DynamicGaugeColorEditor.d.ts.map +1 -0
- package/common/editorConfig/DynamicStrokeColorEditor.d.ts.map +1 -0
- package/common/editorConfig/Gauge.d.ts.map +1 -0
- package/common/editorConfig/Legend.d.ts.map +1 -0
- package/common/editorConfig/RadialBackgroundColor.d.ts.map +1 -0
- package/common/editorConfig/StaticFillColorEditor.d.ts.map +1 -0
- package/common/editorConfig/StaticGaugeColorEditor.d.ts.map +1 -0
- package/common/editorConfig/StaticStrokeColorEditor.d.ts.map +1 -0
- package/common/editorConfig/TrellisEditors.d.ts.map +1 -0
- package/common/gaugeUtils.d.ts.map +1 -0
- package/common/hocs/FixedSizeContainer.d.ts.map +1 -0
- package/common/hocs/mockdata/trellisData.d.ts.map +1 -0
- package/common/hocs/withEditModeCover.d.ts.map +1 -0
- package/common/hocs/withPlaceholder.d.ts.map +1 -0
- package/common/hocs/withTrellis.d.ts.map +1 -0
- package/common/hooks/useDeepMemo.d.ts.map +1 -0
- package/common/hooks/useDownsampleDataSources.d.ts.map +1 -0
- package/common/hooks/useEventCallback.d.ts.map +1 -0
- package/common/hooks/useGetXAndYFields.d.ts.map +1 -0
- package/common/hooks/usePagination.d.ts.map +1 -0
- package/common/hooks/usePrevious.d.ts.map +1 -0
- package/common/hooks/useSorting.d.ts.map +1 -0
- package/common/hooks/useTrellisEnabled.d.ts.map +1 -0
- package/common/interfaces/ChartEvent.d.ts.map +1 -0
- package/{dist/types/common → common}/interfaces/DashboardVizProps.d.ts +0 -3
- package/common/interfaces/DashboardVizProps.d.ts.map +1 -0
- package/common/interfaces/DataContract.d.ts.map +1 -0
- package/{dist/types/common → common}/interfaces/DataSource.d.ts +1 -1
- package/common/interfaces/DataSource.d.ts.map +1 -0
- package/common/interfaces/DefaultContext.d.ts.map +1 -0
- package/common/interfaces/Editor.d.ts.map +1 -0
- package/common/interfaces/ExtendedDashViz.d.ts.map +1 -0
- package/common/interfaces/Object.d.ts.map +1 -0
- package/common/interfaces/Overview.d.ts.map +1 -0
- package/common/interfaces/ThemedDefaults.d.ts.map +1 -0
- package/common/interfaces/VizActionHandler.d.ts.map +1 -0
- package/common/interfaces/VizBehavior.d.ts.map +1 -0
- package/common/interfaces/VizCategory.d.ts.map +1 -0
- package/common/interfaces/VizConfig.d.ts.map +1 -0
- package/common/interfaces/VizEvent.d.ts.map +1 -0
- package/common/interfaces/VizProps.d.ts.map +1 -0
- package/common/interfaces/VizRegistry.d.ts.map +1 -0
- package/common/interfaces/VizSize.d.ts.map +1 -0
- package/common/interfaces/VizStatus.d.ts.map +1 -0
- package/common/interfaces/index.d.ts.map +1 -0
- package/common/shapeUtils.d.ts.map +1 -0
- package/common/shapeUtils.js +5 -20
- package/common/shapeUtils.js.map +2 -2
- package/common/utils/configUtils.d.ts.map +1 -0
- package/common/utils/dataUtils.d.ts.map +1 -0
- package/common/utils/dataUtils.js +5 -4
- package/common/utils/dataUtils.js.map +2 -2
- package/common/utils/featureFlagUtils.d.ts +4 -0
- package/common/utils/featureFlagUtils.d.ts.map +1 -0
- package/common/utils/featureFlagUtils.js.map +2 -2
- package/common/utils/hocUtils.d.ts.map +1 -0
- package/common/utils/mapUtils.d.ts.map +1 -0
- 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/tableUtils.d.ts +10 -0
- package/common/utils/tableUtils.d.ts.map +1 -0
- package/common/utils/tableUtils.js +20 -8
- package/common/utils/tableUtils.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 -0
- package/common/utils/trellisUtils.js +12 -14
- package/common/utils/trellisUtils.js.map +2 -2
- package/common/utils/urlUtils.d.ts.map +1 -0
- package/{dist/types/common → common}/withDashboardViz.d.ts +7 -0
- package/common/withDashboardViz.d.ts.map +1 -0
- package/common/withDashboardViz.js +665 -87
- package/common/withDashboardViz.js.map +4 -4
- package/package.json +35 -29
- package/common/utils/styleUtils.js +0 -30
- package/common/utils/styleUtils.js.map +0 -7
- package/dist/types/Area/Area.d.ts.map +0 -1
- package/dist/types/Area/areaUtils.d.ts.map +0 -1
- package/dist/types/Area/config.d.ts.map +0 -1
- package/dist/types/Area/index.d.ts.map +0 -1
- package/dist/types/Bar/Bar.d.ts.map +0 -1
- package/dist/types/Bar/barUtils.d.ts.map +0 -1
- package/dist/types/Bar/config.d.ts.map +0 -1
- package/dist/types/Bar/index.d.ts.map +0 -1
- package/dist/types/Bubble/Bubble.d.ts.map +0 -1
- package/dist/types/Bubble/bubbleUtils.d.ts.map +0 -1
- package/dist/types/Bubble/config.d.ts.map +0 -1
- package/dist/types/Bubble/index.d.ts.map +0 -1
- package/dist/types/ChoroplethSvg/ChoroplethSvg.d.ts.map +0 -1
- package/dist/types/ChoroplethSvg/ErrorMessage/ErrorMessage.d.ts.map +0 -1
- package/dist/types/ChoroplethSvg/PureChoroplethSvg/PureChoroplethSvg.d.ts.map +0 -1
- package/dist/types/ChoroplethSvg/PureChoroplethSvg/SvgChoroplethDynamic.d.ts.map +0 -1
- package/dist/types/ChoroplethSvg/PureChoroplethSvg/SvgMutator.d.ts.map +0 -1
- package/dist/types/ChoroplethSvg/config.d.ts.map +0 -1
- package/dist/types/ChoroplethSvg/index.d.ts.map +0 -1
- package/dist/types/Column/Column.d.ts.map +0 -1
- package/dist/types/Column/columnUtils.d.ts.map +0 -1
- package/dist/types/Column/config.d.ts.map +0 -1
- package/dist/types/Column/index.d.ts.map +0 -1
- package/dist/types/Ellipse/Ellipse.d.ts.map +0 -1
- package/dist/types/Ellipse/config.d.ts.map +0 -1
- package/dist/types/Ellipse/index.d.ts.map +0 -1
- package/dist/types/Events/EventUtils.d.ts.map +0 -1
- package/dist/types/Events/Events.d.ts.map +0 -1
- package/dist/types/Events/PureEvents/FieldSummaryTooltip.d.ts.map +0 -1
- package/dist/types/Events/PureEvents/PureEvents.d.ts.map +0 -1
- package/dist/types/Events/PureEvents/TimeControlsPopover.d.ts.map +0 -1
- package/dist/types/Events/config.d.ts.map +0 -1
- package/dist/types/Events/index.d.ts.map +0 -1
- package/dist/types/FillerGauge/FillerGauge.d.ts.map +0 -1
- package/dist/types/FillerGauge/PureFillerGauge/FillerGauge.d.ts.map +0 -1
- package/dist/types/FillerGauge/config.d.ts.map +0 -1
- package/dist/types/FillerGauge/index.d.ts.map +0 -1
- package/dist/types/Image/Image.d.ts.map +0 -1
- package/dist/types/Image/ImageApi.d.ts.map +0 -1
- package/dist/types/Image/config.d.ts.map +0 -1
- package/dist/types/Image/index.d.ts.map +0 -1
- package/dist/types/Line/Line.d.ts.map +0 -1
- package/dist/types/Line/config.d.ts.map +0 -1
- package/dist/types/Line/index.d.ts.map +0 -1
- package/dist/types/Line/lineUtils.d.ts.map +0 -1
- package/dist/types/Line/mockdata/LineData.d.ts.map +0 -1
- package/dist/types/LinkGraph/ESTestDataSources.d.ts.map +0 -1
- package/dist/types/LinkGraph/ESTestTemplate.d.ts.map +0 -1
- package/dist/types/LinkGraph/LinkGraph.d.ts.map +0 -1
- package/dist/types/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts.map +0 -1
- package/dist/types/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts.map +0 -1
- package/dist/types/LinkGraph/PureLinkGraph/components/Edges.d.ts.map +0 -1
- package/dist/types/LinkGraph/PureLinkGraph/components/Field.d.ts.map +0 -1
- package/dist/types/LinkGraph/PureLinkGraph/components/FieldStyles.d.ts.map +0 -1
- package/dist/types/LinkGraph/PureLinkGraph/components/Graph.d.ts.map +0 -1
- package/dist/types/LinkGraph/PureLinkGraph/components/GraphStyles.d.ts.map +0 -1
- package/dist/types/LinkGraph/PureLinkGraph/components/Node.d.ts.map +0 -1
- package/dist/types/LinkGraph/PureLinkGraph/components/Nodes.d.ts.map +0 -1
- package/dist/types/LinkGraph/config.d.ts.map +0 -1
- package/dist/types/LinkGraph/index.d.ts.map +0 -1
- package/dist/types/Map/Map.d.ts.map +0 -1
- package/dist/types/Map/MapContextDefault.d.ts +0 -39
- package/dist/types/Map/MapContextDefault.d.ts.map +0 -1
- package/dist/types/Map/PureMap/BubbleLayer.d.ts.map +0 -1
- package/dist/types/Map/PureMap/ChoroplethLayer.d.ts.map +0 -1
- package/dist/types/Map/PureMap/ClusterLayer.d.ts.map +0 -1
- package/dist/types/Map/PureMap/LocalChoroplethLayer.d.ts.map +0 -1
- package/dist/types/Map/PureMap/MapUtils.d.ts.map +0 -1
- package/dist/types/Map/PureMap/MarkerLayer.d.ts.map +0 -1
- package/dist/types/Map/PureMap/MarkerWrapper.d.ts.map +0 -1
- package/dist/types/Map/PureMap/PureMap.d.ts.map +0 -1
- package/dist/types/Map/PureMap/PureMapContainer.d.ts.map +0 -1
- package/dist/types/Map/PureMap/Tooltip.d.ts.map +0 -1
- package/dist/types/Map/PureMap/mockdata/data.d.ts.map +0 -1
- package/dist/types/Map/config.d.ts.map +0 -1
- package/dist/types/Map/index.d.ts.map +0 -1
- package/dist/types/Markdown/Markdown.d.ts.map +0 -1
- package/dist/types/Markdown/config.d.ts.map +0 -1
- package/dist/types/Markdown/index.d.ts.map +0 -1
- package/dist/types/MarkerGauge/MarkerGauge.d.ts.map +0 -1
- package/dist/types/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts.map +0 -1
- package/dist/types/MarkerGauge/config.d.ts.map +0 -1
- package/dist/types/MarkerGauge/index.d.ts.map +0 -1
- package/dist/types/ParallelCoordinates/ParallelCoordinates.d.ts.map +0 -1
- package/dist/types/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts.map +0 -1
- package/dist/types/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesCanvas.d.ts.map +0 -1
- package/dist/types/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts.map +0 -1
- package/dist/types/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesPrompt.d.ts.map +0 -1
- package/dist/types/ParallelCoordinates/config.d.ts.map +0 -1
- package/dist/types/ParallelCoordinates/index.d.ts.map +0 -1
- package/dist/types/ParallelCoordinates/mockdata/arrayValueData.d.ts.map +0 -1
- package/dist/types/ParallelCoordinates/mockdata/sampleCarData.d.ts.map +0 -1
- package/dist/types/ParallelCoordinates/mockdata/sampleCarNumericalData.d.ts.map +0 -1
- package/dist/types/ParallelCoordinates/mockdata/sampleFoodData.d.ts.map +0 -1
- package/dist/types/ParallelCoordinates/mockdata/sampleStringNumericalData.d.ts.map +0 -1
- package/dist/types/Pie/Pie.d.ts.map +0 -1
- package/dist/types/Pie/config.d.ts.map +0 -1
- package/dist/types/Pie/index.d.ts.map +0 -1
- package/dist/types/Pie/pieUtils.d.ts.map +0 -1
- package/dist/types/Punchcard/Punchcard.d.ts.map +0 -1
- package/dist/types/Punchcard/PurePunchcard/Punchcard.d.ts.map +0 -1
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardAxis.d.ts.map +0 -1
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardBubble.d.ts.map +0 -1
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardChartArea.d.ts.map +0 -1
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardGridLines.d.ts.map +0 -1
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardLegend.d.ts.map +0 -1
- package/dist/types/Punchcard/PurePunchcard/src/PunchcardRow.d.ts.map +0 -1
- package/dist/types/Punchcard/PurePunchcard/src/utils/punchcardUtils.d.ts.map +0 -1
- package/dist/types/Punchcard/config.d.ts.map +0 -1
- package/dist/types/Punchcard/index.d.ts.map +0 -1
- package/dist/types/Punchcard/punchcardUtils.d.ts.map +0 -1
- package/dist/types/Rectangle/Rectangle.d.ts.map +0 -1
- package/dist/types/Rectangle/config.d.ts.map +0 -1
- package/dist/types/Rectangle/index.d.ts.map +0 -1
- package/dist/types/Sankey/PureSankey/PureSankey.d.ts.map +0 -1
- package/dist/types/Sankey/PureSankey/SankeyLink.d.ts.map +0 -1
- package/dist/types/Sankey/PureSankey/SankeyModels.d.ts.map +0 -1
- package/dist/types/Sankey/PureSankey/SankeyNode.d.ts.map +0 -1
- package/dist/types/Sankey/PureSankey/SankeyTooltip.d.ts.map +0 -1
- package/dist/types/Sankey/PureSankey/SankeyUtils.d.ts.map +0 -1
- package/dist/types/Sankey/PureSankey/mockdata/data.d.ts.map +0 -1
- package/dist/types/Sankey/Sankey.d.ts.map +0 -1
- package/dist/types/Sankey/config.d.ts.map +0 -1
- package/dist/types/Sankey/index.d.ts.map +0 -1
- package/dist/types/Scatter/Scatter.d.ts.map +0 -1
- package/dist/types/Scatter/config.d.ts.map +0 -1
- package/dist/types/Scatter/index.d.ts.map +0 -1
- package/dist/types/Scatter/mockdata/data.d.ts.map +0 -1
- package/dist/types/Scatter/scatterUtils.d.ts.map +0 -1
- package/dist/types/SingleValue/SingleValue.d.ts.map +0 -1
- package/dist/types/SingleValue/config.d.ts.map +0 -1
- package/dist/types/SingleValue/index.d.ts.map +0 -1
- package/dist/types/SingleValueBasic/index.d.ts.map +0 -1
- package/dist/types/SingleValueIcon/SingleValueIcon.d.ts.map +0 -1
- package/dist/types/SingleValueIcon/config.d.ts.map +0 -1
- package/dist/types/SingleValueIcon/index.d.ts.map +0 -1
- package/dist/types/SingleValueRadial/PureSingleValueRadial/GaugeGraph.d.ts.map +0 -1
- package/dist/types/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts.map +0 -1
- package/dist/types/SingleValueRadial/SingleValueRadial.d.ts.map +0 -1
- package/dist/types/SingleValueRadial/config.d.ts.map +0 -1
- package/dist/types/SingleValueRadial/index.d.ts.map +0 -1
- package/dist/types/SparkLine/index.d.ts.map +0 -1
- package/dist/types/Table/PureTable.d.ts.map +0 -1
- package/dist/types/Table/Table.d.ts +0 -10
- package/dist/types/Table/Table.d.ts.map +0 -1
- package/dist/types/Table/cells/ArrayCell.d.ts.map +0 -1
- package/dist/types/Table/cells/SparklineCell.d.ts.map +0 -1
- package/dist/types/Table/cells/SwitchTableCell.d.ts.map +0 -1
- package/dist/types/Table/cells/TextCell.d.ts.map +0 -1
- package/dist/types/Table/cells/index.d.ts.map +0 -1
- package/dist/types/Table/config.d.ts.map +0 -1
- package/dist/types/Table/hooks.d.ts.map +0 -1
- package/dist/types/Table/index.d.ts.map +0 -1
- package/dist/types/Timeline/PureTimeline/PureTimeline.d.ts.map +0 -1
- package/dist/types/Timeline/PureTimeline/src/CursorPlugin.d.ts.map +0 -1
- package/dist/types/Timeline/PureTimeline/src/TimelineLegend.d.ts.map +0 -1
- package/dist/types/Timeline/PureTimeline/src/TimelinePlugin.d.ts.map +0 -1
- package/dist/types/Timeline/PureTimeline/src/TimelineTooltip.d.ts.map +0 -1
- package/dist/types/Timeline/PureTimeline/src/TimelineUplot.d.ts.map +0 -1
- package/dist/types/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +0 -1
- package/dist/types/Timeline/PureTimeline/src/XAxisPlugin.d.ts.map +0 -1
- package/dist/types/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +0 -1
- package/dist/types/Timeline/Timeline.d.ts.map +0 -1
- package/dist/types/Timeline/config.d.ts.map +0 -1
- package/dist/types/Timeline/index.d.ts.map +0 -1
- package/dist/types/Timeline/mockdata/basicTimelineData.d.ts.map +0 -1
- package/dist/types/Timeline/mockdata/categoricalTimelineData.d.ts.map +0 -1
- package/dist/types/Timeline/mockdata/timelineDataSource.d.ts.map +0 -1
- package/dist/types/common/Charting.d.ts.map +0 -1
- package/dist/types/common/ChartingApi.d.ts.map +0 -1
- package/dist/types/common/DocExampleWithVizSandbox.d.ts.map +0 -1
- package/dist/types/common/OverviewDoc.d.ts.map +0 -1
- package/dist/types/common/SplunkVisualization.d.ts.map +0 -1
- package/dist/types/common/SplunkVisualizationApi.d.ts.map +0 -1
- package/dist/types/common/ThemedDefaults.d.ts.map +0 -1
- package/dist/types/common/TimeSeriesChartWrapper.d.ts +0 -7
- package/dist/types/common/TimeSeriesChartWrapper.d.ts.map +0 -1
- package/dist/types/common/chartingUtils.d.ts.map +0 -1
- package/dist/types/common/components/IconPlaceholder.d.ts.map +0 -1
- package/dist/types/common/components/MissingPropsMessage.d.ts.map +0 -1
- package/dist/types/common/components/TrellisTitle.d.ts.map +0 -1
- package/dist/types/common/configContext/singleValueContext.d.ts.map +0 -1
- package/dist/types/common/docUtils.d.ts.map +0 -1
- package/dist/types/common/editorConfig/AxesChartColorAndStyle.d.ts.map +0 -1
- package/dist/types/common/editorConfig/AxesChartDataConfig.d.ts.map +0 -1
- package/dist/types/common/editorConfig/AxesChartDataDisplay.d.ts.map +0 -1
- package/dist/types/common/editorConfig/AxesChartLegend.d.ts.map +0 -1
- package/dist/types/common/editorConfig/AxesChartXGridAndLabels.d.ts.map +0 -1
- package/dist/types/common/editorConfig/AxesChartY2GridAndLabels.d.ts.map +0 -1
- package/dist/types/common/editorConfig/AxesChartYGridAndLabels.d.ts.map +0 -1
- package/dist/types/common/editorConfig/BackgroundColor.d.ts.map +0 -1
- package/dist/types/common/editorConfig/DynamicFillColorEditor.d.ts.map +0 -1
- package/dist/types/common/editorConfig/DynamicGaugeColorEditor.d.ts.map +0 -1
- package/dist/types/common/editorConfig/DynamicStrokeColorEditor.d.ts.map +0 -1
- package/dist/types/common/editorConfig/Gauge.d.ts.map +0 -1
- package/dist/types/common/editorConfig/Legend.d.ts.map +0 -1
- package/dist/types/common/editorConfig/RadialBackgroundColor.d.ts.map +0 -1
- package/dist/types/common/editorConfig/StaticFillColorEditor.d.ts.map +0 -1
- package/dist/types/common/editorConfig/StaticGaugeColorEditor.d.ts.map +0 -1
- package/dist/types/common/editorConfig/StaticStrokeColorEditor.d.ts.map +0 -1
- package/dist/types/common/editorConfig/TrellisEditors.d.ts.map +0 -1
- package/dist/types/common/gaugeUtils.d.ts.map +0 -1
- package/dist/types/common/hocs/FixedSizeContainer.d.ts.map +0 -1
- package/dist/types/common/hocs/mockdata/trellisData.d.ts.map +0 -1
- package/dist/types/common/hocs/withEditModeCover.d.ts.map +0 -1
- package/dist/types/common/hocs/withPlaceholder.d.ts.map +0 -1
- package/dist/types/common/hocs/withTrellis.d.ts.map +0 -1
- package/dist/types/common/hooks/useDeepMemo.d.ts.map +0 -1
- package/dist/types/common/hooks/useDownsampleDataSources.d.ts.map +0 -1
- package/dist/types/common/hooks/useEventCallback.d.ts.map +0 -1
- package/dist/types/common/hooks/useGetXAndYFields.d.ts.map +0 -1
- package/dist/types/common/hooks/usePagination.d.ts.map +0 -1
- package/dist/types/common/hooks/usePrevious.d.ts.map +0 -1
- package/dist/types/common/hooks/useSorting.d.ts.map +0 -1
- package/dist/types/common/hooks/useTrellisEnabled.d.ts.map +0 -1
- package/dist/types/common/interfaces/ChartEvent.d.ts.map +0 -1
- package/dist/types/common/interfaces/DashboardVizProps.d.ts.map +0 -1
- package/dist/types/common/interfaces/DataContract.d.ts.map +0 -1
- package/dist/types/common/interfaces/DataSource.d.ts.map +0 -1
- package/dist/types/common/interfaces/DefaultContext.d.ts.map +0 -1
- package/dist/types/common/interfaces/Editor.d.ts.map +0 -1
- package/dist/types/common/interfaces/ExtendedDashViz.d.ts.map +0 -1
- package/dist/types/common/interfaces/Object.d.ts.map +0 -1
- package/dist/types/common/interfaces/Overview.d.ts.map +0 -1
- package/dist/types/common/interfaces/ThemedDefaults.d.ts.map +0 -1
- package/dist/types/common/interfaces/VizActionHandler.d.ts.map +0 -1
- package/dist/types/common/interfaces/VizBehavior.d.ts.map +0 -1
- package/dist/types/common/interfaces/VizCategory.d.ts.map +0 -1
- package/dist/types/common/interfaces/VizConfig.d.ts.map +0 -1
- package/dist/types/common/interfaces/VizEvent.d.ts.map +0 -1
- package/dist/types/common/interfaces/VizProps.d.ts.map +0 -1
- package/dist/types/common/interfaces/VizRegistry.d.ts.map +0 -1
- package/dist/types/common/interfaces/VizSize.d.ts.map +0 -1
- package/dist/types/common/interfaces/VizStatus.d.ts.map +0 -1
- package/dist/types/common/interfaces/index.d.ts.map +0 -1
- package/dist/types/common/shapeUtils.d.ts.map +0 -1
- package/dist/types/common/utils/configUtils.d.ts.map +0 -1
- package/dist/types/common/utils/dataUtils.d.ts.map +0 -1
- package/dist/types/common/utils/featureFlagUtils.d.ts +0 -3
- package/dist/types/common/utils/featureFlagUtils.d.ts.map +0 -1
- package/dist/types/common/utils/hocUtils.d.ts.map +0 -1
- package/dist/types/common/utils/mapUtils.d.ts.map +0 -1
- package/dist/types/common/utils/styleUtils.d.ts +0 -2
- package/dist/types/common/utils/styleUtils.d.ts.map +0 -1
- package/dist/types/common/utils/tableUtils.d.ts +0 -3
- package/dist/types/common/utils/tableUtils.d.ts.map +0 -1
- package/dist/types/common/utils/trellisUtils.d.ts.map +0 -1
- package/dist/types/common/utils/urlUtils.d.ts.map +0 -1
- package/dist/types/common/withDashboardViz.d.ts.map +0 -1
- /package/{dist/types/Area → Area}/Area.d.ts +0 -0
- /package/{dist/types/Area → Area}/areaUtils.d.ts +0 -0
- /package/{dist/types/Area → Area}/config.d.ts +0 -0
- /package/{dist/types/Area → Area}/index.d.ts +0 -0
- /package/{dist/types/Bar → Bar}/Bar.d.ts +0 -0
- /package/{dist/types/Bar → Bar}/barUtils.d.ts +0 -0
- /package/{dist/types/Bar → Bar}/config.d.ts +0 -0
- /package/{dist/types/Bar → Bar}/index.d.ts +0 -0
- /package/{dist/types/Bubble → Bubble}/Bubble.d.ts +0 -0
- /package/{dist/types/Bubble → Bubble}/bubbleUtils.d.ts +0 -0
- /package/{dist/types/Bubble → Bubble}/config.d.ts +0 -0
- /package/{dist/types/Bubble → Bubble}/index.d.ts +0 -0
- /package/{dist/types/ChoroplethSvg → ChoroplethSvg}/ErrorMessage/ErrorMessage.d.ts +0 -0
- /package/{dist/types/ChoroplethSvg → ChoroplethSvg}/PureChoroplethSvg/PureChoroplethSvg.d.ts +0 -0
- /package/{dist/types/ChoroplethSvg → ChoroplethSvg}/PureChoroplethSvg/SvgChoroplethDynamic.d.ts +0 -0
- /package/{dist/types/ChoroplethSvg → ChoroplethSvg}/PureChoroplethSvg/SvgMutator.d.ts +0 -0
- /package/{dist/types/ChoroplethSvg → ChoroplethSvg}/config.d.ts +0 -0
- /package/{dist/types/ChoroplethSvg → ChoroplethSvg}/index.d.ts +0 -0
- /package/{dist/types/Column → Column}/Column.d.ts +0 -0
- /package/{dist/types/Column → Column}/columnUtils.d.ts +0 -0
- /package/{dist/types/Column → Column}/config.d.ts +0 -0
- /package/{dist/types/Column → Column}/index.d.ts +0 -0
- /package/{dist/types/Ellipse → Ellipse}/Ellipse.d.ts +0 -0
- /package/{dist/types/Ellipse → Ellipse}/config.d.ts +0 -0
- /package/{dist/types/Ellipse → Ellipse}/index.d.ts +0 -0
- /package/{dist/types/Events → Events}/EventUtils.d.ts +0 -0
- /package/{dist/types/Events → Events}/Events.d.ts +0 -0
- /package/{dist/types/Events → Events}/PureEvents/FieldSummaryTooltip.d.ts +0 -0
- /package/{dist/types/Events → Events}/PureEvents/PureEvents.d.ts +0 -0
- /package/{dist/types/Events → Events}/PureEvents/TimeControlsPopover.d.ts +0 -0
- /package/{dist/types/Events → Events}/config.d.ts +0 -0
- /package/{dist/types/Events → Events}/index.d.ts +0 -0
- /package/{dist/types/FillerGauge → FillerGauge}/FillerGauge.d.ts +0 -0
- /package/{dist/types/FillerGauge → FillerGauge}/PureFillerGauge/FillerGauge.d.ts +0 -0
- /package/{dist/types/FillerGauge → FillerGauge}/config.d.ts +0 -0
- /package/{dist/types/FillerGauge → FillerGauge}/index.d.ts +0 -0
- /package/{dist/types/Image → Image}/Image.d.ts +0 -0
- /package/{dist/types/Image → Image}/ImageApi.d.ts +0 -0
- /package/{dist/types/Image → Image}/config.d.ts +0 -0
- /package/{dist/types/Image → Image}/index.d.ts +0 -0
- /package/{dist/types/Line → Line}/Line.d.ts +0 -0
- /package/{dist/types/Line → Line}/config.d.ts +0 -0
- /package/{dist/types/Line → Line}/index.d.ts +0 -0
- /package/{dist/types/Line → Line}/lineUtils.d.ts +0 -0
- /package/{dist/types/LinkGraph → LinkGraph}/ESTestDataSources.d.ts +0 -0
- /package/{dist/types/LinkGraph → LinkGraph}/ESTestTemplate.d.ts +0 -0
- /package/{dist/types/LinkGraph → LinkGraph}/LinkGraph.d.ts +0 -0
- /package/{dist/types/LinkGraph → LinkGraph}/PureLinkGraph/PureLinkGraphUtils.d.ts +0 -0
- /package/{dist/types/LinkGraph → LinkGraph}/PureLinkGraph/components/Edges.d.ts +0 -0
- /package/{dist/types/LinkGraph → LinkGraph}/PureLinkGraph/components/Field.d.ts +0 -0
- /package/{dist/types/LinkGraph → LinkGraph}/PureLinkGraph/components/FieldStyles.d.ts +0 -0
- /package/{dist/types/LinkGraph → LinkGraph}/PureLinkGraph/components/GraphStyles.d.ts +0 -0
- /package/{dist/types/LinkGraph → LinkGraph}/PureLinkGraph/utils/iconLoader.d.ts +0 -0
- /package/{dist/types/LinkGraph → LinkGraph}/config.d.ts +0 -0
- /package/{dist/types/LinkGraph → LinkGraph}/index.d.ts +0 -0
- /package/{dist/types/Map → Map}/PureMap/ChoroplethLayer.d.ts +0 -0
- /package/{dist/types/Map → Map}/PureMap/ClusterLayer.d.ts +0 -0
- /package/{dist/types/Map → Map}/PureMap/LocalChoroplethLayer.d.ts +0 -0
- /package/{dist/types/Map → Map}/PureMap/MarkerLayer.d.ts +0 -0
- /package/{dist/types/Map → Map}/PureMap/MarkerWrapper.d.ts +0 -0
- /package/{dist/types/Map → Map}/PureMap/PureMap.d.ts +0 -0
- /package/{dist/types/Map → Map}/PureMap/PureMapContainer.d.ts +0 -0
- /package/{dist/types/Map → Map}/PureMap/Tooltip.d.ts +0 -0
- /package/{dist/types/Map → Map}/config.d.ts +0 -0
- /package/{dist/types/Map → Map}/index.d.ts +0 -0
- /package/{dist/types/Markdown → Markdown}/Markdown.d.ts +0 -0
- /package/{dist/types/Markdown → Markdown}/config.d.ts +0 -0
- /package/{dist/types/Markdown → Markdown}/index.d.ts +0 -0
- /package/{dist/types/MarkerGauge → MarkerGauge}/config.d.ts +0 -0
- /package/{dist/types/MarkerGauge → MarkerGauge}/index.d.ts +0 -0
- /package/{dist/types/ParallelCoordinates → NetworkGraph}/config.d.ts +0 -0
- /package/{dist/types/ParallelCoordinates → ParallelCoordinates}/ParallelCoordinates.d.ts +0 -0
- /package/{dist/types/ParallelCoordinates → ParallelCoordinates}/PureParallelCoordinates/PureParallelCoordinates.d.ts +0 -0
- /package/{dist/types/ParallelCoordinates → ParallelCoordinates}/PureParallelCoordinates/src/ParallelCoordinatesCanvas.d.ts +0 -0
- /package/{dist/types/ParallelCoordinates → ParallelCoordinates}/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts +0 -0
- /package/{dist/types/ParallelCoordinates → ParallelCoordinates}/PureParallelCoordinates/src/ParallelCoordinatesPrompt.d.ts +0 -0
- /package/{dist/types/Pie → ParallelCoordinates}/config.d.ts +0 -0
- /package/{dist/types/ParallelCoordinates → ParallelCoordinates}/index.d.ts +0 -0
- /package/{dist/types/ParallelCoordinates → ParallelCoordinates}/mockdata/arrayValueData.d.ts +0 -0
- /package/{dist/types/ParallelCoordinates → ParallelCoordinates}/mockdata/sampleCarData.d.ts +0 -0
- /package/{dist/types/ParallelCoordinates → ParallelCoordinates}/mockdata/sampleCarNumericalData.d.ts +0 -0
- /package/{dist/types/ParallelCoordinates → ParallelCoordinates}/mockdata/sampleFoodData.d.ts +0 -0
- /package/{dist/types/ParallelCoordinates → ParallelCoordinates}/mockdata/sampleStringNumericalData.d.ts +0 -0
- /package/{dist/types/Pie → Pie}/Pie.d.ts +0 -0
- /package/{dist/types/Punchcard → Pie}/config.d.ts +0 -0
- /package/{dist/types/Pie → Pie}/index.d.ts +0 -0
- /package/{dist/types/Pie → Pie}/pieUtils.d.ts +0 -0
- /package/{dist/types/Punchcard → Punchcard}/Punchcard.d.ts +0 -0
- /package/{dist/types/Punchcard → Punchcard}/PurePunchcard/Punchcard.d.ts +0 -0
- /package/{dist/types/Punchcard → Punchcard}/PurePunchcard/src/PunchcardAxis.d.ts +0 -0
- /package/{dist/types/Punchcard → Punchcard}/PurePunchcard/src/PunchcardBubble.d.ts +0 -0
- /package/{dist/types/Punchcard → Punchcard}/PurePunchcard/src/PunchcardChartArea.d.ts +0 -0
- /package/{dist/types/Punchcard → Punchcard}/PurePunchcard/src/PunchcardGridLines.d.ts +0 -0
- /package/{dist/types/Punchcard → Punchcard}/PurePunchcard/src/PunchcardLegend.d.ts +0 -0
- /package/{dist/types/Punchcard → Punchcard}/PurePunchcard/src/PunchcardRow.d.ts +0 -0
- /package/{dist/types/Punchcard → Punchcard}/PurePunchcard/src/utils/punchcardUtils.d.ts +0 -0
- /package/{dist/types/Rectangle → Punchcard}/config.d.ts +0 -0
- /package/{dist/types/Punchcard → Punchcard}/index.d.ts +0 -0
- /package/{dist/types/Punchcard → Punchcard}/punchcardUtils.d.ts +0 -0
- /package/{dist/types/Rectangle → Rectangle}/Rectangle.d.ts +0 -0
- /package/{dist/types/Sankey → Rectangle}/config.d.ts +0 -0
- /package/{dist/types/Rectangle → Rectangle}/index.d.ts +0 -0
- /package/{dist/types/Sankey → Sankey}/PureSankey/PureSankey.d.ts +0 -0
- /package/{dist/types/Sankey → Sankey}/PureSankey/SankeyLink.d.ts +0 -0
- /package/{dist/types/Sankey → Sankey}/PureSankey/SankeyModels.d.ts +0 -0
- /package/{dist/types/Sankey → Sankey}/PureSankey/SankeyNode.d.ts +0 -0
- /package/{dist/types/Sankey → Sankey}/PureSankey/SankeyTooltip.d.ts +0 -0
- /package/{dist/types/Sankey → Sankey}/PureSankey/SankeyUtils.d.ts +0 -0
- /package/{dist/types/Sankey → Sankey}/PureSankey/mockdata/data.d.ts +0 -0
- /package/{dist/types/Sankey → Sankey}/Sankey.d.ts +0 -0
- /package/{dist/types/Scatter → Sankey}/config.d.ts +0 -0
- /package/{dist/types/Sankey → Sankey}/index.d.ts +0 -0
- /package/{dist/types/Scatter → Scatter}/Scatter.d.ts +0 -0
- /package/{dist/types/SingleValue → Scatter}/config.d.ts +0 -0
- /package/{dist/types/Scatter → Scatter}/index.d.ts +0 -0
- /package/{dist/types/Scatter → Scatter}/mockdata/data.d.ts +0 -0
- /package/{dist/types/Scatter → Scatter}/scatterUtils.d.ts +0 -0
- /package/{dist/types/SingleValue → SingleValue}/SingleValue.d.ts +0 -0
- /package/{dist/types/SingleValueIcon → SingleValue}/config.d.ts +0 -0
- /package/{dist/types/SingleValue → SingleValue}/index.d.ts +0 -0
- /package/{dist/types/SingleValueBasic → SingleValueBasic}/index.d.ts +0 -0
- /package/{dist/types/SingleValueIcon → SingleValueIcon}/SingleValueIcon.d.ts +0 -0
- /package/{dist/types/SingleValueRadial → SingleValueIcon}/config.d.ts +0 -0
- /package/{dist/types/SingleValueIcon → SingleValueIcon}/index.d.ts +0 -0
- /package/{dist/types/SingleValueRadial → SingleValueRadial}/PureSingleValueRadial/GaugeGraph.d.ts +0 -0
- /package/{dist/types/SingleValueRadial → SingleValueRadial}/SingleValueRadial.d.ts +0 -0
- /package/{dist/types/Table → SingleValueRadial}/config.d.ts +0 -0
- /package/{dist/types/SingleValueRadial → SingleValueRadial}/index.d.ts +0 -0
- /package/{dist/types/SparkLine → SparkLine}/index.d.ts +0 -0
- /package/{dist/types/Table → Table}/cells/ArrayCell.d.ts +0 -0
- /package/{dist/types/Table → Table}/cells/SparklineCell.d.ts +0 -0
- /package/{dist/types/Table → Table}/cells/SwitchTableCell.d.ts +0 -0
- /package/{dist/types/Table → Table}/cells/TextCell.d.ts +0 -0
- /package/{dist/types/Table → Table}/cells/index.d.ts +0 -0
- /package/{dist/types/Timeline → Table}/config.d.ts +0 -0
- /package/{dist/types/Table → Table}/index.d.ts +0 -0
- /package/{dist/types/Timeline → Timeline}/PureTimeline/PureTimeline.d.ts +0 -0
- /package/{dist/types/Timeline → Timeline}/PureTimeline/src/CursorPlugin.d.ts +0 -0
- /package/{dist/types/Timeline → Timeline}/PureTimeline/src/TimelineLegend.d.ts +0 -0
- /package/{dist/types/Timeline → Timeline}/PureTimeline/src/TimelineTooltip.d.ts +0 -0
- /package/{dist/types/Timeline → Timeline}/PureTimeline/src/TimelineUplot.d.ts +0 -0
- /package/{dist/types/Timeline → Timeline}/PureTimeline/src/TimelineYAxis.d.ts +0 -0
- /package/{dist/types/Timeline → Timeline}/Timeline.d.ts +0 -0
- /package/{dist/types/Timeline → Timeline}/index.d.ts +0 -0
- /package/{dist/types/Timeline → Timeline}/mockdata/basicTimelineData.d.ts +0 -0
- /package/{dist/types/Timeline → Timeline}/mockdata/categoricalTimelineData.d.ts +0 -0
- /package/{dist/types/Timeline → Timeline}/mockdata/timelineDataSource.d.ts +0 -0
- /package/{dist/types/common → common}/ChartingApi.d.ts +0 -0
- /package/{dist/types/common → common}/DocExampleWithVizSandbox.d.ts +0 -0
- /package/{dist/types/common → common}/OverviewDoc.d.ts +0 -0
- /package/{dist/types/common → common}/SplunkVisualization.d.ts +0 -0
- /package/{dist/types/common → common}/SplunkVisualizationApi.d.ts +0 -0
- /package/{dist/types/common → common}/ThemedDefaults.d.ts +0 -0
- /package/{dist/types/common → common}/components/IconPlaceholder.d.ts +0 -0
- /package/{dist/types/common → common}/components/MissingPropsMessage.d.ts +0 -0
- /package/{dist/types/common → common}/components/TrellisTitle.d.ts +0 -0
- /package/{dist/types/common → common}/configContext/singleValueContext.d.ts +0 -0
- /package/{dist/types/common → common}/docUtils.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/AxesChartColorAndStyle.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/AxesChartDataConfig.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/AxesChartDataDisplay.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/AxesChartLegend.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/AxesChartXGridAndLabels.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/AxesChartY2GridAndLabels.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/AxesChartYGridAndLabels.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/BackgroundColor.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/DynamicFillColorEditor.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/DynamicGaugeColorEditor.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/DynamicStrokeColorEditor.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/Gauge.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/Legend.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/RadialBackgroundColor.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/StaticFillColorEditor.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/StaticGaugeColorEditor.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/StaticStrokeColorEditor.d.ts +0 -0
- /package/{dist/types/common → common}/editorConfig/TrellisEditors.d.ts +0 -0
- /package/{dist/types/common → common}/gaugeUtils.d.ts +0 -0
- /package/{dist/types/common → common}/hocs/FixedSizeContainer.d.ts +0 -0
- /package/{dist/types/common → common}/hocs/mockdata/trellisData.d.ts +0 -0
- /package/{dist/types/common → common}/hocs/withEditModeCover.d.ts +0 -0
- /package/{dist/types/common → common}/hocs/withPlaceholder.d.ts +0 -0
- /package/{dist/types/common → common}/hocs/withTrellis.d.ts +0 -0
- /package/{dist/types/common → common}/hooks/useDeepMemo.d.ts +0 -0
- /package/{dist/types/common → common}/hooks/useDownsampleDataSources.d.ts +0 -0
- /package/{dist/types/common → common}/hooks/useEventCallback.d.ts +0 -0
- /package/{dist/types/common → common}/hooks/useGetXAndYFields.d.ts +0 -0
- /package/{dist/types/common → common}/hooks/usePagination.d.ts +0 -0
- /package/{dist/types/common → common}/hooks/usePrevious.d.ts +0 -0
- /package/{dist/types/common → common}/hooks/useSorting.d.ts +0 -0
- /package/{dist/types/common → common}/hooks/useTrellisEnabled.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/ChartEvent.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/DataContract.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/DefaultContext.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/Editor.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/ExtendedDashViz.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/Object.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/Overview.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/ThemedDefaults.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/VizActionHandler.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/VizBehavior.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/VizCategory.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/VizConfig.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/VizEvent.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/VizProps.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/VizRegistry.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/VizSize.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/VizStatus.d.ts +0 -0
- /package/{dist/types/common → common}/interfaces/index.d.ts +0 -0
- /package/{dist/types/common → common}/shapeUtils.d.ts +0 -0
- /package/{dist/types/common → common}/utils/configUtils.d.ts +0 -0
- /package/{dist/types/common → common}/utils/dataUtils.d.ts +0 -0
- /package/{dist/types/common → common}/utils/hocUtils.d.ts +0 -0
- /package/{dist/types/common → common}/utils/mapUtils.d.ts +0 -0
- /package/{dist/types/common → common}/utils/trellisUtils.d.ts +0 -0
- /package/{dist/types/common → common}/utils/urlUtils.d.ts +0 -0
package/SingleValue.js
CHANGED
|
@@ -344,7 +344,6 @@ var computeText = ({
|
|
|
344
344
|
}) => {
|
|
345
345
|
let text = (0, numberUtils_exports.isNumerial)(value) ? (0, numberUtils_exports.formatNumber)(value, numberPrecision, {
|
|
346
346
|
useThousandSeparators: shouldUseThousandSeparators,
|
|
347
|
-
// todo: need update formatNumber
|
|
348
347
|
useTrendUnits: shouldAbbreviateValue
|
|
349
348
|
}) : value;
|
|
350
349
|
text = text || "";
|
|
@@ -653,16 +652,19 @@ var changeColor = (color, ratio) => {
|
|
|
653
652
|
return `#${newR.toString(16).padStart(2, 0)}${newG.toString(16).padStart(2, 0)}${newB.toString(16).padStart(2, 0)}`;
|
|
654
653
|
};
|
|
655
654
|
var darken = (color) => changeColor(color, 0.5);
|
|
656
|
-
var handleValueClickCallback = (ev, majorValue, majorValueField, trendValue, onValueClick,
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
655
|
+
var handleValueClickCallback = (ev, majorValue, majorValueField, trendValue, onValueClick, trellisContext = {}) => {
|
|
656
|
+
const { trellisEnabled = false, trellisSplitBy = "", trellisKey = "" } = trellisContext;
|
|
657
|
+
return onValueClick(__spreadProps(__spreadValues({}, ev), {
|
|
658
|
+
payload: __spreadValues({
|
|
659
|
+
trendValue,
|
|
660
|
+
value: majorValue,
|
|
661
|
+
name: majorValueField
|
|
662
|
+
}, trellisEnabled && {
|
|
663
|
+
"trellis.name": trellisSplitBy,
|
|
664
|
+
"trellis.value": trellisKey
|
|
665
|
+
})
|
|
666
|
+
}));
|
|
667
|
+
};
|
|
666
668
|
var getTrendColorWithPercent = (options) => {
|
|
667
669
|
const shouldUsePercentTrendColor = options.trendColor === "> trendValue | rangeValue(trendColorEditorConfig)" && options.trendDisplay === "percent";
|
|
668
670
|
return shouldUsePercentTrendColor ? {
|
|
@@ -782,6 +784,12 @@ var Text2 = styled_components_default.div`
|
|
|
782
784
|
}`;
|
|
783
785
|
}}
|
|
784
786
|
`;
|
|
787
|
+
var Button = styled_components_default(Text2).attrs({ as: "button", type: "button" })`
|
|
788
|
+
border: 0;
|
|
789
|
+
background: transparent;
|
|
790
|
+
padding: 0;
|
|
791
|
+
-webkit-appearance: none;
|
|
792
|
+
`;
|
|
785
793
|
var validUnitPositions = ["before", "after"];
|
|
786
794
|
var MajorValue = ({ color, fontSize, unitPosition, title, value, onValueClick, unit }) => {
|
|
787
795
|
let sanitizedUnit;
|
|
@@ -794,28 +802,31 @@ var MajorValue = ({ color, fontSize, unitPosition, title, value, onValueClick, u
|
|
|
794
802
|
sanitizedUnitPosition = "after";
|
|
795
803
|
}
|
|
796
804
|
}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
+
return /* @__PURE__ */ react_default.createElement(Row, { size: fontSize }, typeof onValueClick === "function" ? /* @__PURE__ */ react_default.createElement(
|
|
806
|
+
Button,
|
|
807
|
+
{
|
|
808
|
+
"data-test": "majorValue",
|
|
809
|
+
color,
|
|
810
|
+
size: fontSize,
|
|
811
|
+
title,
|
|
812
|
+
pseudoContent: sanitizedUnit,
|
|
813
|
+
pseudoContentPosition: sanitizedUnitPosition,
|
|
814
|
+
pseudoContentFontSize: fontSize * 0.6,
|
|
815
|
+
showUnderline: true,
|
|
816
|
+
onClick: onValueClick
|
|
817
|
+
},
|
|
818
|
+
value
|
|
819
|
+
) : /* @__PURE__ */ react_default.createElement(
|
|
805
820
|
Text2,
|
|
806
821
|
{
|
|
807
822
|
"data-test": "majorValue",
|
|
808
823
|
color,
|
|
809
|
-
onClick: (e) => typeof onValueClick === "function" && onValueClick(e),
|
|
810
|
-
showUnderline: !!onValueClick,
|
|
811
824
|
size: fontSize,
|
|
812
825
|
title,
|
|
813
826
|
pseudoContent: sanitizedUnit,
|
|
814
827
|
pseudoContentPosition: sanitizedUnitPosition,
|
|
815
828
|
pseudoContentFontSize: fontSize * 0.6,
|
|
816
|
-
|
|
817
|
-
role: "button",
|
|
818
|
-
onKeyDown: handleKeyDown
|
|
829
|
+
showUnderline: false
|
|
819
830
|
},
|
|
820
831
|
value
|
|
821
832
|
));
|
|
@@ -967,6 +978,8 @@ var StyledSvg = styled_components_default.svg`
|
|
|
967
978
|
var StyledTooltip = styled_components_default.div`
|
|
968
979
|
padding: 3px 8px;
|
|
969
980
|
font-size: 12px;
|
|
981
|
+
text-align: center;
|
|
982
|
+
min-width: 20px;
|
|
970
983
|
`;
|
|
971
984
|
var preventDefault = (e) => e.preventDefault();
|
|
972
985
|
var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
@@ -997,7 +1010,7 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
997
1010
|
const { pointIndex: pointIndexStr } = target.dataset || {};
|
|
998
1011
|
const { activeIndex, componentIsFocused, hoveredIndex } = this.state;
|
|
999
1012
|
if (pointIndexStr !== void 0) {
|
|
1000
|
-
const pointIndex = parseInt(pointIndexStr, 10);
|
|
1013
|
+
const pointIndex = Number.parseInt(pointIndexStr, 10);
|
|
1001
1014
|
if (activeIndex !== pointIndex || !componentIsFocused || hoveredIndex !== null) {
|
|
1002
1015
|
this.setState({
|
|
1003
1016
|
activeIndex: pointIndex,
|
|
@@ -1026,7 +1039,7 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
1026
1039
|
if (!allowedKeys.includes(event.key)) {
|
|
1027
1040
|
return;
|
|
1028
1041
|
}
|
|
1029
|
-
let newIndex
|
|
1042
|
+
let newIndex;
|
|
1030
1043
|
switch (event.key) {
|
|
1031
1044
|
case "Home":
|
|
1032
1045
|
newIndex = 0;
|
|
@@ -1053,7 +1066,7 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
1053
1066
|
handleMouseOver(event) {
|
|
1054
1067
|
const pointIndexStr = event.target.dataset && event.target.dataset.pointIndex;
|
|
1055
1068
|
if (pointIndexStr !== void 0) {
|
|
1056
|
-
const pointIndex = parseInt(pointIndexStr, 10);
|
|
1069
|
+
const pointIndex = Number.parseInt(pointIndexStr, 10);
|
|
1057
1070
|
if (this.state.hoveredIndex !== pointIndex) {
|
|
1058
1071
|
this.setState({ hoveredIndex: pointIndex });
|
|
1059
1072
|
}
|
|
@@ -1067,12 +1080,12 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
1067
1080
|
getMax() {
|
|
1068
1081
|
const { data, acceptNull, yMax } = this.props;
|
|
1069
1082
|
const dataMax = () => acceptNull ? (0, lodash_exports.max)(this.fillNull()) : (0, lodash_exports.max)(data);
|
|
1070
|
-
return yMax
|
|
1083
|
+
return yMax === void 0 ? dataMax() : yMax;
|
|
1071
1084
|
}
|
|
1072
1085
|
getMin() {
|
|
1073
1086
|
const { data, acceptNull, yMin } = this.props;
|
|
1074
1087
|
const dataMin = () => acceptNull ? (0, lodash_exports.min)(this.fillNull()) : (0, lodash_exports.min)(data);
|
|
1075
|
-
return yMin
|
|
1088
|
+
return yMin === void 0 ? dataMin() : yMin;
|
|
1076
1089
|
}
|
|
1077
1090
|
/**
|
|
1078
1091
|
* Gets unit value of x axis.
|
|
@@ -1103,26 +1116,31 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
1103
1116
|
* @method getSegmentSets
|
|
1104
1117
|
* @param {Array} data
|
|
1105
1118
|
* @param {Array} points
|
|
1106
|
-
* @returns {
|
|
1119
|
+
* @returns {Object} Object containing lines (arrays of points for polylines) and isolatedPoints (single points surrounded by nulls)
|
|
1107
1120
|
*/
|
|
1108
1121
|
getSegmentSets(data, points) {
|
|
1109
1122
|
const { acceptNull } = this.props;
|
|
1110
1123
|
const lines = [];
|
|
1124
|
+
const isolatedPoints = [];
|
|
1111
1125
|
let currentLine = [];
|
|
1112
|
-
data.
|
|
1126
|
+
for (const [idx, p] of data.entries()) {
|
|
1113
1127
|
if (!acceptNull && (0, lodash_exports.isNull)(p)) {
|
|
1114
1128
|
if (currentLine.length > 1) {
|
|
1115
1129
|
lines.push(currentLine);
|
|
1130
|
+
} else if (currentLine.length === 1) {
|
|
1131
|
+
isolatedPoints.push(currentLine[0]);
|
|
1116
1132
|
}
|
|
1117
1133
|
currentLine = [];
|
|
1118
1134
|
} else {
|
|
1119
1135
|
currentLine.push(points[idx]);
|
|
1120
1136
|
}
|
|
1121
|
-
}
|
|
1137
|
+
}
|
|
1122
1138
|
if (currentLine.length > 1) {
|
|
1123
1139
|
lines.push(currentLine);
|
|
1140
|
+
} else if (currentLine.length === 1) {
|
|
1141
|
+
isolatedPoints.push(currentLine[0]);
|
|
1124
1142
|
}
|
|
1125
|
-
return lines;
|
|
1143
|
+
return { lines, isolatedPoints };
|
|
1126
1144
|
}
|
|
1127
1145
|
/**
|
|
1128
1146
|
* Utility for fill null value with number 0.
|
|
@@ -1166,7 +1184,7 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
1166
1184
|
"rect",
|
|
1167
1185
|
{
|
|
1168
1186
|
key: `${i}_${p[0]}`,
|
|
1169
|
-
role: "
|
|
1187
|
+
role: "graphics-symbol",
|
|
1170
1188
|
"aria-label": `Value: ${data[i] === null ? "N/A" : data[i]}, point ${i + 1} of ${data.length}`,
|
|
1171
1189
|
"data-test": `rect-${i}`,
|
|
1172
1190
|
"data-point-index": i,
|
|
@@ -1174,7 +1192,7 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
1174
1192
|
ref: (el) => {
|
|
1175
1193
|
this.pointRefs[i] = el;
|
|
1176
1194
|
},
|
|
1177
|
-
x:
|
|
1195
|
+
x: Math.max(0, p[0] - xUnit / 2),
|
|
1178
1196
|
y: 0,
|
|
1179
1197
|
width: i === 0 && data.length !== 1 ? xUnit / 2 : xUnit,
|
|
1180
1198
|
height,
|
|
@@ -1190,10 +1208,10 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
1190
1208
|
if (!isArea || points.length === 0) {
|
|
1191
1209
|
return null;
|
|
1192
1210
|
}
|
|
1193
|
-
|
|
1194
|
-
segments =
|
|
1211
|
+
const { lines } = this.getSegmentSets(data, points);
|
|
1212
|
+
const segments = lines.map(
|
|
1195
1213
|
(s) => s.concat([
|
|
1196
|
-
[s
|
|
1214
|
+
[s.at(-1)[0], height],
|
|
1197
1215
|
// down to bottom of graph
|
|
1198
1216
|
[s[0][0], height],
|
|
1199
1217
|
// over to below first data point
|
|
@@ -1237,6 +1255,7 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
1237
1255
|
}
|
|
1238
1256
|
renderTooltip(tooltipValue, isOpen) {
|
|
1239
1257
|
const { anchor } = this.state;
|
|
1258
|
+
const displayValue = tooltipValue === null ? "-" : tooltipValue;
|
|
1240
1259
|
return /* @__PURE__ */ react_default.createElement(
|
|
1241
1260
|
Popover_default,
|
|
1242
1261
|
{
|
|
@@ -1248,7 +1267,7 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
1248
1267
|
defaultPlacement: "above",
|
|
1249
1268
|
animation: false
|
|
1250
1269
|
},
|
|
1251
|
-
/* @__PURE__ */ react_default.createElement(StyledTooltip, null,
|
|
1270
|
+
/* @__PURE__ */ react_default.createElement(StyledTooltip, null, displayValue)
|
|
1252
1271
|
);
|
|
1253
1272
|
}
|
|
1254
1273
|
/**
|
|
@@ -1278,16 +1297,46 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
1278
1297
|
}
|
|
1279
1298
|
)));
|
|
1280
1299
|
}
|
|
1300
|
+
/**
|
|
1301
|
+
* Renders circles for isolated points (single data points surrounded by nulls)
|
|
1302
|
+
* These would otherwise be invisible since a line requires at least 2 points
|
|
1303
|
+
* @method renderIsolatedPoints
|
|
1304
|
+
* @param {Array} isolatedPoints - Array of [x, y] coordinates for isolated points
|
|
1305
|
+
* @returns {Object} SVG Group of circles
|
|
1306
|
+
*/
|
|
1307
|
+
renderIsolatedPoints(isolatedPoints) {
|
|
1308
|
+
const { lineColor, lineStrokeWidth } = this.props;
|
|
1309
|
+
if (!isolatedPoints || isolatedPoints.length === 0) {
|
|
1310
|
+
return null;
|
|
1311
|
+
}
|
|
1312
|
+
const radius = lineStrokeWidth + 0.5;
|
|
1313
|
+
return /* @__PURE__ */ react_default.createElement("g", { "data-test": "isolated-points" }, isolatedPoints.map((point) => /* @__PURE__ */ react_default.createElement(
|
|
1314
|
+
"circle",
|
|
1315
|
+
{
|
|
1316
|
+
key: `isolated-${point[0]}-${point[1]}`,
|
|
1317
|
+
"data-test": "isolated-point",
|
|
1318
|
+
cx: point[0],
|
|
1319
|
+
cy: point[1],
|
|
1320
|
+
r: radius,
|
|
1321
|
+
style: {
|
|
1322
|
+
fill: lineColor
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
)));
|
|
1326
|
+
}
|
|
1281
1327
|
/**
|
|
1282
1328
|
* Renders the line(s) above the area graph
|
|
1283
1329
|
* @method renderPolyline
|
|
1284
1330
|
* @param {Array} points
|
|
1285
|
-
* @returns {Object} SVG Group of polylines
|
|
1331
|
+
* @returns {Object} SVG Group of polylines and isolated points
|
|
1286
1332
|
*/
|
|
1287
1333
|
renderPolyline(points) {
|
|
1288
1334
|
const { data, lineColor, lineLength, lineStrokeWidth } = this.props;
|
|
1289
1335
|
const linePoints = (0, lodash_exports.isFinite)(lineLength) && lineLength > 0 ? lineLength : points.length;
|
|
1290
|
-
const lines = this.getSegmentSets(
|
|
1336
|
+
const { lines, isolatedPoints } = this.getSegmentSets(
|
|
1337
|
+
data.slice(-linePoints),
|
|
1338
|
+
points.slice(-linePoints)
|
|
1339
|
+
);
|
|
1291
1340
|
return /* @__PURE__ */ react_default.createElement("g", { "data-test": "sparkline" }, lines.map((lineData) => /* @__PURE__ */ react_default.createElement(
|
|
1292
1341
|
"polyline",
|
|
1293
1342
|
{
|
|
@@ -1302,7 +1351,54 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
1302
1351
|
},
|
|
1303
1352
|
points: lineData.join(" ")
|
|
1304
1353
|
}
|
|
1305
|
-
)));
|
|
1354
|
+
)), this.renderIsolatedPoints(isolatedPoints));
|
|
1355
|
+
}
|
|
1356
|
+
getInteractionState({ data, points, showTooltip, activeIndex, hoveredIndex, componentIsFocused }) {
|
|
1357
|
+
if (!showTooltip) {
|
|
1358
|
+
return {
|
|
1359
|
+
currentPointX: null,
|
|
1360
|
+
tooltipValue: null,
|
|
1361
|
+
showCursorAndTooltip: false,
|
|
1362
|
+
interactiveProps: {}
|
|
1363
|
+
};
|
|
1364
|
+
}
|
|
1365
|
+
const interactiveProps = {
|
|
1366
|
+
onKeyDown: this.handleKeyDown,
|
|
1367
|
+
onMouseOver: this.handleMouseOver,
|
|
1368
|
+
onMouseLeave: this.handleMouseLeave,
|
|
1369
|
+
onFocus: this.handleFocus,
|
|
1370
|
+
onBlur: this.handleBlur
|
|
1371
|
+
};
|
|
1372
|
+
const isHovered = hoveredIndex !== null;
|
|
1373
|
+
const shouldDisplayInteractiveElements = (isHovered || componentIsFocused) && data.length > 0;
|
|
1374
|
+
if (!shouldDisplayInteractiveElements) {
|
|
1375
|
+
return {
|
|
1376
|
+
currentPointX: null,
|
|
1377
|
+
tooltipValue: null,
|
|
1378
|
+
showCursorAndTooltip: false,
|
|
1379
|
+
interactiveProps
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
const displayIndex = isHovered ? hoveredIndex : activeIndex;
|
|
1383
|
+
const isValidIndex = displayIndex !== null && displayIndex >= 0;
|
|
1384
|
+
const withinBounds = isValidIndex && displayIndex < data.length && displayIndex < points.length;
|
|
1385
|
+
if (!withinBounds) {
|
|
1386
|
+
return {
|
|
1387
|
+
currentPointX: null,
|
|
1388
|
+
tooltipValue: null,
|
|
1389
|
+
showCursorAndTooltip: false,
|
|
1390
|
+
interactiveProps
|
|
1391
|
+
};
|
|
1392
|
+
}
|
|
1393
|
+
const displayPointCoords = points[displayIndex];
|
|
1394
|
+
const currentPointX = displayPointCoords ? displayPointCoords[0] : null;
|
|
1395
|
+
const tooltipValue = data[displayIndex];
|
|
1396
|
+
return {
|
|
1397
|
+
currentPointX,
|
|
1398
|
+
tooltipValue,
|
|
1399
|
+
showCursorAndTooltip: currentPointX !== null,
|
|
1400
|
+
interactiveProps
|
|
1401
|
+
};
|
|
1306
1402
|
}
|
|
1307
1403
|
render() {
|
|
1308
1404
|
const {
|
|
@@ -1330,39 +1426,20 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
|
|
|
1330
1426
|
const yMargin = Math.max(lineStrokeWidth / 2, endDotRadius + endDotStrokeWidth / 2);
|
|
1331
1427
|
const points = this.dataToPoints(xMargin, yMargin);
|
|
1332
1428
|
const dotsToShow = Math.max(showEndDot && 1, (0, lodash_exports.isFinite)(endDotCount) && endDotCount > 0 && endDotCount);
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
const displayIndex = isHovered ? hoveredIndex : activeIndex;
|
|
1342
|
-
if (displayIndex !== null && displayIndex >= 0 && data.length > displayIndex && points.length > displayIndex) {
|
|
1343
|
-
const displayPointCoords = points[displayIndex];
|
|
1344
|
-
if (displayPointCoords) {
|
|
1345
|
-
[currentPointX] = displayPointCoords;
|
|
1346
|
-
}
|
|
1347
|
-
tooltipValue = data[displayIndex];
|
|
1348
|
-
showCursorAndTooltip = currentPointX !== null;
|
|
1349
|
-
}
|
|
1350
|
-
}
|
|
1351
|
-
interactiveProps = {
|
|
1352
|
-
onKeyDown: this.handleKeyDown,
|
|
1353
|
-
onMouseOver: this.handleMouseOver,
|
|
1354
|
-
onMouseLeave: this.handleMouseLeave,
|
|
1355
|
-
onFocus: this.handleFocus,
|
|
1356
|
-
onBlur: this.handleBlur
|
|
1357
|
-
};
|
|
1358
|
-
}
|
|
1429
|
+
const { currentPointX, tooltipValue, showCursorAndTooltip, interactiveProps } = this.getInteractionState({
|
|
1430
|
+
data,
|
|
1431
|
+
points,
|
|
1432
|
+
showTooltip,
|
|
1433
|
+
activeIndex,
|
|
1434
|
+
hoveredIndex,
|
|
1435
|
+
componentIsFocused
|
|
1436
|
+
});
|
|
1359
1437
|
const ariaLabel = title || (0, i18n_exports._)("Source count over time sparkline trend");
|
|
1360
1438
|
return /* @__PURE__ */ react_default.createElement(
|
|
1361
1439
|
"div",
|
|
1362
1440
|
__spreadValues(__spreadValues({
|
|
1363
1441
|
"data-test": "line",
|
|
1364
1442
|
"data-test-type": isArea ? "area" : "line",
|
|
1365
|
-
role: "group",
|
|
1366
1443
|
ref: (el) => {
|
|
1367
1444
|
this.containerRef.current = el;
|
|
1368
1445
|
if (typeof elementRef === "function") {
|
|
@@ -1482,6 +1559,21 @@ var SparkLine = _SparkLine;
|
|
|
1482
1559
|
var SparkLine_default = SparkLine;
|
|
1483
1560
|
|
|
1484
1561
|
// src/SingleValue/PureSingleValue/SingleValueSparkline.jsx
|
|
1562
|
+
var processDataForNullDisplay = (data, nullValueDisplay) => {
|
|
1563
|
+
if (!Array.isArray(data)) {
|
|
1564
|
+
return [];
|
|
1565
|
+
}
|
|
1566
|
+
if (nullValueDisplay === "connect") {
|
|
1567
|
+
return data.filter((d) => d !== null);
|
|
1568
|
+
}
|
|
1569
|
+
return data;
|
|
1570
|
+
};
|
|
1571
|
+
var getAcceptNull = (nullValueDisplay) => (
|
|
1572
|
+
// acceptNull=true treats null as 0 (for 'zero' mode)
|
|
1573
|
+
// acceptNull=false creates gaps (for 'gaps' mode)
|
|
1574
|
+
// For 'connect' mode, nulls are filtered out so this doesn't matter
|
|
1575
|
+
nullValueDisplay === "zero"
|
|
1576
|
+
);
|
|
1485
1577
|
var SingleValueSparkline = ({
|
|
1486
1578
|
width,
|
|
1487
1579
|
height,
|
|
@@ -1493,42 +1585,64 @@ var SingleValueSparkline = ({
|
|
|
1493
1585
|
isArea,
|
|
1494
1586
|
lineLength = 0,
|
|
1495
1587
|
endDotCount = 0,
|
|
1496
|
-
acceptNull =
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
{
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
fillOpacity: fillOpacity.toString(10),
|
|
1503
|
-
data,
|
|
1504
|
-
height,
|
|
1505
|
-
width,
|
|
1506
|
-
showTooltip,
|
|
1507
|
-
isArea,
|
|
1508
|
-
lineStrokeWidth: 1.5,
|
|
1509
|
-
lineLength: isArea ? lineLength : void 0,
|
|
1510
|
-
endDotCount: isArea ? endDotCount : void 0,
|
|
1511
|
-
endDotRadius: Math.min(width, height) < 15 ? 1 : 3,
|
|
1512
|
-
endDotStroke: (0, propUtils_exports.formatColor)(stroke),
|
|
1513
|
-
endDotFillColor: (0, propUtils_exports.formatColor)(stroke),
|
|
1514
|
-
acceptNull,
|
|
1515
|
-
style: {
|
|
1516
|
-
flex: "0 0 auto",
|
|
1517
|
-
justifyContent: "center",
|
|
1518
|
-
display: "flex",
|
|
1519
|
-
alignItems: "flex-end"
|
|
1588
|
+
acceptNull = false,
|
|
1589
|
+
nullValueDisplay
|
|
1590
|
+
}) => {
|
|
1591
|
+
const effectiveNullValueDisplay = (0, react_exports.useMemo)(() => {
|
|
1592
|
+
if (nullValueDisplay !== void 0) {
|
|
1593
|
+
return nullValueDisplay;
|
|
1520
1594
|
}
|
|
1521
|
-
|
|
1522
|
-
|
|
1595
|
+
if (acceptNull === true) {
|
|
1596
|
+
return "zero";
|
|
1597
|
+
}
|
|
1598
|
+
return "gaps";
|
|
1599
|
+
}, [nullValueDisplay, acceptNull]);
|
|
1600
|
+
const processedData = (0, react_exports.useMemo)(
|
|
1601
|
+
() => processDataForNullDisplay(data, effectiveNullValueDisplay),
|
|
1602
|
+
[data, effectiveNullValueDisplay]
|
|
1603
|
+
);
|
|
1604
|
+
const sparklineAcceptNull = (0, react_exports.useMemo)(
|
|
1605
|
+
() => getAcceptNull(effectiveNullValueDisplay),
|
|
1606
|
+
[effectiveNullValueDisplay]
|
|
1607
|
+
);
|
|
1608
|
+
return /* @__PURE__ */ react_default.createElement(
|
|
1609
|
+
SparkLine_default,
|
|
1610
|
+
{
|
|
1611
|
+
lineColor: (0, propUtils_exports.formatColor)(stroke),
|
|
1612
|
+
fillColor: (0, propUtils_exports.formatColor)(fill),
|
|
1613
|
+
fillOpacity: fillOpacity.toString(10),
|
|
1614
|
+
data: processedData,
|
|
1615
|
+
height,
|
|
1616
|
+
width,
|
|
1617
|
+
showTooltip,
|
|
1618
|
+
isArea,
|
|
1619
|
+
lineStrokeWidth: 1.5,
|
|
1620
|
+
lineLength: isArea ? lineLength : void 0,
|
|
1621
|
+
endDotCount: isArea ? endDotCount : void 0,
|
|
1622
|
+
endDotRadius: Math.min(width, height) < 15 ? 1 : 3,
|
|
1623
|
+
endDotStroke: (0, propUtils_exports.formatColor)(stroke),
|
|
1624
|
+
endDotFillColor: (0, propUtils_exports.formatColor)(stroke),
|
|
1625
|
+
acceptNull: sparklineAcceptNull,
|
|
1626
|
+
style: {
|
|
1627
|
+
flex: "0 0 auto",
|
|
1628
|
+
justifyContent: "center",
|
|
1629
|
+
display: "flex",
|
|
1630
|
+
alignItems: "flex-end"
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
);
|
|
1634
|
+
};
|
|
1523
1635
|
SingleValueSparkline.propTypes = {
|
|
1636
|
+
/** @deprecated Use nullValueDisplay instead */
|
|
1524
1637
|
acceptNull: prop_types_default.bool,
|
|
1525
|
-
data: prop_types_default.arrayOf(prop_types_default.number),
|
|
1638
|
+
data: prop_types_default.arrayOf(prop_types_default.oneOfType([prop_types_default.number, prop_types_default.oneOf([null])])),
|
|
1526
1639
|
endDotCount: prop_types_default.number,
|
|
1527
1640
|
fill: prop_types_default.string,
|
|
1528
1641
|
fillOpacity: prop_types_default.number,
|
|
1529
1642
|
height: prop_types_default.number,
|
|
1530
1643
|
isArea: prop_types_default.bool,
|
|
1531
1644
|
lineLength: prop_types_default.number,
|
|
1645
|
+
nullValueDisplay: prop_types_default.oneOf(["gaps", "zero", "connect"]),
|
|
1532
1646
|
showTooltip: prop_types_default.bool,
|
|
1533
1647
|
stroke: prop_types_default.string,
|
|
1534
1648
|
width: prop_types_default.number
|
|
@@ -1566,17 +1680,13 @@ var getAvailableContentHeight = ({
|
|
|
1566
1680
|
return majorTextFontSize + CONTENT_SPARKLINE_SPACING + underLabelHeight;
|
|
1567
1681
|
};
|
|
1568
1682
|
var isValidPosition = (sparklinePosition) => VALID_SPARKLINE_POSITIONS.indexOf(sparklinePosition) > -1;
|
|
1569
|
-
var parseSparklineValues = ({ sparklineValues }) => (
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
}
|
|
1577
|
-
return numV || v;
|
|
1578
|
-
}) : void 0
|
|
1579
|
-
);
|
|
1683
|
+
var parseSparklineValues = ({ sparklineValues }) => Array.isArray(sparklineValues) ? sparklineValues.map((v) => {
|
|
1684
|
+
const numV = (0, numberUtils_exports.parseNumber)(v);
|
|
1685
|
+
if (numV === 0) {
|
|
1686
|
+
return null;
|
|
1687
|
+
}
|
|
1688
|
+
return numV || v;
|
|
1689
|
+
}) : void 0;
|
|
1580
1690
|
var shouldShowSparkline = ({ showSparkline, sparklineValues }) => showSparkline && Array.isArray(sparklineValues) && sparklineValues.length > 1 && sparklineValues.every((v) => v === null || !Number.isNaN((0, numberUtils_exports.parseNumber)(v))) && sparklineValues.filter((v) => v !== null).length > 0;
|
|
1581
1691
|
var getSparklineWidth = ({ width, isSparklinePositionBelow }) => {
|
|
1582
1692
|
const spaceRatio = isSparklinePositionBelow ? 1 : 0.6;
|
|
@@ -1711,7 +1821,7 @@ var SingleValueContent = (_a) => {
|
|
|
1711
1821
|
sparklineStrokeColor,
|
|
1712
1822
|
showSparklineTooltip,
|
|
1713
1823
|
showSparklineAreaGraph,
|
|
1714
|
-
|
|
1824
|
+
sparklineNullValueDisplay,
|
|
1715
1825
|
sparklineSegments,
|
|
1716
1826
|
endDots,
|
|
1717
1827
|
align
|
|
@@ -1728,7 +1838,7 @@ var SingleValueContent = (_a) => {
|
|
|
1728
1838
|
stroke: sparklineStrokeColor,
|
|
1729
1839
|
showTooltip: showSparklineTooltip,
|
|
1730
1840
|
isArea: showSparklineAreaGraph,
|
|
1731
|
-
|
|
1841
|
+
nullValueDisplay: sparklineNullValueDisplay,
|
|
1732
1842
|
lineLength: sparklineSegments,
|
|
1733
1843
|
endDotCount: endDots
|
|
1734
1844
|
}
|
|
@@ -1775,7 +1885,7 @@ SingleValueContent.propTypes = __spreadProps(__spreadValues({}, SingleValueBasic
|
|
|
1775
1885
|
sparklineStrokeColor: prop_types_default.string,
|
|
1776
1886
|
showSparklineTooltip: prop_types_default.bool,
|
|
1777
1887
|
showSparklineAreaGraph: prop_types_default.bool,
|
|
1778
|
-
|
|
1888
|
+
sparklineNullValueDisplay: prop_types_default.oneOf(["gaps", "zero", "connect"]),
|
|
1779
1889
|
sparklineSegments: prop_types_default.number,
|
|
1780
1890
|
endDots: prop_types_default.number
|
|
1781
1891
|
});
|
|
@@ -1830,20 +1940,16 @@ var SingleValue = (_a) => {
|
|
|
1830
1940
|
unitPosition,
|
|
1831
1941
|
underLabelFontSize,
|
|
1832
1942
|
numberPrecision,
|
|
1833
|
-
// fixme todo probably belongs in a DSL formatter
|
|
1834
1943
|
shouldUseThousandSeparators,
|
|
1835
|
-
// fixme todo probably belongs in a DSL formatter
|
|
1836
1944
|
shouldAbbreviateTrendValue,
|
|
1837
|
-
// fixme todo probably belongs in a DSL formatter
|
|
1838
1945
|
shouldAbbreviateMajorValue,
|
|
1839
|
-
// fixme todo probably belongs in a DSL formatter
|
|
1840
1946
|
sparklineValues,
|
|
1841
1947
|
sparklineHighlightSegments,
|
|
1842
|
-
// fixme this is not a pure viz if it has lots of rendering logic for a sub-viz.
|
|
1843
1948
|
sparklineHighlightDots,
|
|
1844
1949
|
showSparklineAreaGraph,
|
|
1845
1950
|
showSparklineTooltip,
|
|
1846
1951
|
shouldSparklineAcceptNullData,
|
|
1952
|
+
sparklineNullValueDisplay,
|
|
1847
1953
|
onValueClick,
|
|
1848
1954
|
defaultFontColor,
|
|
1849
1955
|
defaultBackgroundColor: defaultBackgroundColor2,
|
|
@@ -1870,16 +1976,11 @@ var SingleValue = (_a) => {
|
|
|
1870
1976
|
}, []);
|
|
1871
1977
|
const trellisEnabled = useTrellisEnabled(splitByLayout);
|
|
1872
1978
|
const handleValueClick = (0, react_exports.useCallback)(
|
|
1873
|
-
(ev) => handleValueClickCallback(
|
|
1874
|
-
ev,
|
|
1875
|
-
majorValue,
|
|
1876
|
-
majorValueField,
|
|
1877
|
-
trendValue,
|
|
1878
|
-
onValueClick,
|
|
1979
|
+
(ev) => handleValueClickCallback(ev, majorValue, majorValueField, trendValue, onValueClick, {
|
|
1879
1980
|
trellisEnabled,
|
|
1880
1981
|
trellisSplitBy,
|
|
1881
1982
|
trellisKey
|
|
1882
|
-
),
|
|
1983
|
+
}),
|
|
1883
1984
|
[onValueClick, majorValue, majorValueField, trendValue, trellisEnabled, trellisSplitBy, trellisKey]
|
|
1884
1985
|
);
|
|
1885
1986
|
const { backgroundEnabled, backgroundColor, majorColor, trendColor, underLabelColor } = computeColors(
|
|
@@ -1891,6 +1992,15 @@ var SingleValue = (_a) => {
|
|
|
1891
1992
|
backgroundColor,
|
|
1892
1993
|
sparklineSeverityColors
|
|
1893
1994
|
}).stroke;
|
|
1995
|
+
const effectiveSparklineNullValueDisplay = (0, react_exports.useMemo)(() => {
|
|
1996
|
+
if (sparklineNullValueDisplay !== void 0) {
|
|
1997
|
+
return sparklineNullValueDisplay;
|
|
1998
|
+
}
|
|
1999
|
+
if (shouldSparklineAcceptNullData === true) {
|
|
2000
|
+
return "zero";
|
|
2001
|
+
}
|
|
2002
|
+
return "gaps";
|
|
2003
|
+
}, [sparklineNullValueDisplay, shouldSparklineAcceptNullData]);
|
|
1894
2004
|
const renderVisualization = () => {
|
|
1895
2005
|
if (!containerWidth || !containerHeight) {
|
|
1896
2006
|
return null;
|
|
@@ -1992,7 +2102,7 @@ var SingleValue = (_a) => {
|
|
|
1992
2102
|
sparklineStrokeColor,
|
|
1993
2103
|
showSparklineTooltip,
|
|
1994
2104
|
showSparklineAreaGraph,
|
|
1995
|
-
|
|
2105
|
+
sparklineNullValueDisplay: effectiveSparklineNullValueDisplay,
|
|
1996
2106
|
sparklineSegments,
|
|
1997
2107
|
endDots,
|
|
1998
2108
|
align
|
|
@@ -2040,6 +2150,7 @@ SingleValue.propTypes = {
|
|
|
2040
2150
|
sparklineAreaColor: prop_types_default.string,
|
|
2041
2151
|
sparklineStrokeColor: prop_types_default.string,
|
|
2042
2152
|
shouldSparklineAcceptNullData: prop_types_default.bool,
|
|
2153
|
+
sparklineNullValueDisplay: prop_types_default.oneOf(["gaps", "zero", "connect"]),
|
|
2043
2154
|
sparklineHighlightSegments: prop_types_default.number,
|
|
2044
2155
|
sparklineHighlightDots: prop_types_default.number,
|
|
2045
2156
|
hasEventHandlers: prop_types_default.bool,
|
|
@@ -2070,6 +2181,7 @@ SingleValue.defaultProps = {
|
|
|
2070
2181
|
showSparklineAreaGraph: false,
|
|
2071
2182
|
sparklineDisplay: "below",
|
|
2072
2183
|
shouldSparklineAcceptNullData: true,
|
|
2184
|
+
sparklineNullValueDisplay: void 0,
|
|
2073
2185
|
sparklineHighlightSegments: 0,
|
|
2074
2186
|
sparklineHighlightDots: 0,
|
|
2075
2187
|
hasEventHandlers: false,
|
|
@@ -2416,7 +2528,7 @@ var Cover = styled_components_default.div`
|
|
|
2416
2528
|
bottom: 0;
|
|
2417
2529
|
`;
|
|
2418
2530
|
var Blocker = styled_components_default.div.attrs({
|
|
2419
|
-
"data-splunk-visualization-version": "28.
|
|
2531
|
+
"data-splunk-visualization-version": "28.4.0 - 002bd482f"
|
|
2420
2532
|
})`
|
|
2421
2533
|
position: relative;
|
|
2422
2534
|
width: 100%;
|
|
@@ -2506,7 +2618,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
2506
2618
|
FixSizeItem,
|
|
2507
2619
|
{
|
|
2508
2620
|
"data-test": "fix-size-item",
|
|
2509
|
-
"data-splunk-visualization-version": "28.
|
|
2621
|
+
"data-splunk-visualization-version": "28.4.0 - 002bd482f",
|
|
2510
2622
|
width,
|
|
2511
2623
|
height,
|
|
2512
2624
|
backgroundColor
|
|
@@ -2593,6 +2705,7 @@ var withPlaceholder = (Visualization, useIconPlaceholder = shouldShowIconPlaceho
|
|
|
2593
2705
|
var withPlaceholder_default = withPlaceholder;
|
|
2594
2706
|
|
|
2595
2707
|
// src/common/utils/dataUtils.ts
|
|
2708
|
+
var getFieldName = (field) => typeof field === "string" ? field : field.name;
|
|
2596
2709
|
var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices) => {
|
|
2597
2710
|
const dataLength = data.length;
|
|
2598
2711
|
const downsampledIndices = [];
|
|
@@ -2709,9 +2822,9 @@ var tryToCoerceAllDisplayedFields = (ds, xField, yFields, fieldTypes, options) =
|
|
|
2709
2822
|
let xColumn = [];
|
|
2710
2823
|
const yColumns = [];
|
|
2711
2824
|
const canDownsample = !ds.data.fields.some((field, index) => {
|
|
2712
|
-
var _a
|
|
2713
|
-
const fieldName = (
|
|
2714
|
-
const fieldType = (
|
|
2825
|
+
var _a;
|
|
2826
|
+
const fieldName = getFieldName(field);
|
|
2827
|
+
const fieldType = (_a = fieldTypes[index]) != null ? _a : "unknown";
|
|
2715
2828
|
const column = ds.data.columns[index];
|
|
2716
2829
|
let hasDisplayedColumnThatCantBeDownsampled = false;
|
|
2717
2830
|
if (fieldName === xField) {
|
|
@@ -2998,7 +3111,7 @@ var trellisUtils_default = "default" in defaultImport33 ? defaultImport33.defaul
|
|
|
2998
3111
|
var AGGREGATIONS = "aggregations";
|
|
2999
3112
|
var dataSourcesSplitByAggregationsUnknown = (dataSource) => {
|
|
3000
3113
|
var _a, _b, _c, _d;
|
|
3001
|
-
const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
|
|
3114
|
+
const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
|
|
3002
3115
|
const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
|
|
3003
3116
|
let splitDataSources = null;
|
|
3004
3117
|
let errorCode = null;
|
|
@@ -3019,7 +3132,7 @@ var dataSourcesSplitByAggregationsUnknown = (dataSource) => {
|
|
|
3019
3132
|
}
|
|
3020
3133
|
return { splitDataSources, errorCode };
|
|
3021
3134
|
};
|
|
3022
|
-
var toFieldEntries = (fields) => {
|
|
3135
|
+
var toFieldEntries = (fields = []) => {
|
|
3023
3136
|
return fields.map((field) => {
|
|
3024
3137
|
if (typeof field === "string") {
|
|
3025
3138
|
return { name: field };
|
|
@@ -3034,7 +3147,7 @@ var dataSourcesSplitByAggregationsTimechartAndChart = (dataSource) => {
|
|
|
3034
3147
|
let splitDataSources = null;
|
|
3035
3148
|
let splitByFields = [];
|
|
3036
3149
|
let errorCode = null;
|
|
3037
|
-
if (
|
|
3150
|
+
if (fields.length > 0) {
|
|
3038
3151
|
splitByFields = (0, trellisUtils_exports.extractDataSourceAggregationKeysChart)(fields);
|
|
3039
3152
|
}
|
|
3040
3153
|
if (splitByFields && splitByFields.length > 0) {
|
|
@@ -3072,12 +3185,12 @@ var dataSourcesSplitByAggregationsTimechartAndChart = (dataSource) => {
|
|
|
3072
3185
|
};
|
|
3073
3186
|
var dataSourcesSplitByAggregationsStats = (dataSource) => {
|
|
3074
3187
|
var _a, _b, _c, _d;
|
|
3075
|
-
const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
|
|
3188
|
+
const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
|
|
3076
3189
|
const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
|
|
3077
3190
|
let splitDataSources = null;
|
|
3078
3191
|
let splitByFields = [];
|
|
3079
3192
|
let errorCode = null;
|
|
3080
|
-
if (
|
|
3193
|
+
if (fields.length > 0) {
|
|
3081
3194
|
splitByFields = (0, trellisUtils_exports.extractDataSourceAggregationKeysStats)(fields);
|
|
3082
3195
|
}
|
|
3083
3196
|
if (splitByFields && splitByFields.length > 0) {
|
|
@@ -3101,12 +3214,12 @@ var dataSourcesSplitByAggregationsStats = (dataSource) => {
|
|
|
3101
3214
|
};
|
|
3102
3215
|
var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
|
|
3103
3216
|
var _a, _b, _c, _d, _e;
|
|
3104
|
-
const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
|
|
3217
|
+
const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
|
|
3105
3218
|
const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
|
|
3106
3219
|
let splitDataSources = null;
|
|
3107
3220
|
let splitByFields = [];
|
|
3108
3221
|
let errorCode = null;
|
|
3109
|
-
if (
|
|
3222
|
+
if (fields.length > 0) {
|
|
3110
3223
|
splitByFields = (0, trellisUtils_exports.extractSplitByFieldsChartFields)(fields);
|
|
3111
3224
|
}
|
|
3112
3225
|
if (splitByFields && splitByFields.indexOf(splitBy) > -1) {
|
|
@@ -3144,12 +3257,12 @@ var dataSourcesSplitByModeTimechart = (dataSource, splitBy) => {
|
|
|
3144
3257
|
};
|
|
3145
3258
|
var dataSourcesSplitByModeChart = (dataSource, splitBy) => {
|
|
3146
3259
|
var _a, _b, _c, _d;
|
|
3147
|
-
const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
|
|
3260
|
+
const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
|
|
3148
3261
|
const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
|
|
3149
3262
|
let splitDataSources = null;
|
|
3150
3263
|
let splitByFields = [];
|
|
3151
3264
|
let errorCode = null;
|
|
3152
|
-
if (
|
|
3265
|
+
if (fields.length > 0) {
|
|
3153
3266
|
splitByFields = (0, trellisUtils_exports.extractSplitByFieldsChartFields)(fields);
|
|
3154
3267
|
}
|
|
3155
3268
|
if (splitByFields && splitByFields.indexOf(splitBy) > -1) {
|
|
@@ -3237,17 +3350,15 @@ var dataSourcesSplitByModeChart = (dataSource, splitBy) => {
|
|
|
3237
3350
|
};
|
|
3238
3351
|
var dataSourcesSplitByModeStatsorUnknown = (dataSource, splitBy, splitMode) => {
|
|
3239
3352
|
var _a, _b, _c, _d, _e, _f;
|
|
3240
|
-
const fields = (_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields;
|
|
3353
|
+
const fields = toFieldEntries((_b = (_a = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _a.data) == null ? void 0 : _b.fields);
|
|
3241
3354
|
const columns = (_d = (_c = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
|
|
3242
3355
|
let splitDataSources = null;
|
|
3243
3356
|
let splitByFields = [];
|
|
3244
3357
|
let errorCode = null;
|
|
3245
|
-
if (
|
|
3358
|
+
if (fields.length > 0) {
|
|
3246
3359
|
splitByFields = splitMode !== trellisUtils_exports.UNKNOWN ? (0, trellisUtils_exports.extractSplitByFieldsForStats)(fields) : (0, trellisUtils_exports.extractSplitByFieldsForUnknown)(fields);
|
|
3247
3360
|
}
|
|
3248
|
-
const splitByIndex = fields
|
|
3249
|
-
(field) => field === splitBy || field.name === splitBy
|
|
3250
|
-
);
|
|
3361
|
+
const splitByIndex = fields.findIndex((field) => field.name === splitBy);
|
|
3251
3362
|
if (splitByFields && splitByFields.indexOf(splitBy) > -1) {
|
|
3252
3363
|
const splitByColumn = (_f = (_e = dataSource == null ? void 0 : dataSource.primary) == null ? void 0 : _e.data) == null ? void 0 : _f.columns[splitByIndex];
|
|
3253
3364
|
splitDataSources = {};
|
|
@@ -3369,14 +3480,29 @@ var getAnnotationsForCanvas = ({
|
|
|
3369
3480
|
var StyledTriangle = styled_components_default(Triangle_default)`
|
|
3370
3481
|
color: ${(props) => props.eventColor || variables_default.severityColorNotice(props)};
|
|
3371
3482
|
`;
|
|
3372
|
-
var triangleEventAnnotationRenderer = ({
|
|
3483
|
+
var triangleEventAnnotationRenderer = ({
|
|
3484
|
+
event,
|
|
3485
|
+
dimensions
|
|
3486
|
+
}) => {
|
|
3373
3487
|
const eventWithColor = event;
|
|
3374
3488
|
return react_default.createElement(StyledTriangle, {
|
|
3489
|
+
width: `${dimensions.width}px`,
|
|
3490
|
+
height: `${dimensions.height}px`,
|
|
3375
3491
|
viewBox: "0 0 24 24",
|
|
3376
3492
|
variant: "filled",
|
|
3377
3493
|
eventColor: eventWithColor.color
|
|
3378
3494
|
});
|
|
3379
3495
|
};
|
|
3496
|
+
var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
|
|
3497
|
+
const rangeSelectEventHandler = eventHandlers.find(
|
|
3498
|
+
(eventHandler) => {
|
|
3499
|
+
var _a;
|
|
3500
|
+
return (_a = eventHandler.options.events) == null ? void 0 : _a.includes("range.select");
|
|
3501
|
+
}
|
|
3502
|
+
);
|
|
3503
|
+
const xAxisIsTime = xField === "_time";
|
|
3504
|
+
return !!rangeSelectEventHandler && xAxisIsTime;
|
|
3505
|
+
};
|
|
3380
3506
|
var canvasSupportedTimeSeriesCharts = ["splunk.line"];
|
|
3381
3507
|
var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
|
|
3382
3508
|
return canvasSupportedTimeSeriesCharts.indexOf(vizConfigKey) > -1;
|
|
@@ -3397,16 +3523,31 @@ var filterChartDataFromInternalFields = (chartData) => {
|
|
|
3397
3523
|
var convert2DArrayToNumbers = (arr) => {
|
|
3398
3524
|
return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
|
|
3399
3525
|
};
|
|
3526
|
+
var parseAxisValue = (val) => {
|
|
3527
|
+
if (val === void 0 || val === null || val === "auto" || val === "") {
|
|
3528
|
+
return void 0;
|
|
3529
|
+
}
|
|
3530
|
+
const num = typeof val === "number" ? val : Number.parseFloat(val);
|
|
3531
|
+
return Number.isNaN(num) ? void 0 : num;
|
|
3532
|
+
};
|
|
3400
3533
|
var SideLegendWidth = 75;
|
|
3401
|
-
var
|
|
3534
|
+
var SeriesCompareLegendWidth = 200;
|
|
3402
3535
|
var getLegend = (props) => {
|
|
3403
3536
|
const legendPlacement = props == null ? void 0 : props.legendDisplay;
|
|
3537
|
+
const { isSeriesCompare } = props;
|
|
3538
|
+
const commonLegendProps = {
|
|
3539
|
+
center: true,
|
|
3540
|
+
fontSize: 12,
|
|
3541
|
+
largerTiles: true,
|
|
3542
|
+
hideSeriesValue: !isSeriesCompare
|
|
3543
|
+
// Show values if in seriesCompare mode
|
|
3544
|
+
};
|
|
3404
3545
|
switch (legendPlacement) {
|
|
3405
3546
|
case "off":
|
|
3406
3547
|
return false;
|
|
3407
3548
|
case "left":
|
|
3408
3549
|
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
|
|
3409
|
-
width: SideLegendWidth
|
|
3550
|
+
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
3410
3551
|
}, commonLegendProps));
|
|
3411
3552
|
case "bottom":
|
|
3412
3553
|
return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
|
|
@@ -3418,7 +3559,7 @@ var getLegend = (props) => {
|
|
|
3418
3559
|
}, commonLegendProps));
|
|
3419
3560
|
default:
|
|
3420
3561
|
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
|
|
3421
|
-
width: SideLegendWidth
|
|
3562
|
+
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
3422
3563
|
}, commonLegendProps));
|
|
3423
3564
|
}
|
|
3424
3565
|
};
|
|
@@ -3454,19 +3595,25 @@ var ellipsisAxisTitle = (axisTitle, containerSpacing, fontSize = 12) => {
|
|
|
3454
3595
|
const end = axisTitle.slice(-halfChars);
|
|
3455
3596
|
return `${start}...${end}`;
|
|
3456
3597
|
};
|
|
3457
|
-
var
|
|
3598
|
+
var getFieldName2 = (field) => {
|
|
3458
3599
|
const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
|
|
3459
3600
|
return fieldName;
|
|
3460
3601
|
};
|
|
3461
3602
|
var getFieldNames = (fields) => {
|
|
3462
|
-
return fields.map((field) =>
|
|
3603
|
+
return fields.map((field) => getFieldName2(field));
|
|
3463
3604
|
};
|
|
3464
|
-
var getXScaleConfig = (label) => {
|
|
3605
|
+
var getXScaleConfig = (label, xAxisLabelVisibility, xAxisLabelRotation) => {
|
|
3465
3606
|
const xConfig = { x: {} };
|
|
3466
3607
|
xConfig.x.label = label;
|
|
3608
|
+
if (xAxisLabelVisibility === "hide") {
|
|
3609
|
+
xConfig.x.hideLabels = true;
|
|
3610
|
+
}
|
|
3611
|
+
if (xAxisLabelRotation !== void 0) {
|
|
3612
|
+
xConfig.x.labelRotation = xAxisLabelRotation;
|
|
3613
|
+
}
|
|
3467
3614
|
return xConfig;
|
|
3468
3615
|
};
|
|
3469
|
-
var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale) => {
|
|
3616
|
+
var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax) => {
|
|
3470
3617
|
const scaleType = yAxisScale != null ? yAxisScale : "linear";
|
|
3471
3618
|
const yConfig = { y: {} };
|
|
3472
3619
|
yConfig.y.label = label;
|
|
@@ -3479,23 +3626,42 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale) => {
|
|
|
3479
3626
|
} else {
|
|
3480
3627
|
yConfig.y.width = label && label.length > 0 ? 30 : 10;
|
|
3481
3628
|
}
|
|
3629
|
+
if (yAxisLabelVisibility === "hide") {
|
|
3630
|
+
yConfig.y.hideLabels = true;
|
|
3631
|
+
}
|
|
3632
|
+
if (yAxisMin !== void 0 || yAxisMax !== void 0) {
|
|
3633
|
+
yConfig.y.range = (u, dataMin, dataMax) => {
|
|
3634
|
+
const min2 = yAxisMin != null ? yAxisMin : dataMin;
|
|
3635
|
+
const max2 = yAxisMax != null ? yAxisMax : dataMax;
|
|
3636
|
+
return [min2, max2];
|
|
3637
|
+
};
|
|
3638
|
+
}
|
|
3482
3639
|
return yConfig;
|
|
3483
3640
|
};
|
|
3484
|
-
var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger) => {
|
|
3641
|
+
var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility, y2AxisMin, y2AxisMax) => {
|
|
3485
3642
|
const y2Config = { y2: {} };
|
|
3486
3643
|
const scaleType = axisScale != null ? axisScale : "linear";
|
|
3487
3644
|
y2Config.y2.label = label;
|
|
3488
3645
|
y2Config.y2.side = "right";
|
|
3489
|
-
y2Config.y2.showGrid = false;
|
|
3490
3646
|
y2Config.y2.type = scaleType;
|
|
3491
3647
|
if (axisAbbreviation !== "none") {
|
|
3492
3648
|
y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
|
|
3493
3649
|
} else if (roundAxisLabelsToInteger) {
|
|
3494
3650
|
y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
|
|
3495
3651
|
}
|
|
3652
|
+
if (y2AxisLabelVisibility === "hide") {
|
|
3653
|
+
y2Config.y2.hideLabels = true;
|
|
3654
|
+
}
|
|
3655
|
+
if (y2AxisMin !== void 0 || y2AxisMax !== void 0) {
|
|
3656
|
+
y2Config.y2.range = (u, dataMin, dataMax) => {
|
|
3657
|
+
const min2 = y2AxisMin != null ? y2AxisMin : dataMin;
|
|
3658
|
+
const max2 = y2AxisMax != null ? y2AxisMax : dataMax;
|
|
3659
|
+
return [min2, max2];
|
|
3660
|
+
};
|
|
3661
|
+
}
|
|
3496
3662
|
return y2Config;
|
|
3497
3663
|
};
|
|
3498
|
-
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode) => {
|
|
3664
|
+
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField) => {
|
|
3499
3665
|
const seriesConfig = {};
|
|
3500
3666
|
let spanGaps;
|
|
3501
3667
|
let replaceNullsWithZero;
|
|
@@ -3527,12 +3693,48 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
3527
3693
|
if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
|
|
3528
3694
|
seriesConfig[field].type = "line";
|
|
3529
3695
|
}
|
|
3696
|
+
if (markerDisplay !== void 0) {
|
|
3697
|
+
seriesConfig[field].markerDisplay = markerDisplay;
|
|
3698
|
+
}
|
|
3699
|
+
const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
|
|
3700
|
+
if (fieldDashStyle) {
|
|
3701
|
+
seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
3702
|
+
}
|
|
3530
3703
|
if (replaceNullsWithZero !== void 0) {
|
|
3531
3704
|
seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
|
|
3532
3705
|
}
|
|
3533
3706
|
});
|
|
3534
3707
|
return seriesConfig;
|
|
3535
3708
|
};
|
|
3709
|
+
var findRangeIndices = (xData, startValue, endValue) => {
|
|
3710
|
+
let startXIndex = -1;
|
|
3711
|
+
let endXIndex = -1;
|
|
3712
|
+
const xDataEpoch = xData.map((val) => {
|
|
3713
|
+
if (typeof val === "string") {
|
|
3714
|
+
return new Date(val).getTime() / 1e3;
|
|
3715
|
+
}
|
|
3716
|
+
return val;
|
|
3717
|
+
});
|
|
3718
|
+
for (let i = 0; i < xDataEpoch.length; i += 1) {
|
|
3719
|
+
if (xDataEpoch[i] >= startValue) {
|
|
3720
|
+
startXIndex = i;
|
|
3721
|
+
break;
|
|
3722
|
+
}
|
|
3723
|
+
}
|
|
3724
|
+
if (startXIndex === -1 && xDataEpoch.length > 0) {
|
|
3725
|
+
startXIndex = xDataEpoch.length - 1;
|
|
3726
|
+
}
|
|
3727
|
+
for (let i = xDataEpoch.length - 1; i >= 0; i -= 1) {
|
|
3728
|
+
if (xDataEpoch[i] <= endValue) {
|
|
3729
|
+
endXIndex = i;
|
|
3730
|
+
break;
|
|
3731
|
+
}
|
|
3732
|
+
}
|
|
3733
|
+
if (endXIndex === -1 && xDataEpoch.length > 0) {
|
|
3734
|
+
endXIndex = 0;
|
|
3735
|
+
}
|
|
3736
|
+
return { startXIndex, endXIndex };
|
|
3737
|
+
};
|
|
3536
3738
|
|
|
3537
3739
|
// src/common/TimeSeriesChartWrapper.tsx
|
|
3538
3740
|
var TimeSeriesChartContainer = styled_components_default.div`
|
|
@@ -3543,45 +3745,190 @@ var TimeSeriesChartContainer = styled_components_default.div`
|
|
|
3543
3745
|
position: absolute !important; // This is needed for canvas element export pdf/png to work correctly
|
|
3544
3746
|
}
|
|
3545
3747
|
`;
|
|
3546
|
-
var
|
|
3748
|
+
var appendTrellisToPayload = (payload, trellisKey, trellisSplitBy) => {
|
|
3749
|
+
const result = __spreadValues({}, payload);
|
|
3750
|
+
if (trellisSplitBy) {
|
|
3751
|
+
result["trellis.name"] = trellisSplitBy;
|
|
3752
|
+
}
|
|
3753
|
+
if (trellisKey) {
|
|
3754
|
+
result["trellis.value"] = trellisKey;
|
|
3755
|
+
}
|
|
3756
|
+
return result;
|
|
3757
|
+
};
|
|
3758
|
+
var hasMouseoverPayloadChanged = (currentPayload, previousPayload) => {
|
|
3759
|
+
if (!previousPayload) {
|
|
3760
|
+
return true;
|
|
3761
|
+
}
|
|
3762
|
+
if (currentPayload.index !== previousPayload.index) {
|
|
3763
|
+
return true;
|
|
3764
|
+
}
|
|
3765
|
+
if (currentPayload.seriesIndex !== previousPayload.seriesIndex) {
|
|
3766
|
+
return true;
|
|
3767
|
+
}
|
|
3768
|
+
if (currentPayload["trellis.name"] !== previousPayload["trellis.name"]) {
|
|
3769
|
+
return true;
|
|
3770
|
+
}
|
|
3771
|
+
if (currentPayload["trellis.value"] !== previousPayload["trellis.value"]) {
|
|
3772
|
+
return true;
|
|
3773
|
+
}
|
|
3774
|
+
return false;
|
|
3775
|
+
};
|
|
3776
|
+
var handleClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
|
|
3547
3777
|
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(chartEvent, "value", "seriesKey")), {
|
|
3548
3778
|
name: chartEvent.seriesKey
|
|
3549
3779
|
});
|
|
3550
3780
|
delete payload.seriesKey;
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3781
|
+
if (chartEvent.rowContext) {
|
|
3782
|
+
Object.assign(
|
|
3783
|
+
payload,
|
|
3784
|
+
Object.keys(chartEvent.rowContext).reduce((acc, fieldName) => {
|
|
3785
|
+
acc[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
|
|
3786
|
+
return acc;
|
|
3787
|
+
}, {})
|
|
3788
|
+
);
|
|
3789
|
+
}
|
|
3790
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
3791
|
+
if (onClick) {
|
|
3792
|
+
onClick({
|
|
3554
3793
|
type: "point.click",
|
|
3555
3794
|
originalEvent: chartEvent,
|
|
3556
|
-
payload
|
|
3795
|
+
payload: updatedPayload
|
|
3557
3796
|
});
|
|
3558
3797
|
}
|
|
3559
3798
|
};
|
|
3560
|
-
var handleLegendClick = (chartEvent,
|
|
3799
|
+
var handleLegendClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
|
|
3561
3800
|
const payload = {
|
|
3562
3801
|
name: chartEvent
|
|
3563
3802
|
};
|
|
3564
|
-
const
|
|
3565
|
-
if (
|
|
3566
|
-
|
|
3803
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
3804
|
+
if (onClick) {
|
|
3805
|
+
onClick({
|
|
3567
3806
|
type: "legend.click",
|
|
3568
3807
|
originalEvent: chartEvent,
|
|
3569
|
-
payload
|
|
3808
|
+
payload: updatedPayload
|
|
3809
|
+
});
|
|
3810
|
+
}
|
|
3811
|
+
};
|
|
3812
|
+
var handleRangeSelection = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
|
|
3813
|
+
var _a;
|
|
3814
|
+
if (!rangeEvent) {
|
|
3815
|
+
return;
|
|
3816
|
+
}
|
|
3817
|
+
const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
|
|
3818
|
+
const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
|
|
3819
|
+
const payload = {
|
|
3820
|
+
startXIndex,
|
|
3821
|
+
startXValue: rangeEvent.start,
|
|
3822
|
+
endXIndex,
|
|
3823
|
+
endXValue: rangeEvent.end
|
|
3824
|
+
};
|
|
3825
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
3826
|
+
if (onSelect) {
|
|
3827
|
+
onSelect({
|
|
3828
|
+
type: "range.selectBeforeZoom",
|
|
3829
|
+
originalEvent: rangeEvent,
|
|
3830
|
+
payload: updatedPayload
|
|
3831
|
+
});
|
|
3832
|
+
}
|
|
3833
|
+
};
|
|
3834
|
+
var handleRangeZoom = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
|
|
3835
|
+
var _a;
|
|
3836
|
+
const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
|
|
3837
|
+
const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
|
|
3838
|
+
const payload = {
|
|
3839
|
+
startXIndex,
|
|
3840
|
+
startXValue: rangeEvent.start,
|
|
3841
|
+
endXIndex,
|
|
3842
|
+
endXValue: rangeEvent.end
|
|
3843
|
+
};
|
|
3844
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
3845
|
+
if (onSelect) {
|
|
3846
|
+
onSelect({
|
|
3847
|
+
type: "range.select",
|
|
3848
|
+
originalEvent: rangeEvent,
|
|
3849
|
+
payload: updatedPayload
|
|
3570
3850
|
});
|
|
3571
3851
|
}
|
|
3572
3852
|
};
|
|
3853
|
+
var parseArrayOption = (value) => {
|
|
3854
|
+
if (Array.isArray(value)) {
|
|
3855
|
+
return value;
|
|
3856
|
+
}
|
|
3857
|
+
if (value) {
|
|
3858
|
+
return JSON.parse(value);
|
|
3859
|
+
}
|
|
3860
|
+
return void 0;
|
|
3861
|
+
};
|
|
3573
3862
|
var TimeSeriesChartWrapper = (props) => {
|
|
3574
|
-
|
|
3575
|
-
const {
|
|
3863
|
+
var _b, _c, _d;
|
|
3864
|
+
const _a = props, {
|
|
3865
|
+
width,
|
|
3866
|
+
height,
|
|
3867
|
+
chartData,
|
|
3868
|
+
options,
|
|
3869
|
+
userLocale,
|
|
3870
|
+
annotationX,
|
|
3871
|
+
annotationLabel,
|
|
3872
|
+
annotationColor,
|
|
3873
|
+
legendDisplay,
|
|
3874
|
+
markerDisplay,
|
|
3875
|
+
onClick,
|
|
3876
|
+
onPointMouseOver,
|
|
3877
|
+
onPointMouseOut,
|
|
3878
|
+
onSelect,
|
|
3879
|
+
splitByLayout,
|
|
3880
|
+
trellisKey,
|
|
3881
|
+
trellisSplitBy,
|
|
3576
3882
|
backgroundColor,
|
|
3883
|
+
defaultFontColor,
|
|
3884
|
+
additionalTooltipValues,
|
|
3885
|
+
showYAxisWithZero: showYAxisWithZeroFromProps,
|
|
3886
|
+
showY2AxisWithZero: showY2AxisWithZeroFromProps
|
|
3887
|
+
} = _a, otherOptions = __objRest(_a, [
|
|
3888
|
+
"width",
|
|
3889
|
+
"height",
|
|
3890
|
+
"chartData",
|
|
3891
|
+
"options",
|
|
3892
|
+
"userLocale",
|
|
3893
|
+
"annotationX",
|
|
3894
|
+
"annotationLabel",
|
|
3895
|
+
"annotationColor",
|
|
3896
|
+
"legendDisplay",
|
|
3897
|
+
"markerDisplay",
|
|
3898
|
+
"onClick",
|
|
3899
|
+
"onPointMouseOver",
|
|
3900
|
+
"onPointMouseOut",
|
|
3901
|
+
"onSelect",
|
|
3902
|
+
"splitByLayout",
|
|
3903
|
+
"trellisKey",
|
|
3904
|
+
"trellisSplitBy",
|
|
3905
|
+
"backgroundColor",
|
|
3906
|
+
"defaultFontColor",
|
|
3907
|
+
"additionalTooltipValues",
|
|
3908
|
+
// Extract showYAxisWithZero directly from props for accelerated render mode
|
|
3909
|
+
"showYAxisWithZero",
|
|
3910
|
+
"showY2AxisWithZero"
|
|
3911
|
+
]);
|
|
3912
|
+
const { eventHandlers, xField: xFieldFromProps } = otherOptions;
|
|
3913
|
+
const trellisEnabled = useTrellisEnabled(splitByLayout);
|
|
3914
|
+
const {
|
|
3915
|
+
backgroundColor: bgColorFromOptions,
|
|
3577
3916
|
seriesColors: seriesColorsStr,
|
|
3578
3917
|
fieldColors,
|
|
3918
|
+
legendLabels: legendLabelsStr,
|
|
3919
|
+
legendMode,
|
|
3579
3920
|
"axisTitleX.text": xAxisTitleText,
|
|
3580
3921
|
"axisTitleY.text": yAxisTitleText,
|
|
3581
3922
|
"axisTitleY2.text": y2AxisTitleText,
|
|
3582
3923
|
"axisTitleX.visibility": xAxisTitleVisibility,
|
|
3583
3924
|
"axisTitleY.visibility": yAxisTitleVisibility,
|
|
3584
3925
|
"axisTitleY2.visibility": y2AxisTitleVisibility,
|
|
3926
|
+
"axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
|
|
3927
|
+
"axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
|
|
3928
|
+
"axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
|
|
3929
|
+
"axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
|
|
3930
|
+
"axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
|
|
3931
|
+
"axisLabelsY2.majorUnit": y2AxisMajorUnitFromSimpleXML,
|
|
3585
3932
|
"axisY.abbreviation": yAxisAbbreviation,
|
|
3586
3933
|
"axisY.scale": yAxisScale,
|
|
3587
3934
|
"axisY2.abbreviation": y2AxisAbbreviation,
|
|
@@ -3591,10 +3938,63 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3591
3938
|
"axisLabelsY2.integerUnits": y2IntegerUnits,
|
|
3592
3939
|
"chart.overlayFields": overlayFieldsStr,
|
|
3593
3940
|
"chart.nullValueMode": nullValueMode,
|
|
3594
|
-
|
|
3941
|
+
"chart.showDataLabels": showDataLabels,
|
|
3942
|
+
lineWidth,
|
|
3943
|
+
lineDashStyle,
|
|
3944
|
+
fieldDashStyles: lineDashStylesByFieldStr,
|
|
3945
|
+
yAxisMin: yAxisMinRaw,
|
|
3946
|
+
yAxisMax: yAxisMaxRaw,
|
|
3947
|
+
y2AxisMin: y2AxisMinRaw,
|
|
3948
|
+
y2AxisMax: y2AxisMaxRaw,
|
|
3949
|
+
showXMajorGridLines,
|
|
3950
|
+
showYMajorGridLines,
|
|
3951
|
+
showY2MajorGridLines,
|
|
3952
|
+
showYMinorGridLines,
|
|
3953
|
+
showY2MinorGridLines,
|
|
3954
|
+
showLineSmoothing,
|
|
3955
|
+
yAxisMajorTickVisibility,
|
|
3956
|
+
y2AxisMajorTickVisibility,
|
|
3957
|
+
yAxisMajorTickSize,
|
|
3958
|
+
y2AxisMajorTickSize,
|
|
3959
|
+
yAxisMajorTickInterval,
|
|
3960
|
+
y2AxisMajorTickInterval,
|
|
3961
|
+
yAxisMinorTickVisibility,
|
|
3962
|
+
y2AxisMinorTickVisibility,
|
|
3963
|
+
yAxisMinorTickSize,
|
|
3964
|
+
y2AxisMinorTickSize,
|
|
3965
|
+
showYAxisWithZero: showYAxisWithZeroFromOptions,
|
|
3966
|
+
showY2AxisWithZero: showY2AxisWithZeroFromOptions
|
|
3595
3967
|
} = options;
|
|
3968
|
+
const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
|
|
3969
|
+
const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
|
|
3970
|
+
const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
|
|
3971
|
+
const showYMajorTicks = yAxisMajorTickVisibility === "show";
|
|
3972
|
+
const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
|
|
3973
|
+
const showYMinorTicks = yAxisMinorTickVisibility === "show";
|
|
3974
|
+
const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
|
|
3975
|
+
const yAxisMin = parseAxisValue(yAxisMinRaw);
|
|
3976
|
+
const yAxisMax = parseAxisValue(yAxisMaxRaw);
|
|
3977
|
+
const y2AxisMin = parseAxisValue(y2AxisMinRaw);
|
|
3978
|
+
const y2AxisMax = parseAxisValue(y2AxisMaxRaw);
|
|
3979
|
+
const parseTickInterval = (simpleXMLValue, canvasValue) => {
|
|
3980
|
+
if (simpleXMLValue) return Number(simpleXMLValue);
|
|
3981
|
+
if (canvasValue) return Number(canvasValue);
|
|
3982
|
+
return void 0;
|
|
3983
|
+
};
|
|
3984
|
+
const yAxisMajorTickIntervalNum = parseTickInterval(yAxisMajorUnitFromSimpleXML, yAxisMajorTickInterval);
|
|
3985
|
+
const y2AxisMajorTickIntervalNum = parseTickInterval(
|
|
3986
|
+
y2AxisMajorUnitFromSimpleXML,
|
|
3987
|
+
y2AxisMajorTickInterval
|
|
3988
|
+
);
|
|
3989
|
+
const yAxisMajorTickSizeNum = yAxisMajorTickSize ? Number(yAxisMajorTickSize) : void 0;
|
|
3990
|
+
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize ? Number(y2AxisMajorTickSize) : void 0;
|
|
3991
|
+
const yAxisMinorTickSizeNum = yAxisMinorTickSize ? Number(yAxisMinorTickSize) : void 0;
|
|
3992
|
+
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize ? Number(y2AxisMinorTickSize) : void 0;
|
|
3596
3993
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
3597
3994
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
3995
|
+
const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
|
|
3996
|
+
const legendLabels = parseArrayOption(legendLabelsStr);
|
|
3997
|
+
const bgColor = backgroundColor || bgColorFromOptions;
|
|
3598
3998
|
const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
|
|
3599
3999
|
const [containerHeight, setContainerHeight] = react_exports.useState(Number(props.height));
|
|
3600
4000
|
const cachedHandleResize = react_exports.useCallback((w, h) => {
|
|
@@ -3605,25 +4005,64 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3605
4005
|
fields: chartData.fields,
|
|
3606
4006
|
columns: chartData.seriesList
|
|
3607
4007
|
});
|
|
3608
|
-
const xField =
|
|
4008
|
+
const xField = getFieldName2(filteredChartData.fields[0]);
|
|
3609
4009
|
const yFields = getFieldNames(
|
|
3610
4010
|
filteredChartData.fields.length > 1 ? filteredChartData.fields.slice(1) : []
|
|
3611
4011
|
);
|
|
3612
|
-
const y2Fields =
|
|
3613
|
-
|
|
4012
|
+
const y2Fields = (0, react_exports.useMemo)(
|
|
4013
|
+
() => y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [],
|
|
4014
|
+
[y2FieldsStr]
|
|
4015
|
+
);
|
|
4016
|
+
const overlayFields = (0, react_exports.useMemo)(
|
|
4017
|
+
() => overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [],
|
|
4018
|
+
[overlayFieldsStr]
|
|
4019
|
+
);
|
|
3614
4020
|
let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
|
|
3615
4021
|
xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
|
|
3616
|
-
|
|
4022
|
+
const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
|
|
4023
|
+
let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility);
|
|
3617
4024
|
yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
|
|
3618
4025
|
const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
|
|
3619
4026
|
let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
|
|
3620
4027
|
y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
|
|
3621
|
-
const xScaleConfig =
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
4028
|
+
const xScaleConfig = (0, react_exports.useMemo)(
|
|
4029
|
+
() => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
|
|
4030
|
+
[xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
|
|
4031
|
+
);
|
|
4032
|
+
const yScaleConfig = (0, react_exports.useMemo)(
|
|
4033
|
+
() => getYScaleConfig(
|
|
4034
|
+
yAxisTitle,
|
|
4035
|
+
yAxisAbbreviation,
|
|
4036
|
+
yAxisScale,
|
|
4037
|
+
yAxisLabelVisibility,
|
|
4038
|
+
yAxisMin,
|
|
4039
|
+
yAxisMax
|
|
4040
|
+
),
|
|
4041
|
+
[yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax]
|
|
4042
|
+
);
|
|
4043
|
+
const y2ScaleConfig = (0, react_exports.useMemo)(() => {
|
|
4044
|
+
if (y2Enabled) {
|
|
4045
|
+
return getY2ScaleConfig(
|
|
4046
|
+
y2AxisTitle,
|
|
4047
|
+
y2AxisAbbreviation,
|
|
4048
|
+
y2AxisScale,
|
|
4049
|
+
y2IntegerUnits,
|
|
4050
|
+
y2AxisLabelVisibility,
|
|
4051
|
+
y2AxisMin,
|
|
4052
|
+
y2AxisMax
|
|
4053
|
+
);
|
|
4054
|
+
}
|
|
4055
|
+
return {};
|
|
4056
|
+
}, [
|
|
4057
|
+
y2Enabled,
|
|
4058
|
+
y2AxisTitle,
|
|
4059
|
+
y2AxisAbbreviation,
|
|
4060
|
+
y2AxisScale,
|
|
4061
|
+
y2IntegerUnits,
|
|
4062
|
+
y2AxisLabelVisibility,
|
|
4063
|
+
y2AxisMin,
|
|
4064
|
+
y2AxisMax
|
|
4065
|
+
]);
|
|
3627
4066
|
const uplotContainerElement = (0, react_exports.useRef)(null);
|
|
3628
4067
|
const seriesDataFormatted = [
|
|
3629
4068
|
filteredChartData.columns[0],
|
|
@@ -3631,24 +4070,140 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3631
4070
|
];
|
|
3632
4071
|
chartData.fields = filteredChartData.fields;
|
|
3633
4072
|
chartData.columns = seriesDataFormatted;
|
|
3634
|
-
const seriesOverrides =
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
4073
|
+
const seriesOverrides = (0, react_exports.useMemo)(
|
|
4074
|
+
() => getSeriesOverrides(
|
|
4075
|
+
yFields,
|
|
4076
|
+
y2Fields,
|
|
4077
|
+
lineWidth,
|
|
4078
|
+
overlayFields,
|
|
4079
|
+
y2Enabled,
|
|
4080
|
+
nullValueMode,
|
|
4081
|
+
markerDisplay,
|
|
4082
|
+
lineDashStyle,
|
|
4083
|
+
lineDashStylesByField
|
|
4084
|
+
),
|
|
4085
|
+
[
|
|
4086
|
+
yFields,
|
|
4087
|
+
y2Fields,
|
|
4088
|
+
lineWidth,
|
|
4089
|
+
overlayFields,
|
|
4090
|
+
y2Enabled,
|
|
4091
|
+
nullValueMode,
|
|
4092
|
+
markerDisplay,
|
|
4093
|
+
lineDashStyle,
|
|
4094
|
+
lineDashStylesByField
|
|
4095
|
+
]
|
|
3641
4096
|
);
|
|
3642
|
-
const chartingEventAnnotations =
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
4097
|
+
const chartingEventAnnotations = (0, react_exports.useMemo)(
|
|
4098
|
+
() => getAnnotationsForCanvas({
|
|
4099
|
+
annotationX,
|
|
4100
|
+
annotationColor,
|
|
4101
|
+
annotationLabel
|
|
4102
|
+
}),
|
|
4103
|
+
[annotationX, annotationColor, annotationLabel]
|
|
4104
|
+
);
|
|
4105
|
+
const scaleConfig = (0, react_exports.useMemo)(
|
|
4106
|
+
() => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
|
|
4107
|
+
[xScaleConfig, yScaleConfig, y2ScaleConfig]
|
|
4108
|
+
);
|
|
4109
|
+
const legend = (0, react_exports.useMemo)(
|
|
4110
|
+
() => getLegend({ legendDisplay, isSeriesCompare: legendMode === "seriesCompare" }),
|
|
4111
|
+
[legendDisplay, legendMode]
|
|
4112
|
+
);
|
|
4113
|
+
const handleChartClick = react_exports.useCallback(
|
|
4114
|
+
(event) => {
|
|
4115
|
+
if (onClick) {
|
|
4116
|
+
handleClick(event, onClick, trellisKey, trellisSplitBy);
|
|
4117
|
+
}
|
|
4118
|
+
},
|
|
4119
|
+
[onClick, trellisKey, trellisSplitBy]
|
|
4120
|
+
);
|
|
4121
|
+
const handleChartLegendClick = react_exports.useCallback(
|
|
4122
|
+
(event) => {
|
|
4123
|
+
if (onClick) {
|
|
4124
|
+
handleLegendClick(event, onClick, trellisKey, trellisSplitBy);
|
|
4125
|
+
}
|
|
4126
|
+
},
|
|
4127
|
+
[onClick, trellisKey, trellisSplitBy]
|
|
4128
|
+
);
|
|
4129
|
+
const handleChartRangeSelection = react_exports.useCallback(
|
|
4130
|
+
(range2) => {
|
|
4131
|
+
if (onSelect) {
|
|
4132
|
+
handleRangeSelection(range2, onSelect, chartData, trellisKey, trellisSplitBy);
|
|
4133
|
+
}
|
|
4134
|
+
},
|
|
4135
|
+
[onSelect, chartData, trellisKey, trellisSplitBy]
|
|
4136
|
+
);
|
|
4137
|
+
const handleChartRangeZoom = react_exports.useCallback(
|
|
4138
|
+
(range2) => {
|
|
4139
|
+
if (onSelect) {
|
|
4140
|
+
handleRangeZoom(range2, onSelect, chartData, trellisKey, trellisSplitBy);
|
|
4141
|
+
}
|
|
4142
|
+
},
|
|
4143
|
+
[onSelect, chartData, trellisKey, trellisSplitBy]
|
|
4144
|
+
);
|
|
4145
|
+
const xFieldToUse = xFieldFromProps || xField;
|
|
4146
|
+
const enableSearchZoom = react_exports.useMemo(
|
|
4147
|
+
() => shouldEnableSearchZoom(eventHandlers, xFieldToUse),
|
|
4148
|
+
[eventHandlers, xFieldToUse]
|
|
4149
|
+
);
|
|
4150
|
+
const lastPayloadRef = react_exports.useRef(null);
|
|
4151
|
+
const lastOriginalEventRef = react_exports.useRef(null);
|
|
4152
|
+
const previousMouseoverPayloadRef = react_exports.useRef(null);
|
|
4153
|
+
const additionalTooltipValuesRef = react_exports.useRef(additionalTooltipValues);
|
|
4154
|
+
react_exports.useEffect(() => {
|
|
4155
|
+
additionalTooltipValuesRef.current = additionalTooltipValues;
|
|
4156
|
+
}, [additionalTooltipValues]);
|
|
4157
|
+
const handleChartCrosshairChange = react_exports.useCallback(
|
|
4158
|
+
(event) => {
|
|
4159
|
+
if (onPointMouseOver || onPointMouseOut) {
|
|
4160
|
+
if (!event) {
|
|
4161
|
+
if (onPointMouseOut && lastPayloadRef.current) {
|
|
4162
|
+
onPointMouseOut({
|
|
4163
|
+
type: "point.mouseout",
|
|
4164
|
+
originalEvent: lastOriginalEventRef.current,
|
|
4165
|
+
payload: lastPayloadRef.current
|
|
4166
|
+
});
|
|
4167
|
+
}
|
|
4168
|
+
previousMouseoverPayloadRef.current = null;
|
|
4169
|
+
return;
|
|
4170
|
+
}
|
|
4171
|
+
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
|
|
4172
|
+
name: event.seriesKey
|
|
4173
|
+
});
|
|
4174
|
+
delete payload.seriesKey;
|
|
4175
|
+
if (event.rowContext) {
|
|
4176
|
+
Object.assign(
|
|
4177
|
+
payload,
|
|
4178
|
+
Object.keys(event.rowContext).reduce((acc, fieldName) => {
|
|
4179
|
+
acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
|
|
4180
|
+
return acc;
|
|
4181
|
+
}, {})
|
|
4182
|
+
);
|
|
4183
|
+
}
|
|
4184
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
4185
|
+
if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
|
|
4186
|
+
return;
|
|
4187
|
+
}
|
|
4188
|
+
lastPayloadRef.current = updatedPayload;
|
|
4189
|
+
lastOriginalEventRef.current = event;
|
|
4190
|
+
previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
|
|
4191
|
+
if (onPointMouseOver) {
|
|
4192
|
+
onPointMouseOver({
|
|
4193
|
+
type: "point.mouseover",
|
|
4194
|
+
originalEvent: event,
|
|
4195
|
+
payload: updatedPayload
|
|
4196
|
+
});
|
|
4197
|
+
}
|
|
4198
|
+
}
|
|
4199
|
+
},
|
|
4200
|
+
[onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
|
|
4201
|
+
);
|
|
4202
|
+
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}`;
|
|
4203
|
+
const memoizedChart = (0, react_exports.useMemo)(() => {
|
|
4204
|
+
const computedOnRangeZoom = onSelect ? handleChartRangeZoom : void 0;
|
|
4205
|
+
return /* @__PURE__ */ react_exports.createElement(visualization_canvas_exports.RangeSelectionProvider, { key: dataKey }, /* @__PURE__ */ react_exports.createElement(
|
|
4206
|
+
visualization_canvas_exports.TimeSeriesChart,
|
|
3652
4207
|
{
|
|
3653
4208
|
data: chartData,
|
|
3654
4209
|
width: containerWidth,
|
|
@@ -3656,49 +4211,113 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
3656
4211
|
seriesColors,
|
|
3657
4212
|
seriesColorsByField,
|
|
3658
4213
|
seriesConfig: seriesOverrides,
|
|
3659
|
-
legend
|
|
4214
|
+
legend,
|
|
4215
|
+
legendLabels,
|
|
4216
|
+
isSeriesCompare: legendMode === "seriesCompare",
|
|
4217
|
+
maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
|
|
3660
4218
|
scaleConfig,
|
|
3661
4219
|
timestampFormat: "expanded",
|
|
3662
|
-
onCrosshairClick:
|
|
3663
|
-
|
|
4220
|
+
onCrosshairClick: onClick ? handleChartClick : void 0,
|
|
4221
|
+
onCrosshairChange: onPointMouseOver || onPointMouseOut ? handleChartCrosshairChange : void 0,
|
|
4222
|
+
onSeriesClick: onClick ? handleChartLegendClick : void 0,
|
|
4223
|
+
onRangeSelection: handleChartRangeSelection,
|
|
4224
|
+
onRangeZoom: computedOnRangeZoom,
|
|
4225
|
+
serverSideZoom: enableSearchZoom,
|
|
3664
4226
|
userLocale,
|
|
3665
4227
|
events: chartingEventAnnotations,
|
|
3666
|
-
eventsConfig: { renderer: triangleEventAnnotationRenderer }
|
|
4228
|
+
eventsConfig: { renderer: triangleEventAnnotationRenderer },
|
|
4229
|
+
additionalTooltipValuesRef,
|
|
4230
|
+
showXMajorGridLines,
|
|
4231
|
+
showYMajorGridLines,
|
|
4232
|
+
showY2MajorGridLines,
|
|
4233
|
+
showYMinorGridLines,
|
|
4234
|
+
showY2MinorGridLines,
|
|
4235
|
+
showLineSmoothing,
|
|
4236
|
+
dataValuesDisplay,
|
|
4237
|
+
showYMajorTicks,
|
|
4238
|
+
showY2MajorTicks,
|
|
4239
|
+
yAxisMajorTickSize: yAxisMajorTickSizeNum,
|
|
4240
|
+
y2AxisMajorTickSize: y2AxisMajorTickSizeNum,
|
|
4241
|
+
yAxisMajorTickInterval: yAxisMajorTickIntervalNum,
|
|
4242
|
+
y2AxisMajorTickInterval: y2AxisMajorTickIntervalNum,
|
|
4243
|
+
showYMinorTicks,
|
|
4244
|
+
showY2MinorTicks,
|
|
4245
|
+
yAxisMinorTickSize: yAxisMinorTickSizeNum,
|
|
4246
|
+
y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
|
|
4247
|
+
showYAxisWithZero,
|
|
4248
|
+
showY2AxisWithZero
|
|
3667
4249
|
}
|
|
3668
|
-
)
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
4250
|
+
));
|
|
4251
|
+
}, [
|
|
4252
|
+
onSelect,
|
|
4253
|
+
handleChartRangeZoom,
|
|
4254
|
+
dataKey,
|
|
4255
|
+
chartData,
|
|
4256
|
+
containerWidth,
|
|
4257
|
+
containerHeight,
|
|
4258
|
+
seriesColors,
|
|
4259
|
+
seriesColorsByField,
|
|
4260
|
+
seriesOverrides,
|
|
4261
|
+
legend,
|
|
4262
|
+
legendLabels,
|
|
4263
|
+
scaleConfig,
|
|
4264
|
+
onClick,
|
|
4265
|
+
handleChartClick,
|
|
4266
|
+
onPointMouseOver,
|
|
4267
|
+
onPointMouseOut,
|
|
4268
|
+
handleChartCrosshairChange,
|
|
4269
|
+
handleChartLegendClick,
|
|
4270
|
+
handleChartRangeSelection,
|
|
4271
|
+
enableSearchZoom,
|
|
4272
|
+
userLocale,
|
|
4273
|
+
chartingEventAnnotations,
|
|
4274
|
+
showXMajorGridLines,
|
|
4275
|
+
showYMajorGridLines,
|
|
4276
|
+
showY2MajorGridLines,
|
|
4277
|
+
showYMinorGridLines,
|
|
4278
|
+
showY2MinorGridLines,
|
|
4279
|
+
showLineSmoothing,
|
|
4280
|
+
dataValuesDisplay,
|
|
4281
|
+
showYMajorTicks,
|
|
4282
|
+
showY2MajorTicks,
|
|
4283
|
+
yAxisMajorTickSizeNum,
|
|
4284
|
+
y2AxisMajorTickSizeNum,
|
|
4285
|
+
yAxisMajorTickIntervalNum,
|
|
4286
|
+
y2AxisMajorTickIntervalNum,
|
|
4287
|
+
showYMinorTicks,
|
|
4288
|
+
showY2MinorTicks,
|
|
4289
|
+
yAxisMinorTickSizeNum,
|
|
4290
|
+
y2AxisMinorTickSizeNum,
|
|
4291
|
+
showYAxisWithZero,
|
|
4292
|
+
showY2AxisWithZero,
|
|
4293
|
+
legendMode
|
|
4294
|
+
]);
|
|
3684
4295
|
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
3685
|
-
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor }, memoizedChart);
|
|
3686
|
-
}, [
|
|
3687
|
-
return /* @__PURE__ */ react_exports.createElement(
|
|
4296
|
+
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
|
|
4297
|
+
}, [bgColor, memoizedChart]);
|
|
4298
|
+
return /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, trellisEnabled && /* @__PURE__ */ react_exports.createElement(
|
|
4299
|
+
TrellisTitle,
|
|
4300
|
+
{
|
|
4301
|
+
trellisKey,
|
|
4302
|
+
backgroundColor: bgColor,
|
|
4303
|
+
fontColor: defaultFontColor
|
|
4304
|
+
}
|
|
4305
|
+
), /* @__PURE__ */ react_exports.createElement(
|
|
3688
4306
|
TimeSeriesChartContainer,
|
|
3689
4307
|
{
|
|
3690
|
-
height,
|
|
4308
|
+
height: trellisEnabled ? Number(height) - TRELLIS_TITLE_HEIGHT : height,
|
|
3691
4309
|
width,
|
|
3692
4310
|
ref: uplotContainerElement,
|
|
3693
4311
|
"data-test": "timeseries-chart-wrapper"
|
|
3694
4312
|
},
|
|
3695
4313
|
/* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }),
|
|
3696
4314
|
memoizedVisualization
|
|
3697
|
-
);
|
|
4315
|
+
));
|
|
3698
4316
|
};
|
|
3699
4317
|
var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
|
|
3700
4318
|
|
|
3701
4319
|
// src/common/withDashboardViz.tsx
|
|
4320
|
+
var SanitizedTimeSeriesChartWrapper = (0, SanitizeProps_exports.withSanitizedProps)(TimeSeriesChartWrapper_default);
|
|
3702
4321
|
var withDashboardViz = (opts) => {
|
|
3703
4322
|
const {
|
|
3704
4323
|
ReactViz,
|
|
@@ -3707,6 +4326,7 @@ var withDashboardViz = (opts) => {
|
|
|
3707
4326
|
},
|
|
3708
4327
|
computeVizPropsBeforeEval: computeVizPropsBeforeEval2 = () => {
|
|
3709
4328
|
},
|
|
4329
|
+
computeDataFrames,
|
|
3710
4330
|
disableEditModeCover,
|
|
3711
4331
|
useIconPlaceholder
|
|
3712
4332
|
} = opts;
|
|
@@ -3835,11 +4455,19 @@ var withDashboardViz = (opts) => {
|
|
|
3835
4455
|
);
|
|
3836
4456
|
setDataFramesInState(dataFrames);
|
|
3837
4457
|
}
|
|
4458
|
+
let mergedFrames = dataFrames;
|
|
4459
|
+
if (computeDataFrames && dataFrames) {
|
|
4460
|
+
const derivedFrames = computeDataFrames({
|
|
4461
|
+
dataSources: downsampledDataSources,
|
|
4462
|
+
options: optionsToEvaluate.options
|
|
4463
|
+
});
|
|
4464
|
+
mergedFrames = __spreadValues(__spreadValues({}, dataFrames), derivedFrames);
|
|
4465
|
+
}
|
|
3838
4466
|
const result = Options_exports.Options.evaluate(
|
|
3839
4467
|
optionsToEvaluate,
|
|
3840
4468
|
downsampledDataSources,
|
|
3841
4469
|
themeFunc,
|
|
3842
|
-
|
|
4470
|
+
mergedFrames,
|
|
3843
4471
|
getFeatureFlag(featureFlagContext, "visualizations_bypassCloneDeepOptionScope")
|
|
3844
4472
|
);
|
|
3845
4473
|
return result;
|
|
@@ -3927,7 +4555,7 @@ var withDashboardViz = (opts) => {
|
|
|
3927
4555
|
});
|
|
3928
4556
|
}
|
|
3929
4557
|
eventCallbackProps[eventCallbackPropName] = (ev) => {
|
|
3930
|
-
if (ev
|
|
4558
|
+
if (ev == null ? void 0 : ev.payload) {
|
|
3931
4559
|
payload = __spreadValues({}, ev.payload);
|
|
3932
4560
|
}
|
|
3933
4561
|
return onEventTrigger({
|
|
@@ -3951,10 +4579,7 @@ var withDashboardViz = (opts) => {
|
|
|
3951
4579
|
if (useAsyncEvaluatedOptions && Object.keys(evaluatedOptionsToUse).length === 0) {
|
|
3952
4580
|
return null;
|
|
3953
4581
|
}
|
|
3954
|
-
|
|
3955
|
-
if (isAcceleratedRenderOn) {
|
|
3956
|
-
SanitizedViz = (0, SanitizeProps_exports.withSanitizedProps)(TimeSeriesChartWrapper_default);
|
|
3957
|
-
}
|
|
4582
|
+
const SanitizedViz = isAcceleratedRenderOn ? SanitizedTimeSeriesChartWrapper : SanitizedReactViz;
|
|
3958
4583
|
return /* @__PURE__ */ react_exports.createElement(
|
|
3959
4584
|
SanitizedViz,
|
|
3960
4585
|
__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, SplunkVisualization_default.defaults), {
|
|
@@ -4167,7 +4792,6 @@ var StaticMajorAndTrendLayout = [
|
|
|
4167
4792
|
[
|
|
4168
4793
|
{
|
|
4169
4794
|
label: (0, i18n_exports._)("Unit position"),
|
|
4170
|
-
// todo: we need a new editor combining unit and position
|
|
4171
4795
|
option: "unitPosition",
|
|
4172
4796
|
editor: "editor.select",
|
|
4173
4797
|
editorProps: {
|
|
@@ -4477,7 +5101,6 @@ var themes = {
|
|
|
4477
5101
|
enterprise: variables_default.textColor(props),
|
|
4478
5102
|
prisma: variables_default.contentColorActive(props)
|
|
4479
5103
|
})(props),
|
|
4480
|
-
// TODO(fkurniawan): update with SCP-36839
|
|
4481
5104
|
sparklineSeverityColors: (props) => pick_default2({
|
|
4482
5105
|
enterprise: {
|
|
4483
5106
|
dark: JSON.stringify({
|
|
@@ -4625,6 +5248,21 @@ var editorConfig = [
|
|
|
4625
5248
|
}
|
|
4626
5249
|
}
|
|
4627
5250
|
],
|
|
5251
|
+
[
|
|
5252
|
+
{
|
|
5253
|
+
label: (0, i18n_exports._)("Null value display"),
|
|
5254
|
+
option: "sparklineNullValueDisplay",
|
|
5255
|
+
editor: "editor.radioBar",
|
|
5256
|
+
editorProps: {
|
|
5257
|
+
values: [
|
|
5258
|
+
{ label: (0, i18n_exports._)("Gaps"), value: "gaps" },
|
|
5259
|
+
{ label: (0, i18n_exports._)("Zero"), value: "zero" },
|
|
5260
|
+
{ label: (0, i18n_exports._)("Connect"), value: "connect" }
|
|
5261
|
+
]
|
|
5262
|
+
},
|
|
5263
|
+
showEditor: ({ options }) => options.sparklineDisplay !== "off"
|
|
5264
|
+
}
|
|
5265
|
+
],
|
|
4628
5266
|
...TrellisEditorConfig
|
|
4629
5267
|
]
|
|
4630
5268
|
},
|