@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/Timeline.js
CHANGED
|
@@ -115,41 +115,50 @@ var defaultImport5 = __toESM(require("@splunk/visualization-encoding/utils/types
|
|
|
115
115
|
__reExport(types_exports, require("@splunk/visualization-encoding/utils/types"));
|
|
116
116
|
var types_default = "default" in defaultImport5 ? defaultImport5.default : defaultImport5;
|
|
117
117
|
|
|
118
|
+
// esm-externals:@splunk/visualization-color-palettes/editors/PresetPalettes
|
|
119
|
+
var PresetPalettes_exports = {};
|
|
120
|
+
__export(PresetPalettes_exports, {
|
|
121
|
+
default: () => PresetPalettes_default
|
|
122
|
+
});
|
|
123
|
+
var defaultImport6 = __toESM(require("@splunk/visualization-color-palettes/editors/PresetPalettes"));
|
|
124
|
+
__reExport(PresetPalettes_exports, require("@splunk/visualization-color-palettes/editors/PresetPalettes"));
|
|
125
|
+
var PresetPalettes_default = "default" in defaultImport6 ? defaultImport6.default : defaultImport6;
|
|
126
|
+
|
|
118
127
|
// esm-externals:@splunk/visualization-icons
|
|
119
128
|
var visualization_icons_exports = {};
|
|
120
129
|
__export(visualization_icons_exports, {
|
|
121
130
|
default: () => visualization_icons_default
|
|
122
131
|
});
|
|
123
|
-
var
|
|
132
|
+
var defaultImport7 = __toESM(require("@splunk/visualization-icons"));
|
|
124
133
|
__reExport(visualization_icons_exports, require("@splunk/visualization-icons"));
|
|
125
|
-
var visualization_icons_default = "default" in
|
|
134
|
+
var visualization_icons_default = "default" in defaultImport7 ? defaultImport7.default : defaultImport7;
|
|
126
135
|
|
|
127
|
-
// esm-externals:@splunk/visualization-
|
|
128
|
-
var
|
|
129
|
-
__export(
|
|
130
|
-
default: () =>
|
|
136
|
+
// esm-externals:@splunk/visualization-icons/placeholders
|
|
137
|
+
var placeholders_exports = {};
|
|
138
|
+
__export(placeholders_exports, {
|
|
139
|
+
default: () => placeholders_default
|
|
131
140
|
});
|
|
132
|
-
var
|
|
133
|
-
__reExport(
|
|
134
|
-
var
|
|
141
|
+
var defaultImport8 = __toESM(require("@splunk/visualization-icons/placeholders"));
|
|
142
|
+
__reExport(placeholders_exports, require("@splunk/visualization-icons/placeholders"));
|
|
143
|
+
var placeholders_default = "default" in defaultImport8 ? defaultImport8.default : defaultImport8;
|
|
135
144
|
|
|
136
145
|
// esm-externals:@splunk/ui-utils/i18n
|
|
137
146
|
var i18n_exports = {};
|
|
138
147
|
__export(i18n_exports, {
|
|
139
148
|
default: () => i18n_default
|
|
140
149
|
});
|
|
141
|
-
var
|
|
150
|
+
var defaultImport9 = __toESM(require("@splunk/ui-utils/i18n"));
|
|
142
151
|
__reExport(i18n_exports, require("@splunk/ui-utils/i18n"));
|
|
143
|
-
var i18n_default = "default" in
|
|
152
|
+
var i18n_default = "default" in defaultImport9 ? defaultImport9.default : defaultImport9;
|
|
144
153
|
|
|
145
154
|
// esm-externals:@splunk/visualizations-shared/configUtils
|
|
146
155
|
var configUtils_exports = {};
|
|
147
156
|
__export(configUtils_exports, {
|
|
148
157
|
default: () => configUtils_default
|
|
149
158
|
});
|
|
150
|
-
var
|
|
159
|
+
var defaultImport10 = __toESM(require("@splunk/visualizations-shared/configUtils"));
|
|
151
160
|
__reExport(configUtils_exports, require("@splunk/visualizations-shared/configUtils"));
|
|
152
|
-
var configUtils_default = "default" in
|
|
161
|
+
var configUtils_default = "default" in defaultImport10 ? defaultImport10.default : defaultImport10;
|
|
153
162
|
|
|
154
163
|
// src/common/utils/configUtils.ts
|
|
155
164
|
function enhanceConfig(vizConfig) {
|
|
@@ -183,18 +192,18 @@ var pick_exports = {};
|
|
|
183
192
|
__export(pick_exports, {
|
|
184
193
|
default: () => pick_default
|
|
185
194
|
});
|
|
186
|
-
var
|
|
195
|
+
var defaultImport11 = __toESM(require("@splunk/themes/pick"));
|
|
187
196
|
__reExport(pick_exports, require("@splunk/themes/pick"));
|
|
188
|
-
var pick_default = "default" in
|
|
197
|
+
var pick_default = "default" in defaultImport11 ? defaultImport11.default : defaultImport11;
|
|
189
198
|
|
|
190
199
|
// esm-externals:@splunk/themes/variables
|
|
191
200
|
var variables_exports = {};
|
|
192
201
|
__export(variables_exports, {
|
|
193
202
|
default: () => variables_default
|
|
194
203
|
});
|
|
195
|
-
var
|
|
204
|
+
var defaultImport12 = __toESM(require("@splunk/themes/variables"));
|
|
196
205
|
__reExport(variables_exports, require("@splunk/themes/variables"));
|
|
197
|
-
var variables_default = "default" in
|
|
206
|
+
var variables_default = "default" in defaultImport12 ? defaultImport12.default : defaultImport12;
|
|
198
207
|
|
|
199
208
|
// src/common/ThemedDefaults.tsx
|
|
200
209
|
var defaultBackgroundColor = (props) => pick_default({
|
|
@@ -438,7 +447,6 @@ var config = {
|
|
|
438
447
|
* viz icon
|
|
439
448
|
*/
|
|
440
449
|
icon: visualization_icons_exports.Timeline,
|
|
441
|
-
// placeholderIcon: TimelinePlaceholderIcon, TBD
|
|
442
450
|
dataContract,
|
|
443
451
|
size,
|
|
444
452
|
defaultContext,
|
|
@@ -456,7 +464,8 @@ var config = {
|
|
|
456
464
|
}
|
|
457
465
|
},
|
|
458
466
|
supports: ["dynamic-options" /* DYNAMIC_OPTIONS */, "placeholder" /* PLACEHOLDER */, "events" /* EVENTS */],
|
|
459
|
-
themes
|
|
467
|
+
themes,
|
|
468
|
+
placeholderIcon: placeholders_exports.Timeline
|
|
460
469
|
};
|
|
461
470
|
var config_default = enhanceConfig(config);
|
|
462
471
|
|
|
@@ -465,117 +474,117 @@ var react_exports = {};
|
|
|
465
474
|
__export(react_exports, {
|
|
466
475
|
default: () => react_default
|
|
467
476
|
});
|
|
468
|
-
var
|
|
477
|
+
var defaultImport13 = __toESM(require("react"));
|
|
469
478
|
__reExport(react_exports, require("react"));
|
|
470
|
-
var react_default = "default" in
|
|
479
|
+
var react_default = "default" in defaultImport13 ? defaultImport13.default : defaultImport13;
|
|
471
480
|
|
|
472
481
|
// esm-externals:@splunk/themes/getSettingsFromThemedProps
|
|
473
482
|
var getSettingsFromThemedProps_exports = {};
|
|
474
483
|
__export(getSettingsFromThemedProps_exports, {
|
|
475
484
|
default: () => getSettingsFromThemedProps_default
|
|
476
485
|
});
|
|
477
|
-
var
|
|
486
|
+
var defaultImport14 = __toESM(require("@splunk/themes/getSettingsFromThemedProps"));
|
|
478
487
|
__reExport(getSettingsFromThemedProps_exports, require("@splunk/themes/getSettingsFromThemedProps"));
|
|
479
|
-
var getSettingsFromThemedProps_default = "default" in
|
|
488
|
+
var getSettingsFromThemedProps_default = "default" in defaultImport14 ? defaultImport14.default : defaultImport14;
|
|
480
489
|
|
|
481
490
|
// esm-externals:@splunk/visualization-encoding/Options
|
|
482
491
|
var Options_exports = {};
|
|
483
492
|
__export(Options_exports, {
|
|
484
493
|
default: () => Options_default
|
|
485
494
|
});
|
|
486
|
-
var
|
|
495
|
+
var defaultImport15 = __toESM(require("@splunk/visualization-encoding/Options"));
|
|
487
496
|
__reExport(Options_exports, require("@splunk/visualization-encoding/Options"));
|
|
488
|
-
var Options_default = "default" in
|
|
497
|
+
var Options_default = "default" in defaultImport15 ? defaultImport15.default : defaultImport15;
|
|
489
498
|
|
|
490
499
|
// esm-externals:@splunk/visualizations-shared/SanitizeProps
|
|
491
500
|
var SanitizeProps_exports = {};
|
|
492
501
|
__export(SanitizeProps_exports, {
|
|
493
502
|
default: () => SanitizeProps_default
|
|
494
503
|
});
|
|
495
|
-
var
|
|
504
|
+
var defaultImport16 = __toESM(require("@splunk/visualizations-shared/SanitizeProps"));
|
|
496
505
|
__reExport(SanitizeProps_exports, require("@splunk/visualizations-shared/SanitizeProps"));
|
|
497
|
-
var SanitizeProps_default = "default" in
|
|
506
|
+
var SanitizeProps_default = "default" in defaultImport16 ? defaultImport16.default : defaultImport16;
|
|
498
507
|
|
|
499
508
|
// esm-externals:@splunk/visualization-context/TimezoneContext
|
|
500
509
|
var TimezoneContext_exports = {};
|
|
501
510
|
__export(TimezoneContext_exports, {
|
|
502
511
|
default: () => TimezoneContext_default
|
|
503
512
|
});
|
|
504
|
-
var
|
|
513
|
+
var defaultImport17 = __toESM(require("@splunk/visualization-context/TimezoneContext"));
|
|
505
514
|
__reExport(TimezoneContext_exports, require("@splunk/visualization-context/TimezoneContext"));
|
|
506
|
-
var TimezoneContext_default = "default" in
|
|
515
|
+
var TimezoneContext_default = "default" in defaultImport17 ? defaultImport17.default : defaultImport17;
|
|
507
516
|
|
|
508
517
|
// esm-externals:@splunk/moment
|
|
509
518
|
var moment_exports = {};
|
|
510
519
|
__export(moment_exports, {
|
|
511
520
|
default: () => moment_default
|
|
512
521
|
});
|
|
513
|
-
var
|
|
522
|
+
var defaultImport18 = __toESM(require("@splunk/moment"));
|
|
514
523
|
__reExport(moment_exports, require("@splunk/moment"));
|
|
515
|
-
var moment_default = "default" in
|
|
524
|
+
var moment_default = "default" in defaultImport18 ? defaultImport18.default : defaultImport18;
|
|
516
525
|
|
|
517
526
|
// esm-externals:@splunk/visualization-context/FeatureFlagContext
|
|
518
527
|
var FeatureFlagContext_exports = {};
|
|
519
528
|
__export(FeatureFlagContext_exports, {
|
|
520
529
|
default: () => FeatureFlagContext_default
|
|
521
530
|
});
|
|
522
|
-
var
|
|
531
|
+
var defaultImport19 = __toESM(require("@splunk/visualization-context/FeatureFlagContext"));
|
|
523
532
|
__reExport(FeatureFlagContext_exports, require("@splunk/visualization-context/FeatureFlagContext"));
|
|
524
|
-
var FeatureFlagContext_default = "default" in
|
|
533
|
+
var FeatureFlagContext_default = "default" in defaultImport19 ? defaultImport19.default : defaultImport19;
|
|
525
534
|
|
|
526
535
|
// esm-externals:styled-components
|
|
527
536
|
var styled_components_exports = {};
|
|
528
537
|
__export(styled_components_exports, {
|
|
529
538
|
default: () => styled_components_default
|
|
530
539
|
});
|
|
531
|
-
var
|
|
540
|
+
var defaultImport20 = __toESM(require("styled-components"));
|
|
532
541
|
__reExport(styled_components_exports, require("styled-components"));
|
|
533
|
-
var styled_components_default = "default" in
|
|
542
|
+
var styled_components_default = "default" in defaultImport20 ? defaultImport20.default : defaultImport20;
|
|
534
543
|
|
|
535
544
|
// esm-externals:@splunk/visualizations-shared/hocUtils
|
|
536
545
|
var hocUtils_exports = {};
|
|
537
546
|
__export(hocUtils_exports, {
|
|
538
547
|
default: () => hocUtils_default
|
|
539
548
|
});
|
|
540
|
-
var
|
|
549
|
+
var defaultImport21 = __toESM(require("@splunk/visualizations-shared/hocUtils"));
|
|
541
550
|
__reExport(hocUtils_exports, require("@splunk/visualizations-shared/hocUtils"));
|
|
542
|
-
var hocUtils_default = "default" in
|
|
551
|
+
var hocUtils_default = "default" in defaultImport21 ? defaultImport21.default : defaultImport21;
|
|
543
552
|
|
|
544
553
|
// esm-externals:@splunk/visualizations-shared/JSONSchemaUtils
|
|
545
554
|
var JSONSchemaUtils_exports = {};
|
|
546
555
|
__export(JSONSchemaUtils_exports, {
|
|
547
556
|
default: () => JSONSchemaUtils_default
|
|
548
557
|
});
|
|
549
|
-
var
|
|
558
|
+
var defaultImport22 = __toESM(require("@splunk/visualizations-shared/JSONSchemaUtils"));
|
|
550
559
|
__reExport(JSONSchemaUtils_exports, require("@splunk/visualizations-shared/JSONSchemaUtils"));
|
|
551
|
-
var JSONSchemaUtils_default = "default" in
|
|
560
|
+
var JSONSchemaUtils_default = "default" in defaultImport22 ? defaultImport22.default : defaultImport22;
|
|
552
561
|
|
|
553
562
|
// esm-externals:@splunk/async-dynamic-options-evaluator
|
|
554
563
|
var async_dynamic_options_evaluator_exports = {};
|
|
555
564
|
__export(async_dynamic_options_evaluator_exports, {
|
|
556
565
|
default: () => async_dynamic_options_evaluator_default
|
|
557
566
|
});
|
|
558
|
-
var
|
|
567
|
+
var defaultImport23 = __toESM(require("@splunk/async-dynamic-options-evaluator"));
|
|
559
568
|
__reExport(async_dynamic_options_evaluator_exports, require("@splunk/async-dynamic-options-evaluator"));
|
|
560
|
-
var async_dynamic_options_evaluator_default = "default" in
|
|
569
|
+
var async_dynamic_options_evaluator_default = "default" in defaultImport23 ? defaultImport23.default : defaultImport23;
|
|
561
570
|
|
|
562
571
|
// esm-externals:@splunk/ui-utils/id
|
|
563
572
|
var id_exports = {};
|
|
564
573
|
__export(id_exports, {
|
|
565
574
|
default: () => id_default
|
|
566
575
|
});
|
|
567
|
-
var
|
|
576
|
+
var defaultImport24 = __toESM(require("@splunk/ui-utils/id"));
|
|
568
577
|
__reExport(id_exports, require("@splunk/ui-utils/id"));
|
|
569
|
-
var id_default = "default" in
|
|
578
|
+
var id_default = "default" in defaultImport24 ? defaultImport24.default : defaultImport24;
|
|
570
579
|
|
|
571
580
|
// esm-externals:prop-types
|
|
572
581
|
var prop_types_exports = {};
|
|
573
582
|
__export(prop_types_exports, {
|
|
574
583
|
default: () => prop_types_default
|
|
575
584
|
});
|
|
576
|
-
var
|
|
585
|
+
var defaultImport25 = __toESM(require("prop-types"));
|
|
577
586
|
__reExport(prop_types_exports, require("prop-types"));
|
|
578
|
-
var prop_types_default = "default" in
|
|
587
|
+
var prop_types_default = "default" in defaultImport25 ? defaultImport25.default : defaultImport25;
|
|
579
588
|
|
|
580
589
|
// src/common/interfaces/VizActionHandler.ts
|
|
581
590
|
var DefaultVizActionHandler = class {
|
|
@@ -783,18 +792,18 @@ var Message_exports = {};
|
|
|
783
792
|
__export(Message_exports, {
|
|
784
793
|
default: () => Message_default
|
|
785
794
|
});
|
|
786
|
-
var
|
|
795
|
+
var defaultImport26 = __toESM(require("@splunk/visualizations-shared/Message"));
|
|
787
796
|
__reExport(Message_exports, require("@splunk/visualizations-shared/Message"));
|
|
788
|
-
var Message_default = "default" in
|
|
797
|
+
var Message_default = "default" in defaultImport26 ? defaultImport26.default : defaultImport26;
|
|
789
798
|
|
|
790
799
|
// esm-externals:@splunk/visualizations-shared/SizeAwareWrapper
|
|
791
800
|
var SizeAwareWrapper_exports = {};
|
|
792
801
|
__export(SizeAwareWrapper_exports, {
|
|
793
802
|
default: () => SizeAwareWrapper_default
|
|
794
803
|
});
|
|
795
|
-
var
|
|
804
|
+
var defaultImport27 = __toESM(require("@splunk/visualizations-shared/SizeAwareWrapper"));
|
|
796
805
|
__reExport(SizeAwareWrapper_exports, require("@splunk/visualizations-shared/SizeAwareWrapper"));
|
|
797
|
-
var SizeAwareWrapper_default = "default" in
|
|
806
|
+
var SizeAwareWrapper_default = "default" in defaultImport27 ? defaultImport27.default : defaultImport27;
|
|
798
807
|
|
|
799
808
|
// src/common/components/MissingPropsMessage.tsx
|
|
800
809
|
var isMissing = (v) => {
|
|
@@ -849,7 +858,7 @@ var Cover = styled_components_default.div`
|
|
|
849
858
|
bottom: 0;
|
|
850
859
|
`;
|
|
851
860
|
var Blocker = styled_components_default.div.attrs({
|
|
852
|
-
"data-splunk-visualization-version": "28.
|
|
861
|
+
"data-splunk-visualization-version": "28.4.0 - 002bd482f"
|
|
853
862
|
})`
|
|
854
863
|
position: relative;
|
|
855
864
|
width: 100%;
|
|
@@ -871,9 +880,9 @@ var style_exports = {};
|
|
|
871
880
|
__export(style_exports, {
|
|
872
881
|
default: () => style_default
|
|
873
882
|
});
|
|
874
|
-
var
|
|
883
|
+
var defaultImport28 = __toESM(require("@splunk/visualizations-shared/style"));
|
|
875
884
|
__reExport(style_exports, require("@splunk/visualizations-shared/style"));
|
|
876
|
-
var style_default = "default" in
|
|
885
|
+
var style_default = "default" in defaultImport28 ? defaultImport28.default : defaultImport28;
|
|
877
886
|
|
|
878
887
|
// src/common/hocs/FixedSizeContainer.tsx
|
|
879
888
|
var Item = styled_components_default.div.attrs(({ width }) => ({
|
|
@@ -930,7 +939,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
930
939
|
FixSizeItem,
|
|
931
940
|
{
|
|
932
941
|
"data-test": "fix-size-item",
|
|
933
|
-
"data-splunk-visualization-version": "28.
|
|
942
|
+
"data-splunk-visualization-version": "28.4.0 - 002bd482f",
|
|
934
943
|
width,
|
|
935
944
|
height,
|
|
936
945
|
backgroundColor
|
|
@@ -1021,11 +1030,12 @@ var numberUtils_exports = {};
|
|
|
1021
1030
|
__export(numberUtils_exports, {
|
|
1022
1031
|
default: () => numberUtils_default
|
|
1023
1032
|
});
|
|
1024
|
-
var
|
|
1033
|
+
var defaultImport29 = __toESM(require("@splunk/visualizations-shared/numberUtils"));
|
|
1025
1034
|
__reExport(numberUtils_exports, require("@splunk/visualizations-shared/numberUtils"));
|
|
1026
|
-
var numberUtils_default = "default" in
|
|
1035
|
+
var numberUtils_default = "default" in defaultImport29 ? defaultImport29.default : defaultImport29;
|
|
1027
1036
|
|
|
1028
1037
|
// src/common/utils/dataUtils.ts
|
|
1038
|
+
var getFieldName = (field) => typeof field === "string" ? field : field.name;
|
|
1029
1039
|
var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices) => {
|
|
1030
1040
|
const dataLength = data.length;
|
|
1031
1041
|
const downsampledIndices = [];
|
|
@@ -1142,9 +1152,9 @@ var tryToCoerceAllDisplayedFields = (ds, xField, yFields, fieldTypes, options) =
|
|
|
1142
1152
|
let xColumn = [];
|
|
1143
1153
|
const yColumns = [];
|
|
1144
1154
|
const canDownsample = !ds.data.fields.some((field, index) => {
|
|
1145
|
-
var _a
|
|
1146
|
-
const fieldName = (
|
|
1147
|
-
const fieldType = (
|
|
1155
|
+
var _a;
|
|
1156
|
+
const fieldName = getFieldName(field);
|
|
1157
|
+
const fieldType = (_a = fieldTypes[index]) != null ? _a : "unknown";
|
|
1148
1158
|
const column = ds.data.columns[index];
|
|
1149
1159
|
let hasDisplayedColumnThatCantBeDownsampled = false;
|
|
1150
1160
|
if (fieldName === xField) {
|
|
@@ -1403,9 +1413,9 @@ var FeatureFlags_exports = {};
|
|
|
1403
1413
|
__export(FeatureFlags_exports, {
|
|
1404
1414
|
default: () => FeatureFlags_default
|
|
1405
1415
|
});
|
|
1406
|
-
var
|
|
1416
|
+
var defaultImport30 = __toESM(require("@splunk/visualization-context/FeatureFlags"));
|
|
1407
1417
|
__reExport(FeatureFlags_exports, require("@splunk/visualization-context/FeatureFlags"));
|
|
1408
|
-
var FeatureFlags_default = "default" in
|
|
1418
|
+
var FeatureFlags_default = "default" in defaultImport30 ? defaultImport30.default : defaultImport30;
|
|
1409
1419
|
|
|
1410
1420
|
// src/common/utils/featureFlagUtils.ts
|
|
1411
1421
|
var getFeatureFlag = (context, flagName) => {
|
|
@@ -1423,9 +1433,9 @@ var trellisUtils_exports = {};
|
|
|
1423
1433
|
__export(trellisUtils_exports, {
|
|
1424
1434
|
default: () => trellisUtils_default
|
|
1425
1435
|
});
|
|
1426
|
-
var
|
|
1436
|
+
var defaultImport31 = __toESM(require("@splunk/visualizations-shared/trellisUtils"));
|
|
1427
1437
|
__reExport(trellisUtils_exports, require("@splunk/visualizations-shared/trellisUtils"));
|
|
1428
|
-
var trellisUtils_default = "default" in
|
|
1438
|
+
var trellisUtils_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
|
|
1429
1439
|
|
|
1430
1440
|
// src/common/utils/trellisUtils.ts
|
|
1431
1441
|
var turnOffLegendDisplayWhenTrellisIsOn = (isTrellisOn, options) => {
|
|
@@ -1442,9 +1452,9 @@ var visualization_canvas_exports = {};
|
|
|
1442
1452
|
__export(visualization_canvas_exports, {
|
|
1443
1453
|
default: () => visualization_canvas_default
|
|
1444
1454
|
});
|
|
1445
|
-
var
|
|
1455
|
+
var defaultImport32 = __toESM(require("@splunk/visualization-canvas"));
|
|
1446
1456
|
__reExport(visualization_canvas_exports, require("@splunk/visualization-canvas"));
|
|
1447
|
-
var visualization_canvas_default = "default" in
|
|
1457
|
+
var visualization_canvas_default = "default" in defaultImport32 ? defaultImport32.default : defaultImport32;
|
|
1448
1458
|
|
|
1449
1459
|
// src/common/components/VizStyleWrapper.jsx
|
|
1450
1460
|
var VizStyleWrapper = styled_components_default.div.attrs(({ dataTestKey }) => ({
|
|
@@ -1466,9 +1476,9 @@ var Triangle_exports = {};
|
|
|
1466
1476
|
__export(Triangle_exports, {
|
|
1467
1477
|
default: () => Triangle_default
|
|
1468
1478
|
});
|
|
1469
|
-
var
|
|
1479
|
+
var defaultImport33 = __toESM(require("@splunk/react-icons/Triangle"));
|
|
1470
1480
|
__reExport(Triangle_exports, require("@splunk/react-icons/Triangle"));
|
|
1471
|
-
var Triangle_default = "default" in
|
|
1481
|
+
var Triangle_default = "default" in defaultImport33 ? defaultImport33.default : defaultImport33;
|
|
1472
1482
|
|
|
1473
1483
|
// src/common/chartingUtils.ts
|
|
1474
1484
|
var DEFAULT_LINE_WIDTH = 2;
|
|
@@ -1484,14 +1494,29 @@ var getAnnotationsForCanvas = ({
|
|
|
1484
1494
|
var StyledTriangle = styled_components_default(Triangle_default)`
|
|
1485
1495
|
color: ${(props) => props.eventColor || variables_default.severityColorNotice(props)};
|
|
1486
1496
|
`;
|
|
1487
|
-
var triangleEventAnnotationRenderer = ({
|
|
1497
|
+
var triangleEventAnnotationRenderer = ({
|
|
1498
|
+
event,
|
|
1499
|
+
dimensions
|
|
1500
|
+
}) => {
|
|
1488
1501
|
const eventWithColor = event;
|
|
1489
1502
|
return react_default.createElement(StyledTriangle, {
|
|
1503
|
+
width: `${dimensions.width}px`,
|
|
1504
|
+
height: `${dimensions.height}px`,
|
|
1490
1505
|
viewBox: "0 0 24 24",
|
|
1491
1506
|
variant: "filled",
|
|
1492
1507
|
eventColor: eventWithColor.color
|
|
1493
1508
|
});
|
|
1494
1509
|
};
|
|
1510
|
+
var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
|
|
1511
|
+
const rangeSelectEventHandler = eventHandlers.find(
|
|
1512
|
+
(eventHandler) => {
|
|
1513
|
+
var _a;
|
|
1514
|
+
return (_a = eventHandler.options.events) == null ? void 0 : _a.includes("range.select");
|
|
1515
|
+
}
|
|
1516
|
+
);
|
|
1517
|
+
const xAxisIsTime = xField === "_time";
|
|
1518
|
+
return !!rangeSelectEventHandler && xAxisIsTime;
|
|
1519
|
+
};
|
|
1495
1520
|
var canvasSupportedTimeSeriesCharts = ["splunk.line"];
|
|
1496
1521
|
var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
|
|
1497
1522
|
return canvasSupportedTimeSeriesCharts.indexOf(vizConfigKey) > -1;
|
|
@@ -1512,16 +1537,31 @@ var filterChartDataFromInternalFields = (chartData) => {
|
|
|
1512
1537
|
var convert2DArrayToNumbers = (arr) => {
|
|
1513
1538
|
return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
|
|
1514
1539
|
};
|
|
1540
|
+
var parseAxisValue = (val) => {
|
|
1541
|
+
if (val === void 0 || val === null || val === "auto" || val === "") {
|
|
1542
|
+
return void 0;
|
|
1543
|
+
}
|
|
1544
|
+
const num = typeof val === "number" ? val : Number.parseFloat(val);
|
|
1545
|
+
return Number.isNaN(num) ? void 0 : num;
|
|
1546
|
+
};
|
|
1515
1547
|
var SideLegendWidth = 75;
|
|
1516
|
-
var
|
|
1548
|
+
var SeriesCompareLegendWidth = 200;
|
|
1517
1549
|
var getLegend = (props) => {
|
|
1518
1550
|
const legendPlacement = props == null ? void 0 : props.legendDisplay;
|
|
1551
|
+
const { isSeriesCompare } = props;
|
|
1552
|
+
const commonLegendProps = {
|
|
1553
|
+
center: true,
|
|
1554
|
+
fontSize: 12,
|
|
1555
|
+
largerTiles: true,
|
|
1556
|
+
hideSeriesValue: !isSeriesCompare
|
|
1557
|
+
// Show values if in seriesCompare mode
|
|
1558
|
+
};
|
|
1519
1559
|
switch (legendPlacement) {
|
|
1520
1560
|
case "off":
|
|
1521
1561
|
return false;
|
|
1522
1562
|
case "left":
|
|
1523
1563
|
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
|
|
1524
|
-
width: SideLegendWidth
|
|
1564
|
+
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
1525
1565
|
}, commonLegendProps));
|
|
1526
1566
|
case "bottom":
|
|
1527
1567
|
return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
|
|
@@ -1533,7 +1573,7 @@ var getLegend = (props) => {
|
|
|
1533
1573
|
}, commonLegendProps));
|
|
1534
1574
|
default:
|
|
1535
1575
|
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
|
|
1536
|
-
width: SideLegendWidth
|
|
1576
|
+
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
1537
1577
|
}, commonLegendProps));
|
|
1538
1578
|
}
|
|
1539
1579
|
};
|
|
@@ -1569,19 +1609,25 @@ var ellipsisAxisTitle = (axisTitle, containerSpacing, fontSize = 12) => {
|
|
|
1569
1609
|
const end = axisTitle.slice(-halfChars);
|
|
1570
1610
|
return `${start}...${end}`;
|
|
1571
1611
|
};
|
|
1572
|
-
var
|
|
1612
|
+
var getFieldName2 = (field) => {
|
|
1573
1613
|
const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
|
|
1574
1614
|
return fieldName;
|
|
1575
1615
|
};
|
|
1576
1616
|
var getFieldNames = (fields) => {
|
|
1577
|
-
return fields.map((field) =>
|
|
1617
|
+
return fields.map((field) => getFieldName2(field));
|
|
1578
1618
|
};
|
|
1579
|
-
var getXScaleConfig = (label) => {
|
|
1619
|
+
var getXScaleConfig = (label, xAxisLabelVisibility, xAxisLabelRotation) => {
|
|
1580
1620
|
const xConfig = { x: {} };
|
|
1581
1621
|
xConfig.x.label = label;
|
|
1622
|
+
if (xAxisLabelVisibility === "hide") {
|
|
1623
|
+
xConfig.x.hideLabels = true;
|
|
1624
|
+
}
|
|
1625
|
+
if (xAxisLabelRotation !== void 0) {
|
|
1626
|
+
xConfig.x.labelRotation = xAxisLabelRotation;
|
|
1627
|
+
}
|
|
1582
1628
|
return xConfig;
|
|
1583
1629
|
};
|
|
1584
|
-
var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale) => {
|
|
1630
|
+
var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax) => {
|
|
1585
1631
|
const scaleType = yAxisScale != null ? yAxisScale : "linear";
|
|
1586
1632
|
const yConfig = { y: {} };
|
|
1587
1633
|
yConfig.y.label = label;
|
|
@@ -1594,23 +1640,42 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale) => {
|
|
|
1594
1640
|
} else {
|
|
1595
1641
|
yConfig.y.width = label && label.length > 0 ? 30 : 10;
|
|
1596
1642
|
}
|
|
1643
|
+
if (yAxisLabelVisibility === "hide") {
|
|
1644
|
+
yConfig.y.hideLabels = true;
|
|
1645
|
+
}
|
|
1646
|
+
if (yAxisMin !== void 0 || yAxisMax !== void 0) {
|
|
1647
|
+
yConfig.y.range = (u, dataMin, dataMax) => {
|
|
1648
|
+
const min = yAxisMin != null ? yAxisMin : dataMin;
|
|
1649
|
+
const max = yAxisMax != null ? yAxisMax : dataMax;
|
|
1650
|
+
return [min, max];
|
|
1651
|
+
};
|
|
1652
|
+
}
|
|
1597
1653
|
return yConfig;
|
|
1598
1654
|
};
|
|
1599
|
-
var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger) => {
|
|
1655
|
+
var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility, y2AxisMin, y2AxisMax) => {
|
|
1600
1656
|
const y2Config = { y2: {} };
|
|
1601
1657
|
const scaleType = axisScale != null ? axisScale : "linear";
|
|
1602
1658
|
y2Config.y2.label = label;
|
|
1603
1659
|
y2Config.y2.side = "right";
|
|
1604
|
-
y2Config.y2.showGrid = false;
|
|
1605
1660
|
y2Config.y2.type = scaleType;
|
|
1606
1661
|
if (axisAbbreviation !== "none") {
|
|
1607
1662
|
y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
|
|
1608
1663
|
} else if (roundAxisLabelsToInteger) {
|
|
1609
1664
|
y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
|
|
1610
1665
|
}
|
|
1666
|
+
if (y2AxisLabelVisibility === "hide") {
|
|
1667
|
+
y2Config.y2.hideLabels = true;
|
|
1668
|
+
}
|
|
1669
|
+
if (y2AxisMin !== void 0 || y2AxisMax !== void 0) {
|
|
1670
|
+
y2Config.y2.range = (u, dataMin, dataMax) => {
|
|
1671
|
+
const min = y2AxisMin != null ? y2AxisMin : dataMin;
|
|
1672
|
+
const max = y2AxisMax != null ? y2AxisMax : dataMax;
|
|
1673
|
+
return [min, max];
|
|
1674
|
+
};
|
|
1675
|
+
}
|
|
1611
1676
|
return y2Config;
|
|
1612
1677
|
};
|
|
1613
|
-
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode) => {
|
|
1678
|
+
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField) => {
|
|
1614
1679
|
const seriesConfig = {};
|
|
1615
1680
|
let spanGaps;
|
|
1616
1681
|
let replaceNullsWithZero;
|
|
@@ -1642,12 +1707,90 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
1642
1707
|
if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
|
|
1643
1708
|
seriesConfig[field].type = "line";
|
|
1644
1709
|
}
|
|
1710
|
+
if (markerDisplay !== void 0) {
|
|
1711
|
+
seriesConfig[field].markerDisplay = markerDisplay;
|
|
1712
|
+
}
|
|
1713
|
+
const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
|
|
1714
|
+
if (fieldDashStyle) {
|
|
1715
|
+
seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
1716
|
+
}
|
|
1645
1717
|
if (replaceNullsWithZero !== void 0) {
|
|
1646
1718
|
seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
|
|
1647
1719
|
}
|
|
1648
1720
|
});
|
|
1649
1721
|
return seriesConfig;
|
|
1650
1722
|
};
|
|
1723
|
+
var findRangeIndices = (xData, startValue, endValue) => {
|
|
1724
|
+
let startXIndex = -1;
|
|
1725
|
+
let endXIndex = -1;
|
|
1726
|
+
const xDataEpoch = xData.map((val) => {
|
|
1727
|
+
if (typeof val === "string") {
|
|
1728
|
+
return new Date(val).getTime() / 1e3;
|
|
1729
|
+
}
|
|
1730
|
+
return val;
|
|
1731
|
+
});
|
|
1732
|
+
for (let i = 0; i < xDataEpoch.length; i += 1) {
|
|
1733
|
+
if (xDataEpoch[i] >= startValue) {
|
|
1734
|
+
startXIndex = i;
|
|
1735
|
+
break;
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
if (startXIndex === -1 && xDataEpoch.length > 0) {
|
|
1739
|
+
startXIndex = xDataEpoch.length - 1;
|
|
1740
|
+
}
|
|
1741
|
+
for (let i = xDataEpoch.length - 1; i >= 0; i -= 1) {
|
|
1742
|
+
if (xDataEpoch[i] <= endValue) {
|
|
1743
|
+
endXIndex = i;
|
|
1744
|
+
break;
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
if (endXIndex === -1 && xDataEpoch.length > 0) {
|
|
1748
|
+
endXIndex = 0;
|
|
1749
|
+
}
|
|
1750
|
+
return { startXIndex, endXIndex };
|
|
1751
|
+
};
|
|
1752
|
+
|
|
1753
|
+
// src/common/hooks/useTrellisEnabled.ts
|
|
1754
|
+
var useTrellisFeatureFlagOn = () => {
|
|
1755
|
+
const context = (0, react_exports.useContext)(FeatureFlagContext_default);
|
|
1756
|
+
return Boolean(context == null ? void 0 : context.visualizations_enableTrellis);
|
|
1757
|
+
};
|
|
1758
|
+
var useTrellisEnabled = (layoutType = visualization_schemas_exports.LAYOUT_TYPE.Off) => {
|
|
1759
|
+
const trellisFeatureEnabled = useTrellisFeatureFlagOn();
|
|
1760
|
+
return trellisFeatureEnabled && layoutType === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
|
|
1761
|
+
};
|
|
1762
|
+
|
|
1763
|
+
// src/common/components/TrellisTitle.tsx
|
|
1764
|
+
var TRELLIS_TITLE_HEIGHT = 28;
|
|
1765
|
+
var TrellisTitleText = styled_components_default.div`
|
|
1766
|
+
margin-left: 10px;
|
|
1767
|
+
margin-right: 10px;
|
|
1768
|
+
padding-top: 8px;
|
|
1769
|
+
text-overflow: ellipsis;
|
|
1770
|
+
white-space: nowrap;
|
|
1771
|
+
overflow: hidden;
|
|
1772
|
+
`;
|
|
1773
|
+
var TrellisTitleDiv = styled_components_default.div`
|
|
1774
|
+
height: ${TRELLIS_TITLE_HEIGHT}px;
|
|
1775
|
+
font-size: 14px;
|
|
1776
|
+
font-weight: 700;
|
|
1777
|
+
color: ${(props) => props.fontColor};
|
|
1778
|
+
background-color: ${(props) => props.backgroundColor};
|
|
1779
|
+
box-shadow: 0 1px ${(props) => props.backgroundColor}; // this is added to avoid a 1px gap between title and viz divs that showed up intermittently because of pixel rounding error in chrome.
|
|
1780
|
+
`;
|
|
1781
|
+
var TrellisTitle = (props) => {
|
|
1782
|
+
const titleText = String(props.trellisKey).toString();
|
|
1783
|
+
return /* @__PURE__ */ react_exports.createElement(
|
|
1784
|
+
TrellisTitleDiv,
|
|
1785
|
+
{
|
|
1786
|
+
fontColor: props.fontColor,
|
|
1787
|
+
backgroundColor: props.backgroundColor,
|
|
1788
|
+
"data-test": "trellis-title",
|
|
1789
|
+
title: titleText
|
|
1790
|
+
},
|
|
1791
|
+
/* @__PURE__ */ react_exports.createElement(TrellisTitleText, null, titleText)
|
|
1792
|
+
);
|
|
1793
|
+
};
|
|
1651
1794
|
|
|
1652
1795
|
// src/common/TimeSeriesChartWrapper.tsx
|
|
1653
1796
|
var TimeSeriesChartContainer = styled_components_default.div`
|
|
@@ -1658,45 +1801,190 @@ var TimeSeriesChartContainer = styled_components_default.div`
|
|
|
1658
1801
|
position: absolute !important; // This is needed for canvas element export pdf/png to work correctly
|
|
1659
1802
|
}
|
|
1660
1803
|
`;
|
|
1661
|
-
var
|
|
1804
|
+
var appendTrellisToPayload = (payload, trellisKey, trellisSplitBy) => {
|
|
1805
|
+
const result = __spreadValues({}, payload);
|
|
1806
|
+
if (trellisSplitBy) {
|
|
1807
|
+
result["trellis.name"] = trellisSplitBy;
|
|
1808
|
+
}
|
|
1809
|
+
if (trellisKey) {
|
|
1810
|
+
result["trellis.value"] = trellisKey;
|
|
1811
|
+
}
|
|
1812
|
+
return result;
|
|
1813
|
+
};
|
|
1814
|
+
var hasMouseoverPayloadChanged = (currentPayload, previousPayload) => {
|
|
1815
|
+
if (!previousPayload) {
|
|
1816
|
+
return true;
|
|
1817
|
+
}
|
|
1818
|
+
if (currentPayload.index !== previousPayload.index) {
|
|
1819
|
+
return true;
|
|
1820
|
+
}
|
|
1821
|
+
if (currentPayload.seriesIndex !== previousPayload.seriesIndex) {
|
|
1822
|
+
return true;
|
|
1823
|
+
}
|
|
1824
|
+
if (currentPayload["trellis.name"] !== previousPayload["trellis.name"]) {
|
|
1825
|
+
return true;
|
|
1826
|
+
}
|
|
1827
|
+
if (currentPayload["trellis.value"] !== previousPayload["trellis.value"]) {
|
|
1828
|
+
return true;
|
|
1829
|
+
}
|
|
1830
|
+
return false;
|
|
1831
|
+
};
|
|
1832
|
+
var handleClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
|
|
1662
1833
|
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(chartEvent, "value", "seriesKey")), {
|
|
1663
1834
|
name: chartEvent.seriesKey
|
|
1664
1835
|
});
|
|
1665
1836
|
delete payload.seriesKey;
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1837
|
+
if (chartEvent.rowContext) {
|
|
1838
|
+
Object.assign(
|
|
1839
|
+
payload,
|
|
1840
|
+
Object.keys(chartEvent.rowContext).reduce((acc, fieldName) => {
|
|
1841
|
+
acc[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
|
|
1842
|
+
return acc;
|
|
1843
|
+
}, {})
|
|
1844
|
+
);
|
|
1845
|
+
}
|
|
1846
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1847
|
+
if (onClick) {
|
|
1848
|
+
onClick({
|
|
1669
1849
|
type: "point.click",
|
|
1670
1850
|
originalEvent: chartEvent,
|
|
1671
|
-
payload
|
|
1851
|
+
payload: updatedPayload
|
|
1672
1852
|
});
|
|
1673
1853
|
}
|
|
1674
1854
|
};
|
|
1675
|
-
var handleLegendClick = (chartEvent,
|
|
1855
|
+
var handleLegendClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
|
|
1676
1856
|
const payload = {
|
|
1677
1857
|
name: chartEvent
|
|
1678
1858
|
};
|
|
1679
|
-
const
|
|
1680
|
-
if (
|
|
1681
|
-
|
|
1859
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1860
|
+
if (onClick) {
|
|
1861
|
+
onClick({
|
|
1682
1862
|
type: "legend.click",
|
|
1683
1863
|
originalEvent: chartEvent,
|
|
1684
|
-
payload
|
|
1864
|
+
payload: updatedPayload
|
|
1685
1865
|
});
|
|
1686
1866
|
}
|
|
1687
1867
|
};
|
|
1868
|
+
var handleRangeSelection = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
|
|
1869
|
+
var _a;
|
|
1870
|
+
if (!rangeEvent) {
|
|
1871
|
+
return;
|
|
1872
|
+
}
|
|
1873
|
+
const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
|
|
1874
|
+
const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
|
|
1875
|
+
const payload = {
|
|
1876
|
+
startXIndex,
|
|
1877
|
+
startXValue: rangeEvent.start,
|
|
1878
|
+
endXIndex,
|
|
1879
|
+
endXValue: rangeEvent.end
|
|
1880
|
+
};
|
|
1881
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1882
|
+
if (onSelect) {
|
|
1883
|
+
onSelect({
|
|
1884
|
+
type: "range.selectBeforeZoom",
|
|
1885
|
+
originalEvent: rangeEvent,
|
|
1886
|
+
payload: updatedPayload
|
|
1887
|
+
});
|
|
1888
|
+
}
|
|
1889
|
+
};
|
|
1890
|
+
var handleRangeZoom = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
|
|
1891
|
+
var _a;
|
|
1892
|
+
const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
|
|
1893
|
+
const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
|
|
1894
|
+
const payload = {
|
|
1895
|
+
startXIndex,
|
|
1896
|
+
startXValue: rangeEvent.start,
|
|
1897
|
+
endXIndex,
|
|
1898
|
+
endXValue: rangeEvent.end
|
|
1899
|
+
};
|
|
1900
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
1901
|
+
if (onSelect) {
|
|
1902
|
+
onSelect({
|
|
1903
|
+
type: "range.select",
|
|
1904
|
+
originalEvent: rangeEvent,
|
|
1905
|
+
payload: updatedPayload
|
|
1906
|
+
});
|
|
1907
|
+
}
|
|
1908
|
+
};
|
|
1909
|
+
var parseArrayOption = (value) => {
|
|
1910
|
+
if (Array.isArray(value)) {
|
|
1911
|
+
return value;
|
|
1912
|
+
}
|
|
1913
|
+
if (value) {
|
|
1914
|
+
return JSON.parse(value);
|
|
1915
|
+
}
|
|
1916
|
+
return void 0;
|
|
1917
|
+
};
|
|
1688
1918
|
var TimeSeriesChartWrapper = (props) => {
|
|
1689
|
-
|
|
1690
|
-
const {
|
|
1919
|
+
var _b, _c, _d;
|
|
1920
|
+
const _a = props, {
|
|
1921
|
+
width,
|
|
1922
|
+
height,
|
|
1923
|
+
chartData,
|
|
1924
|
+
options,
|
|
1925
|
+
userLocale,
|
|
1926
|
+
annotationX,
|
|
1927
|
+
annotationLabel,
|
|
1928
|
+
annotationColor,
|
|
1929
|
+
legendDisplay,
|
|
1930
|
+
markerDisplay,
|
|
1931
|
+
onClick,
|
|
1932
|
+
onPointMouseOver,
|
|
1933
|
+
onPointMouseOut,
|
|
1934
|
+
onSelect,
|
|
1935
|
+
splitByLayout,
|
|
1936
|
+
trellisKey,
|
|
1937
|
+
trellisSplitBy,
|
|
1691
1938
|
backgroundColor,
|
|
1939
|
+
defaultFontColor,
|
|
1940
|
+
additionalTooltipValues,
|
|
1941
|
+
showYAxisWithZero: showYAxisWithZeroFromProps,
|
|
1942
|
+
showY2AxisWithZero: showY2AxisWithZeroFromProps
|
|
1943
|
+
} = _a, otherOptions = __objRest(_a, [
|
|
1944
|
+
"width",
|
|
1945
|
+
"height",
|
|
1946
|
+
"chartData",
|
|
1947
|
+
"options",
|
|
1948
|
+
"userLocale",
|
|
1949
|
+
"annotationX",
|
|
1950
|
+
"annotationLabel",
|
|
1951
|
+
"annotationColor",
|
|
1952
|
+
"legendDisplay",
|
|
1953
|
+
"markerDisplay",
|
|
1954
|
+
"onClick",
|
|
1955
|
+
"onPointMouseOver",
|
|
1956
|
+
"onPointMouseOut",
|
|
1957
|
+
"onSelect",
|
|
1958
|
+
"splitByLayout",
|
|
1959
|
+
"trellisKey",
|
|
1960
|
+
"trellisSplitBy",
|
|
1961
|
+
"backgroundColor",
|
|
1962
|
+
"defaultFontColor",
|
|
1963
|
+
"additionalTooltipValues",
|
|
1964
|
+
// Extract showYAxisWithZero directly from props for accelerated render mode
|
|
1965
|
+
"showYAxisWithZero",
|
|
1966
|
+
"showY2AxisWithZero"
|
|
1967
|
+
]);
|
|
1968
|
+
const { eventHandlers, xField: xFieldFromProps } = otherOptions;
|
|
1969
|
+
const trellisEnabled = useTrellisEnabled(splitByLayout);
|
|
1970
|
+
const {
|
|
1971
|
+
backgroundColor: bgColorFromOptions,
|
|
1692
1972
|
seriesColors: seriesColorsStr,
|
|
1693
1973
|
fieldColors,
|
|
1974
|
+
legendLabels: legendLabelsStr,
|
|
1975
|
+
legendMode,
|
|
1694
1976
|
"axisTitleX.text": xAxisTitleText,
|
|
1695
1977
|
"axisTitleY.text": yAxisTitleText,
|
|
1696
1978
|
"axisTitleY2.text": y2AxisTitleText,
|
|
1697
1979
|
"axisTitleX.visibility": xAxisTitleVisibility,
|
|
1698
1980
|
"axisTitleY.visibility": yAxisTitleVisibility,
|
|
1699
1981
|
"axisTitleY2.visibility": y2AxisTitleVisibility,
|
|
1982
|
+
"axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
|
|
1983
|
+
"axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
|
|
1984
|
+
"axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
|
|
1985
|
+
"axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
|
|
1986
|
+
"axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
|
|
1987
|
+
"axisLabelsY2.majorUnit": y2AxisMajorUnitFromSimpleXML,
|
|
1700
1988
|
"axisY.abbreviation": yAxisAbbreviation,
|
|
1701
1989
|
"axisY.scale": yAxisScale,
|
|
1702
1990
|
"axisY2.abbreviation": y2AxisAbbreviation,
|
|
@@ -1706,10 +1994,63 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1706
1994
|
"axisLabelsY2.integerUnits": y2IntegerUnits,
|
|
1707
1995
|
"chart.overlayFields": overlayFieldsStr,
|
|
1708
1996
|
"chart.nullValueMode": nullValueMode,
|
|
1709
|
-
|
|
1997
|
+
"chart.showDataLabels": showDataLabels,
|
|
1998
|
+
lineWidth,
|
|
1999
|
+
lineDashStyle,
|
|
2000
|
+
fieldDashStyles: lineDashStylesByFieldStr,
|
|
2001
|
+
yAxisMin: yAxisMinRaw,
|
|
2002
|
+
yAxisMax: yAxisMaxRaw,
|
|
2003
|
+
y2AxisMin: y2AxisMinRaw,
|
|
2004
|
+
y2AxisMax: y2AxisMaxRaw,
|
|
2005
|
+
showXMajorGridLines,
|
|
2006
|
+
showYMajorGridLines,
|
|
2007
|
+
showY2MajorGridLines,
|
|
2008
|
+
showYMinorGridLines,
|
|
2009
|
+
showY2MinorGridLines,
|
|
2010
|
+
showLineSmoothing,
|
|
2011
|
+
yAxisMajorTickVisibility,
|
|
2012
|
+
y2AxisMajorTickVisibility,
|
|
2013
|
+
yAxisMajorTickSize,
|
|
2014
|
+
y2AxisMajorTickSize,
|
|
2015
|
+
yAxisMajorTickInterval,
|
|
2016
|
+
y2AxisMajorTickInterval,
|
|
2017
|
+
yAxisMinorTickVisibility,
|
|
2018
|
+
y2AxisMinorTickVisibility,
|
|
2019
|
+
yAxisMinorTickSize,
|
|
2020
|
+
y2AxisMinorTickSize,
|
|
2021
|
+
showYAxisWithZero: showYAxisWithZeroFromOptions,
|
|
2022
|
+
showY2AxisWithZero: showY2AxisWithZeroFromOptions
|
|
1710
2023
|
} = options;
|
|
2024
|
+
const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
|
|
2025
|
+
const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
|
|
2026
|
+
const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
|
|
2027
|
+
const showYMajorTicks = yAxisMajorTickVisibility === "show";
|
|
2028
|
+
const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
|
|
2029
|
+
const showYMinorTicks = yAxisMinorTickVisibility === "show";
|
|
2030
|
+
const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
|
|
2031
|
+
const yAxisMin = parseAxisValue(yAxisMinRaw);
|
|
2032
|
+
const yAxisMax = parseAxisValue(yAxisMaxRaw);
|
|
2033
|
+
const y2AxisMin = parseAxisValue(y2AxisMinRaw);
|
|
2034
|
+
const y2AxisMax = parseAxisValue(y2AxisMaxRaw);
|
|
2035
|
+
const parseTickInterval = (simpleXMLValue, canvasValue) => {
|
|
2036
|
+
if (simpleXMLValue) return Number(simpleXMLValue);
|
|
2037
|
+
if (canvasValue) return Number(canvasValue);
|
|
2038
|
+
return void 0;
|
|
2039
|
+
};
|
|
2040
|
+
const yAxisMajorTickIntervalNum = parseTickInterval(yAxisMajorUnitFromSimpleXML, yAxisMajorTickInterval);
|
|
2041
|
+
const y2AxisMajorTickIntervalNum = parseTickInterval(
|
|
2042
|
+
y2AxisMajorUnitFromSimpleXML,
|
|
2043
|
+
y2AxisMajorTickInterval
|
|
2044
|
+
);
|
|
2045
|
+
const yAxisMajorTickSizeNum = yAxisMajorTickSize ? Number(yAxisMajorTickSize) : void 0;
|
|
2046
|
+
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize ? Number(y2AxisMajorTickSize) : void 0;
|
|
2047
|
+
const yAxisMinorTickSizeNum = yAxisMinorTickSize ? Number(yAxisMinorTickSize) : void 0;
|
|
2048
|
+
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize ? Number(y2AxisMinorTickSize) : void 0;
|
|
1711
2049
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
1712
2050
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
2051
|
+
const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
|
|
2052
|
+
const legendLabels = parseArrayOption(legendLabelsStr);
|
|
2053
|
+
const bgColor = backgroundColor || bgColorFromOptions;
|
|
1713
2054
|
const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
|
|
1714
2055
|
const [containerHeight, setContainerHeight] = react_exports.useState(Number(props.height));
|
|
1715
2056
|
const cachedHandleResize = react_exports.useCallback((w, h) => {
|
|
@@ -1720,25 +2061,64 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1720
2061
|
fields: chartData.fields,
|
|
1721
2062
|
columns: chartData.seriesList
|
|
1722
2063
|
});
|
|
1723
|
-
const xField =
|
|
2064
|
+
const xField = getFieldName2(filteredChartData.fields[0]);
|
|
1724
2065
|
const yFields = getFieldNames(
|
|
1725
2066
|
filteredChartData.fields.length > 1 ? filteredChartData.fields.slice(1) : []
|
|
1726
2067
|
);
|
|
1727
|
-
const y2Fields =
|
|
1728
|
-
|
|
2068
|
+
const y2Fields = (0, react_exports.useMemo)(
|
|
2069
|
+
() => y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [],
|
|
2070
|
+
[y2FieldsStr]
|
|
2071
|
+
);
|
|
2072
|
+
const overlayFields = (0, react_exports.useMemo)(
|
|
2073
|
+
() => overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [],
|
|
2074
|
+
[overlayFieldsStr]
|
|
2075
|
+
);
|
|
1729
2076
|
let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
|
|
1730
2077
|
xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
|
|
1731
|
-
|
|
2078
|
+
const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
|
|
2079
|
+
let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility);
|
|
1732
2080
|
yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
|
|
1733
2081
|
const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
|
|
1734
2082
|
let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
|
|
1735
2083
|
y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
|
|
1736
|
-
const xScaleConfig =
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
2084
|
+
const xScaleConfig = (0, react_exports.useMemo)(
|
|
2085
|
+
() => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
|
|
2086
|
+
[xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
|
|
2087
|
+
);
|
|
2088
|
+
const yScaleConfig = (0, react_exports.useMemo)(
|
|
2089
|
+
() => getYScaleConfig(
|
|
2090
|
+
yAxisTitle,
|
|
2091
|
+
yAxisAbbreviation,
|
|
2092
|
+
yAxisScale,
|
|
2093
|
+
yAxisLabelVisibility,
|
|
2094
|
+
yAxisMin,
|
|
2095
|
+
yAxisMax
|
|
2096
|
+
),
|
|
2097
|
+
[yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax]
|
|
2098
|
+
);
|
|
2099
|
+
const y2ScaleConfig = (0, react_exports.useMemo)(() => {
|
|
2100
|
+
if (y2Enabled) {
|
|
2101
|
+
return getY2ScaleConfig(
|
|
2102
|
+
y2AxisTitle,
|
|
2103
|
+
y2AxisAbbreviation,
|
|
2104
|
+
y2AxisScale,
|
|
2105
|
+
y2IntegerUnits,
|
|
2106
|
+
y2AxisLabelVisibility,
|
|
2107
|
+
y2AxisMin,
|
|
2108
|
+
y2AxisMax
|
|
2109
|
+
);
|
|
2110
|
+
}
|
|
2111
|
+
return {};
|
|
2112
|
+
}, [
|
|
2113
|
+
y2Enabled,
|
|
2114
|
+
y2AxisTitle,
|
|
2115
|
+
y2AxisAbbreviation,
|
|
2116
|
+
y2AxisScale,
|
|
2117
|
+
y2IntegerUnits,
|
|
2118
|
+
y2AxisLabelVisibility,
|
|
2119
|
+
y2AxisMin,
|
|
2120
|
+
y2AxisMax
|
|
2121
|
+
]);
|
|
1742
2122
|
const uplotContainerElement = (0, react_exports.useRef)(null);
|
|
1743
2123
|
const seriesDataFormatted = [
|
|
1744
2124
|
filteredChartData.columns[0],
|
|
@@ -1746,24 +2126,140 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1746
2126
|
];
|
|
1747
2127
|
chartData.fields = filteredChartData.fields;
|
|
1748
2128
|
chartData.columns = seriesDataFormatted;
|
|
1749
|
-
const seriesOverrides =
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
2129
|
+
const seriesOverrides = (0, react_exports.useMemo)(
|
|
2130
|
+
() => getSeriesOverrides(
|
|
2131
|
+
yFields,
|
|
2132
|
+
y2Fields,
|
|
2133
|
+
lineWidth,
|
|
2134
|
+
overlayFields,
|
|
2135
|
+
y2Enabled,
|
|
2136
|
+
nullValueMode,
|
|
2137
|
+
markerDisplay,
|
|
2138
|
+
lineDashStyle,
|
|
2139
|
+
lineDashStylesByField
|
|
2140
|
+
),
|
|
2141
|
+
[
|
|
2142
|
+
yFields,
|
|
2143
|
+
y2Fields,
|
|
2144
|
+
lineWidth,
|
|
2145
|
+
overlayFields,
|
|
2146
|
+
y2Enabled,
|
|
2147
|
+
nullValueMode,
|
|
2148
|
+
markerDisplay,
|
|
2149
|
+
lineDashStyle,
|
|
2150
|
+
lineDashStylesByField
|
|
2151
|
+
]
|
|
1756
2152
|
);
|
|
1757
|
-
const chartingEventAnnotations =
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
2153
|
+
const chartingEventAnnotations = (0, react_exports.useMemo)(
|
|
2154
|
+
() => getAnnotationsForCanvas({
|
|
2155
|
+
annotationX,
|
|
2156
|
+
annotationColor,
|
|
2157
|
+
annotationLabel
|
|
2158
|
+
}),
|
|
2159
|
+
[annotationX, annotationColor, annotationLabel]
|
|
2160
|
+
);
|
|
2161
|
+
const scaleConfig = (0, react_exports.useMemo)(
|
|
2162
|
+
() => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
|
|
2163
|
+
[xScaleConfig, yScaleConfig, y2ScaleConfig]
|
|
2164
|
+
);
|
|
2165
|
+
const legend = (0, react_exports.useMemo)(
|
|
2166
|
+
() => getLegend({ legendDisplay, isSeriesCompare: legendMode === "seriesCompare" }),
|
|
2167
|
+
[legendDisplay, legendMode]
|
|
2168
|
+
);
|
|
2169
|
+
const handleChartClick = react_exports.useCallback(
|
|
2170
|
+
(event) => {
|
|
2171
|
+
if (onClick) {
|
|
2172
|
+
handleClick(event, onClick, trellisKey, trellisSplitBy);
|
|
2173
|
+
}
|
|
2174
|
+
},
|
|
2175
|
+
[onClick, trellisKey, trellisSplitBy]
|
|
2176
|
+
);
|
|
2177
|
+
const handleChartLegendClick = react_exports.useCallback(
|
|
2178
|
+
(event) => {
|
|
2179
|
+
if (onClick) {
|
|
2180
|
+
handleLegendClick(event, onClick, trellisKey, trellisSplitBy);
|
|
2181
|
+
}
|
|
2182
|
+
},
|
|
2183
|
+
[onClick, trellisKey, trellisSplitBy]
|
|
2184
|
+
);
|
|
2185
|
+
const handleChartRangeSelection = react_exports.useCallback(
|
|
2186
|
+
(range2) => {
|
|
2187
|
+
if (onSelect) {
|
|
2188
|
+
handleRangeSelection(range2, onSelect, chartData, trellisKey, trellisSplitBy);
|
|
2189
|
+
}
|
|
2190
|
+
},
|
|
2191
|
+
[onSelect, chartData, trellisKey, trellisSplitBy]
|
|
2192
|
+
);
|
|
2193
|
+
const handleChartRangeZoom = react_exports.useCallback(
|
|
2194
|
+
(range2) => {
|
|
2195
|
+
if (onSelect) {
|
|
2196
|
+
handleRangeZoom(range2, onSelect, chartData, trellisKey, trellisSplitBy);
|
|
2197
|
+
}
|
|
2198
|
+
},
|
|
2199
|
+
[onSelect, chartData, trellisKey, trellisSplitBy]
|
|
2200
|
+
);
|
|
2201
|
+
const xFieldToUse = xFieldFromProps || xField;
|
|
2202
|
+
const enableSearchZoom = react_exports.useMemo(
|
|
2203
|
+
() => shouldEnableSearchZoom(eventHandlers, xFieldToUse),
|
|
2204
|
+
[eventHandlers, xFieldToUse]
|
|
2205
|
+
);
|
|
2206
|
+
const lastPayloadRef = react_exports.useRef(null);
|
|
2207
|
+
const lastOriginalEventRef = react_exports.useRef(null);
|
|
2208
|
+
const previousMouseoverPayloadRef = react_exports.useRef(null);
|
|
2209
|
+
const additionalTooltipValuesRef = react_exports.useRef(additionalTooltipValues);
|
|
2210
|
+
react_exports.useEffect(() => {
|
|
2211
|
+
additionalTooltipValuesRef.current = additionalTooltipValues;
|
|
2212
|
+
}, [additionalTooltipValues]);
|
|
2213
|
+
const handleChartCrosshairChange = react_exports.useCallback(
|
|
2214
|
+
(event) => {
|
|
2215
|
+
if (onPointMouseOver || onPointMouseOut) {
|
|
2216
|
+
if (!event) {
|
|
2217
|
+
if (onPointMouseOut && lastPayloadRef.current) {
|
|
2218
|
+
onPointMouseOut({
|
|
2219
|
+
type: "point.mouseout",
|
|
2220
|
+
originalEvent: lastOriginalEventRef.current,
|
|
2221
|
+
payload: lastPayloadRef.current
|
|
2222
|
+
});
|
|
2223
|
+
}
|
|
2224
|
+
previousMouseoverPayloadRef.current = null;
|
|
2225
|
+
return;
|
|
2226
|
+
}
|
|
2227
|
+
const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
|
|
2228
|
+
name: event.seriesKey
|
|
2229
|
+
});
|
|
2230
|
+
delete payload.seriesKey;
|
|
2231
|
+
if (event.rowContext) {
|
|
2232
|
+
Object.assign(
|
|
2233
|
+
payload,
|
|
2234
|
+
Object.keys(event.rowContext).reduce((acc, fieldName) => {
|
|
2235
|
+
acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
|
|
2236
|
+
return acc;
|
|
2237
|
+
}, {})
|
|
2238
|
+
);
|
|
2239
|
+
}
|
|
2240
|
+
const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
|
|
2241
|
+
if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
|
|
2242
|
+
return;
|
|
2243
|
+
}
|
|
2244
|
+
lastPayloadRef.current = updatedPayload;
|
|
2245
|
+
lastOriginalEventRef.current = event;
|
|
2246
|
+
previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
|
|
2247
|
+
if (onPointMouseOver) {
|
|
2248
|
+
onPointMouseOver({
|
|
2249
|
+
type: "point.mouseover",
|
|
2250
|
+
originalEvent: event,
|
|
2251
|
+
payload: updatedPayload
|
|
2252
|
+
});
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
},
|
|
2256
|
+
[onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
|
|
2257
|
+
);
|
|
2258
|
+
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}`;
|
|
2259
|
+
const memoizedChart = (0, react_exports.useMemo)(() => {
|
|
2260
|
+
const computedOnRangeZoom = onSelect ? handleChartRangeZoom : void 0;
|
|
2261
|
+
return /* @__PURE__ */ react_exports.createElement(visualization_canvas_exports.RangeSelectionProvider, { key: dataKey }, /* @__PURE__ */ react_exports.createElement(
|
|
2262
|
+
visualization_canvas_exports.TimeSeriesChart,
|
|
1767
2263
|
{
|
|
1768
2264
|
data: chartData,
|
|
1769
2265
|
width: containerWidth,
|
|
@@ -1771,49 +2267,113 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1771
2267
|
seriesColors,
|
|
1772
2268
|
seriesColorsByField,
|
|
1773
2269
|
seriesConfig: seriesOverrides,
|
|
1774
|
-
legend
|
|
2270
|
+
legend,
|
|
2271
|
+
legendLabels,
|
|
2272
|
+
isSeriesCompare: legendMode === "seriesCompare",
|
|
2273
|
+
maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
|
|
1775
2274
|
scaleConfig,
|
|
1776
2275
|
timestampFormat: "expanded",
|
|
1777
|
-
onCrosshairClick:
|
|
1778
|
-
|
|
2276
|
+
onCrosshairClick: onClick ? handleChartClick : void 0,
|
|
2277
|
+
onCrosshairChange: onPointMouseOver || onPointMouseOut ? handleChartCrosshairChange : void 0,
|
|
2278
|
+
onSeriesClick: onClick ? handleChartLegendClick : void 0,
|
|
2279
|
+
onRangeSelection: handleChartRangeSelection,
|
|
2280
|
+
onRangeZoom: computedOnRangeZoom,
|
|
2281
|
+
serverSideZoom: enableSearchZoom,
|
|
1779
2282
|
userLocale,
|
|
1780
2283
|
events: chartingEventAnnotations,
|
|
1781
|
-
eventsConfig: { renderer: triangleEventAnnotationRenderer }
|
|
2284
|
+
eventsConfig: { renderer: triangleEventAnnotationRenderer },
|
|
2285
|
+
additionalTooltipValuesRef,
|
|
2286
|
+
showXMajorGridLines,
|
|
2287
|
+
showYMajorGridLines,
|
|
2288
|
+
showY2MajorGridLines,
|
|
2289
|
+
showYMinorGridLines,
|
|
2290
|
+
showY2MinorGridLines,
|
|
2291
|
+
showLineSmoothing,
|
|
2292
|
+
dataValuesDisplay,
|
|
2293
|
+
showYMajorTicks,
|
|
2294
|
+
showY2MajorTicks,
|
|
2295
|
+
yAxisMajorTickSize: yAxisMajorTickSizeNum,
|
|
2296
|
+
y2AxisMajorTickSize: y2AxisMajorTickSizeNum,
|
|
2297
|
+
yAxisMajorTickInterval: yAxisMajorTickIntervalNum,
|
|
2298
|
+
y2AxisMajorTickInterval: y2AxisMajorTickIntervalNum,
|
|
2299
|
+
showYMinorTicks,
|
|
2300
|
+
showY2MinorTicks,
|
|
2301
|
+
yAxisMinorTickSize: yAxisMinorTickSizeNum,
|
|
2302
|
+
y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
|
|
2303
|
+
showYAxisWithZero,
|
|
2304
|
+
showY2AxisWithZero
|
|
1782
2305
|
}
|
|
1783
|
-
)
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
2306
|
+
));
|
|
2307
|
+
}, [
|
|
2308
|
+
onSelect,
|
|
2309
|
+
handleChartRangeZoom,
|
|
2310
|
+
dataKey,
|
|
2311
|
+
chartData,
|
|
2312
|
+
containerWidth,
|
|
2313
|
+
containerHeight,
|
|
2314
|
+
seriesColors,
|
|
2315
|
+
seriesColorsByField,
|
|
2316
|
+
seriesOverrides,
|
|
2317
|
+
legend,
|
|
2318
|
+
legendLabels,
|
|
2319
|
+
scaleConfig,
|
|
2320
|
+
onClick,
|
|
2321
|
+
handleChartClick,
|
|
2322
|
+
onPointMouseOver,
|
|
2323
|
+
onPointMouseOut,
|
|
2324
|
+
handleChartCrosshairChange,
|
|
2325
|
+
handleChartLegendClick,
|
|
2326
|
+
handleChartRangeSelection,
|
|
2327
|
+
enableSearchZoom,
|
|
2328
|
+
userLocale,
|
|
2329
|
+
chartingEventAnnotations,
|
|
2330
|
+
showXMajorGridLines,
|
|
2331
|
+
showYMajorGridLines,
|
|
2332
|
+
showY2MajorGridLines,
|
|
2333
|
+
showYMinorGridLines,
|
|
2334
|
+
showY2MinorGridLines,
|
|
2335
|
+
showLineSmoothing,
|
|
2336
|
+
dataValuesDisplay,
|
|
2337
|
+
showYMajorTicks,
|
|
2338
|
+
showY2MajorTicks,
|
|
2339
|
+
yAxisMajorTickSizeNum,
|
|
2340
|
+
y2AxisMajorTickSizeNum,
|
|
2341
|
+
yAxisMajorTickIntervalNum,
|
|
2342
|
+
y2AxisMajorTickIntervalNum,
|
|
2343
|
+
showYMinorTicks,
|
|
2344
|
+
showY2MinorTicks,
|
|
2345
|
+
yAxisMinorTickSizeNum,
|
|
2346
|
+
y2AxisMinorTickSizeNum,
|
|
2347
|
+
showYAxisWithZero,
|
|
2348
|
+
showY2AxisWithZero,
|
|
2349
|
+
legendMode
|
|
2350
|
+
]);
|
|
1799
2351
|
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
1800
|
-
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor }, memoizedChart);
|
|
1801
|
-
}, [
|
|
1802
|
-
return /* @__PURE__ */ react_exports.createElement(
|
|
2352
|
+
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
|
|
2353
|
+
}, [bgColor, memoizedChart]);
|
|
2354
|
+
return /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, trellisEnabled && /* @__PURE__ */ react_exports.createElement(
|
|
2355
|
+
TrellisTitle,
|
|
2356
|
+
{
|
|
2357
|
+
trellisKey,
|
|
2358
|
+
backgroundColor: bgColor,
|
|
2359
|
+
fontColor: defaultFontColor
|
|
2360
|
+
}
|
|
2361
|
+
), /* @__PURE__ */ react_exports.createElement(
|
|
1803
2362
|
TimeSeriesChartContainer,
|
|
1804
2363
|
{
|
|
1805
|
-
height,
|
|
2364
|
+
height: trellisEnabled ? Number(height) - TRELLIS_TITLE_HEIGHT : height,
|
|
1806
2365
|
width,
|
|
1807
2366
|
ref: uplotContainerElement,
|
|
1808
2367
|
"data-test": "timeseries-chart-wrapper"
|
|
1809
2368
|
},
|
|
1810
2369
|
/* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }),
|
|
1811
2370
|
memoizedVisualization
|
|
1812
|
-
);
|
|
2371
|
+
));
|
|
1813
2372
|
};
|
|
1814
2373
|
var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
|
|
1815
2374
|
|
|
1816
2375
|
// src/common/withDashboardViz.tsx
|
|
2376
|
+
var SanitizedTimeSeriesChartWrapper = (0, SanitizeProps_exports.withSanitizedProps)(TimeSeriesChartWrapper_default);
|
|
1817
2377
|
var withDashboardViz = (opts) => {
|
|
1818
2378
|
const {
|
|
1819
2379
|
ReactViz,
|
|
@@ -1822,6 +2382,7 @@ var withDashboardViz = (opts) => {
|
|
|
1822
2382
|
},
|
|
1823
2383
|
computeVizPropsBeforeEval = () => {
|
|
1824
2384
|
},
|
|
2385
|
+
computeDataFrames,
|
|
1825
2386
|
disableEditModeCover,
|
|
1826
2387
|
useIconPlaceholder
|
|
1827
2388
|
} = opts;
|
|
@@ -1950,11 +2511,19 @@ var withDashboardViz = (opts) => {
|
|
|
1950
2511
|
);
|
|
1951
2512
|
setDataFramesInState(dataFrames);
|
|
1952
2513
|
}
|
|
2514
|
+
let mergedFrames = dataFrames;
|
|
2515
|
+
if (computeDataFrames && dataFrames) {
|
|
2516
|
+
const derivedFrames = computeDataFrames({
|
|
2517
|
+
dataSources: downsampledDataSources,
|
|
2518
|
+
options: optionsToEvaluate.options
|
|
2519
|
+
});
|
|
2520
|
+
mergedFrames = __spreadValues(__spreadValues({}, dataFrames), derivedFrames);
|
|
2521
|
+
}
|
|
1953
2522
|
const result = Options_exports.Options.evaluate(
|
|
1954
2523
|
optionsToEvaluate,
|
|
1955
2524
|
downsampledDataSources,
|
|
1956
2525
|
themeFunc,
|
|
1957
|
-
|
|
2526
|
+
mergedFrames,
|
|
1958
2527
|
getFeatureFlag(featureFlagContext, "visualizations_bypassCloneDeepOptionScope")
|
|
1959
2528
|
);
|
|
1960
2529
|
return result;
|
|
@@ -2042,7 +2611,7 @@ var withDashboardViz = (opts) => {
|
|
|
2042
2611
|
});
|
|
2043
2612
|
}
|
|
2044
2613
|
eventCallbackProps[eventCallbackPropName] = (ev) => {
|
|
2045
|
-
if (ev
|
|
2614
|
+
if (ev == null ? void 0 : ev.payload) {
|
|
2046
2615
|
payload = __spreadValues({}, ev.payload);
|
|
2047
2616
|
}
|
|
2048
2617
|
return onEventTrigger({
|
|
@@ -2066,10 +2635,7 @@ var withDashboardViz = (opts) => {
|
|
|
2066
2635
|
if (useAsyncEvaluatedOptions && Object.keys(evaluatedOptionsToUse).length === 0) {
|
|
2067
2636
|
return null;
|
|
2068
2637
|
}
|
|
2069
|
-
|
|
2070
|
-
if (isAcceleratedRenderOn) {
|
|
2071
|
-
SanitizedViz = (0, SanitizeProps_exports.withSanitizedProps)(TimeSeriesChartWrapper_default);
|
|
2072
|
-
}
|
|
2638
|
+
const SanitizedViz = isAcceleratedRenderOn ? SanitizedTimeSeriesChartWrapper : SanitizedReactViz;
|
|
2073
2639
|
return /* @__PURE__ */ react_exports.createElement(
|
|
2074
2640
|
SanitizedViz,
|
|
2075
2641
|
__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, SplunkVisualization_default.defaults), {
|
|
@@ -2097,34 +2663,71 @@ var config_exports = {};
|
|
|
2097
2663
|
__export(config_exports, {
|
|
2098
2664
|
default: () => config_default2
|
|
2099
2665
|
});
|
|
2100
|
-
var
|
|
2666
|
+
var defaultImport34 = __toESM(require("@splunk/splunk-utils/config"));
|
|
2101
2667
|
__reExport(config_exports, require("@splunk/splunk-utils/config"));
|
|
2102
|
-
var config_default2 = "default" in
|
|
2668
|
+
var config_default2 = "default" in defaultImport34 ? defaultImport34.default : defaultImport34;
|
|
2103
2669
|
|
|
2104
2670
|
// esm-externals:@splunk/themes
|
|
2105
2671
|
var themes_exports = {};
|
|
2106
2672
|
__export(themes_exports, {
|
|
2107
2673
|
default: () => themes_default
|
|
2108
2674
|
});
|
|
2109
|
-
var
|
|
2675
|
+
var defaultImport35 = __toESM(require("@splunk/themes"));
|
|
2110
2676
|
__reExport(themes_exports, require("@splunk/themes"));
|
|
2111
|
-
var themes_default = "default" in
|
|
2677
|
+
var themes_default = "default" in defaultImport35 ? defaultImport35.default : defaultImport35;
|
|
2112
2678
|
|
|
2113
|
-
// src/common/utils/
|
|
2679
|
+
// src/common/utils/textUtils.ts
|
|
2114
2680
|
var VIZ_FONT_FAMILY = "'Splunk Platform Sans', 'Splunk Data Sans', Roboto, Droid, 'Helvetica Neue', Helvetica, Arial, sans-serif";
|
|
2681
|
+
var truncateText = (text, maxWidth, truncationType, font = `10px ${VIZ_FONT_FAMILY}`) => {
|
|
2682
|
+
const canvas = document.createElement("canvas");
|
|
2683
|
+
const context = canvas.getContext("2d");
|
|
2684
|
+
if (!context) return text;
|
|
2685
|
+
context.font = font;
|
|
2686
|
+
const ellipsis = "...";
|
|
2687
|
+
const ellipsisWidth = context.measureText(ellipsis).width;
|
|
2688
|
+
const fullTextWidth = context.measureText(text).width;
|
|
2689
|
+
if (fullTextWidth <= maxWidth) {
|
|
2690
|
+
return text;
|
|
2691
|
+
}
|
|
2692
|
+
if (truncationType === "ellipsisEnd") {
|
|
2693
|
+
for (let i = text.length - 1; i > 0; i -= 1) {
|
|
2694
|
+
const truncatedText = text.slice(0, i) + ellipsis;
|
|
2695
|
+
if (context.measureText(truncatedText).width <= maxWidth) {
|
|
2696
|
+
return truncatedText;
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2699
|
+
} else if (truncationType === "ellipsisStart") {
|
|
2700
|
+
for (let i = 0; i < text.length; i += 1) {
|
|
2701
|
+
const truncatedText = ellipsis + text.slice(i);
|
|
2702
|
+
if (context.measureText(truncatedText).width <= maxWidth) {
|
|
2703
|
+
return truncatedText;
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
} else if (truncationType === "ellipsisMiddle") {
|
|
2707
|
+
for (let i = 0; i < text.length / 2; i += 1) {
|
|
2708
|
+
const left = text.slice(0, Math.floor(text.length / 2) - i);
|
|
2709
|
+
const right = text.slice(Math.ceil(text.length / 2) + i);
|
|
2710
|
+
const truncatedText = left + ellipsis + right;
|
|
2711
|
+
if (context.measureText(left).width + ellipsisWidth + context.measureText(right).width <= maxWidth) {
|
|
2712
|
+
return truncatedText;
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
return ellipsis;
|
|
2717
|
+
};
|
|
2115
2718
|
|
|
2116
2719
|
// src/Timeline/PureTimeline/src/utils/timelineUtils.ts
|
|
2117
2720
|
function hexToRgba(hex, opacity = 1) {
|
|
2118
2721
|
const hexString = typeof hex === "string" ? hex.replace("#", "") : "#009CEB";
|
|
2119
|
-
const r = parseInt(hexString.substring(0, 2), 16);
|
|
2120
|
-
const g = parseInt(hexString.substring(2, 4), 16);
|
|
2121
|
-
const b = parseInt(hexString.substring(4, 6), 16);
|
|
2722
|
+
const r = Number.parseInt(hexString.substring(0, 2), 16);
|
|
2723
|
+
const g = Number.parseInt(hexString.substring(2, 4), 16);
|
|
2724
|
+
const b = Number.parseInt(hexString.substring(4, 6), 16);
|
|
2122
2725
|
const alpha = Math.max(0, Math.min(opacity, 1));
|
|
2123
2726
|
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
2124
2727
|
}
|
|
2125
2728
|
function getAlternateColor(hex, percent) {
|
|
2126
2729
|
const cleanedHex = typeof hex === "string" ? hex.replace("#", "") : "#009CEB";
|
|
2127
|
-
const bigint = parseInt(cleanedHex, 16);
|
|
2730
|
+
const bigint = Number.parseInt(cleanedHex, 16);
|
|
2128
2731
|
const r = bigint >> 16 & 255;
|
|
2129
2732
|
const g = bigint >> 8 & 255;
|
|
2130
2733
|
const b = bigint & 255;
|
|
@@ -2160,16 +2763,28 @@ var toTimestamp = (dateStr, timezone = {}) => {
|
|
|
2160
2763
|
}
|
|
2161
2764
|
if (!dateTime.isValid()) {
|
|
2162
2765
|
console.error("Invalid date:", dateStr);
|
|
2163
|
-
return NaN;
|
|
2766
|
+
return Number.NaN;
|
|
2164
2767
|
}
|
|
2165
2768
|
return dateTime.toDate().getTime();
|
|
2166
2769
|
} catch (error) {
|
|
2167
2770
|
console.error("Invalid date or timezone:", dateStr, timezone, error);
|
|
2168
|
-
return NaN;
|
|
2771
|
+
return Number.NaN;
|
|
2169
2772
|
}
|
|
2170
2773
|
};
|
|
2171
|
-
function mapDataToTimeline(
|
|
2774
|
+
function mapDataToTimeline(mapDataToTimelineType) {
|
|
2172
2775
|
var _a, _b;
|
|
2776
|
+
const {
|
|
2777
|
+
resultLimit,
|
|
2778
|
+
x,
|
|
2779
|
+
y,
|
|
2780
|
+
duration,
|
|
2781
|
+
category = [],
|
|
2782
|
+
dataColors = [],
|
|
2783
|
+
seriesColors = [],
|
|
2784
|
+
additionalTooltipValues = [],
|
|
2785
|
+
timezone = {},
|
|
2786
|
+
defaultColor = "#009CEB"
|
|
2787
|
+
} = mapDataToTimelineType;
|
|
2173
2788
|
const categoricalColors = /* @__PURE__ */ new Map();
|
|
2174
2789
|
const lanesSet = /* @__PURE__ */ new Set();
|
|
2175
2790
|
const laneSeriesMap = /* @__PURE__ */ new Map();
|
|
@@ -2190,7 +2805,7 @@ function mapDataToTimeline(resultLimit, x, y, duration, category = [], dataColor
|
|
|
2190
2805
|
} else if (categoryValue) {
|
|
2191
2806
|
color = categoricalColors.get(categoryValue);
|
|
2192
2807
|
}
|
|
2193
|
-
const start = toTimestamp(x[i].toString(),
|
|
2808
|
+
const start = toTimestamp(x[i].toString(), timezone);
|
|
2194
2809
|
const durationValue = duration[i] || 0;
|
|
2195
2810
|
const end = start + durationValue;
|
|
2196
2811
|
const additionalTooltipValue = additionalTooltipValues ? additionalTooltipValues[i] : null;
|
|
@@ -2207,7 +2822,7 @@ function mapDataToTimeline(resultLimit, x, y, duration, category = [], dataColor
|
|
|
2207
2822
|
additionalTooltipValue
|
|
2208
2823
|
});
|
|
2209
2824
|
if (i > 0) {
|
|
2210
|
-
const prevStart = toTimestamp(x[i - 1].toString(),
|
|
2825
|
+
const prevStart = toTimestamp(x[i - 1].toString(), timezone);
|
|
2211
2826
|
const timeDiff = start - prevStart;
|
|
2212
2827
|
timeDifferences.push(timeDiff);
|
|
2213
2828
|
}
|
|
@@ -2241,43 +2856,6 @@ var drawRoundedRect = (ctx, x, y, width, height, radius) => {
|
|
|
2241
2856
|
ctx.fill();
|
|
2242
2857
|
ctx.stroke();
|
|
2243
2858
|
};
|
|
2244
|
-
var truncateText = (text, maxWidth, truncationType, font = `10px ${VIZ_FONT_FAMILY}`) => {
|
|
2245
|
-
const canvas = document.createElement("canvas");
|
|
2246
|
-
const context = canvas.getContext("2d");
|
|
2247
|
-
if (!context) return text;
|
|
2248
|
-
context.font = font;
|
|
2249
|
-
const ellipsis = "...";
|
|
2250
|
-
const ellipsisWidth = context.measureText(ellipsis).width;
|
|
2251
|
-
const fullTextWidth = context.measureText(text).width;
|
|
2252
|
-
if (fullTextWidth <= maxWidth) {
|
|
2253
|
-
return text;
|
|
2254
|
-
}
|
|
2255
|
-
if (truncationType === "ellipsisEnd") {
|
|
2256
|
-
for (let i = text.length - 1; i > 0; i -= 1) {
|
|
2257
|
-
const truncatedText = text.slice(0, i) + ellipsis;
|
|
2258
|
-
if (context.measureText(truncatedText).width <= maxWidth) {
|
|
2259
|
-
return truncatedText;
|
|
2260
|
-
}
|
|
2261
|
-
}
|
|
2262
|
-
} else if (truncationType === "ellipsisStart") {
|
|
2263
|
-
for (let i = 0; i < text.length; i += 1) {
|
|
2264
|
-
const truncatedText = ellipsis + text.slice(i);
|
|
2265
|
-
if (context.measureText(truncatedText).width <= maxWidth) {
|
|
2266
|
-
return truncatedText;
|
|
2267
|
-
}
|
|
2268
|
-
}
|
|
2269
|
-
} else if (truncationType === "ellipsisMiddle") {
|
|
2270
|
-
for (let i = 0; i < text.length / 2; i += 1) {
|
|
2271
|
-
const left = text.slice(0, Math.floor(text.length / 2) - i);
|
|
2272
|
-
const right = text.slice(Math.ceil(text.length / 2) + i);
|
|
2273
|
-
const truncatedText = left + ellipsis + right;
|
|
2274
|
-
if (context.measureText(left).width + ellipsisWidth + context.measureText(right).width <= maxWidth) {
|
|
2275
|
-
return truncatedText;
|
|
2276
|
-
}
|
|
2277
|
-
}
|
|
2278
|
-
}
|
|
2279
|
-
return ellipsis;
|
|
2280
|
-
};
|
|
2281
2859
|
var getTickInterval = (averageDiff) => {
|
|
2282
2860
|
if (averageDiff < 6e4) {
|
|
2283
2861
|
return "1s";
|
|
@@ -2341,26 +2919,56 @@ var tooltipLocaleTimeFormat = (displaySeconds) => {
|
|
|
2341
2919
|
year: "numeric"
|
|
2342
2920
|
}, seconds);
|
|
2343
2921
|
};
|
|
2922
|
+
var applyCanvasScale = (u, scaleFactor) => {
|
|
2923
|
+
var _a;
|
|
2924
|
+
if (!((_a = u.ctx) == null ? void 0 : _a.canvas)) {
|
|
2925
|
+
return;
|
|
2926
|
+
}
|
|
2927
|
+
const { canvas } = u.ctx;
|
|
2928
|
+
const dpr = window.devicePixelRatio || 1;
|
|
2929
|
+
const scale = dpr * scaleFactor;
|
|
2930
|
+
canvas.width = Math.round(u.width * scale);
|
|
2931
|
+
canvas.height = Math.round(u.height * scale);
|
|
2932
|
+
canvas.style.width = `${u.width}px`;
|
|
2933
|
+
canvas.style.height = `${u.height}px`;
|
|
2934
|
+
u.ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
2935
|
+
u.ctx.scale(scale, scale);
|
|
2936
|
+
};
|
|
2937
|
+
var createTimelineCanvasScaleHooks = (scaleFactor, onReady) => ({
|
|
2938
|
+
init: (u) => {
|
|
2939
|
+
applyCanvasScale(u, scaleFactor);
|
|
2940
|
+
},
|
|
2941
|
+
setSize: (u) => {
|
|
2942
|
+
applyCanvasScale(u, scaleFactor);
|
|
2943
|
+
if (onReady) {
|
|
2944
|
+
onReady(u);
|
|
2945
|
+
}
|
|
2946
|
+
}
|
|
2947
|
+
});
|
|
2344
2948
|
|
|
2345
2949
|
// esm-externals:uplot-react
|
|
2346
2950
|
var uplot_react_exports = {};
|
|
2347
2951
|
__export(uplot_react_exports, {
|
|
2348
2952
|
default: () => uplot_react_default
|
|
2349
2953
|
});
|
|
2350
|
-
var
|
|
2954
|
+
var defaultImport36 = __toESM(require("uplot-react"));
|
|
2351
2955
|
__reExport(uplot_react_exports, require("uplot-react"));
|
|
2352
|
-
var uplot_react_default = "default" in
|
|
2956
|
+
var uplot_react_default = "default" in defaultImport36 ? defaultImport36.default : defaultImport36;
|
|
2353
2957
|
|
|
2354
2958
|
// esm-externals:@splunk/visualization-context/ZoomContext
|
|
2355
2959
|
var ZoomContext_exports = {};
|
|
2356
2960
|
__export(ZoomContext_exports, {
|
|
2357
2961
|
default: () => ZoomContext_default
|
|
2358
2962
|
});
|
|
2359
|
-
var
|
|
2963
|
+
var defaultImport37 = __toESM(require("@splunk/visualization-context/ZoomContext"));
|
|
2360
2964
|
__reExport(ZoomContext_exports, require("@splunk/visualization-context/ZoomContext"));
|
|
2361
|
-
var ZoomContext_default = "default" in
|
|
2965
|
+
var ZoomContext_default = "default" in defaultImport37 ? defaultImport37.default : defaultImport37;
|
|
2362
2966
|
|
|
2363
2967
|
// src/Timeline/PureTimeline/src/CursorPlugin.tsx
|
|
2968
|
+
var FIXED_LANE_HEIGHT = 32;
|
|
2969
|
+
var MIN_BAR_WIDTH = 20;
|
|
2970
|
+
var CIRCLE_X_OFFSET = 10;
|
|
2971
|
+
var CIRCLE_LANE_SCALE_FACTOR = 0.85;
|
|
2364
2972
|
var CursorPlugin = (props) => {
|
|
2365
2973
|
const {
|
|
2366
2974
|
laneSeries,
|
|
@@ -2372,25 +2980,9 @@ var CursorPlugin = (props) => {
|
|
|
2372
2980
|
setHighlightedLane,
|
|
2373
2981
|
handleEventClick,
|
|
2374
2982
|
tooltipRef,
|
|
2375
|
-
locale
|
|
2983
|
+
locale,
|
|
2984
|
+
scaleFactor
|
|
2376
2985
|
} = props;
|
|
2377
|
-
const FIXED_LANE_HEIGHT = 32;
|
|
2378
|
-
const MIN_BAR_WIDTH = 20;
|
|
2379
|
-
const CIRCLE_X_OFFSET = 10;
|
|
2380
|
-
const CIRCLE_LANE_SCALE_FACTOR = 0.85;
|
|
2381
|
-
const zoom = (0, ZoomContext_exports.useZoomContext)();
|
|
2382
|
-
const initFullscreenEl = typeof document !== "undefined" ? document.fullscreenElement : null;
|
|
2383
|
-
const initScale = initFullscreenEl && initFullscreenEl.tagName !== "BODY" ? 1 : zoom || 1;
|
|
2384
|
-
const scaleFactorRef = (0, react_exports.useRef)(initScale);
|
|
2385
|
-
(0, react_exports.useEffect)(() => {
|
|
2386
|
-
const fullscreenEl = document.fullscreenElement;
|
|
2387
|
-
if (fullscreenEl && fullscreenEl.tagName !== "BODY") {
|
|
2388
|
-
scaleFactorRef.current = 1;
|
|
2389
|
-
} else {
|
|
2390
|
-
scaleFactorRef.current = zoom;
|
|
2391
|
-
}
|
|
2392
|
-
}, [zoom]);
|
|
2393
|
-
const dpr = window.devicePixelRatio || 1;
|
|
2394
2986
|
let previousTooltipContent = null;
|
|
2395
2987
|
const handleMouseLeave = (u) => {
|
|
2396
2988
|
const xCursorLine = u.root.querySelector(".u-cursor-x");
|
|
@@ -2419,21 +3011,16 @@ var CursorPlugin = (props) => {
|
|
|
2419
3011
|
init: (u) => {
|
|
2420
3012
|
const chartContainer = u.root;
|
|
2421
3013
|
chartContainer.addEventListener("click", handleClick2);
|
|
2422
|
-
const
|
|
3014
|
+
const pointerExitHandler = (e) => {
|
|
2423
3015
|
if (!chartContainer.contains(e.relatedTarget)) {
|
|
2424
3016
|
handleMouseLeave(u);
|
|
2425
3017
|
}
|
|
2426
3018
|
};
|
|
2427
|
-
chartContainer.addEventListener("pointerleave",
|
|
2428
|
-
|
|
2429
|
-
if (!chartContainer.contains(e.relatedTarget)) {
|
|
2430
|
-
handleMouseLeave(u);
|
|
2431
|
-
}
|
|
2432
|
-
};
|
|
2433
|
-
document.addEventListener("pointerout", pointerOutHandler, true);
|
|
3019
|
+
chartContainer.addEventListener("pointerleave", pointerExitHandler);
|
|
3020
|
+
document.addEventListener("pointerout", pointerExitHandler, true);
|
|
2434
3021
|
return () => {
|
|
2435
|
-
chartContainer.removeEventListener("pointerleave",
|
|
2436
|
-
document.removeEventListener("pointerout",
|
|
3022
|
+
chartContainer.removeEventListener("pointerleave", pointerExitHandler);
|
|
3023
|
+
document.removeEventListener("pointerout", pointerExitHandler, true);
|
|
2437
3024
|
chartContainer.removeEventListener("click", handleClick2);
|
|
2438
3025
|
};
|
|
2439
3026
|
},
|
|
@@ -2442,128 +3029,294 @@ var CursorPlugin = (props) => {
|
|
|
2442
3029
|
const xCursorLine = u.root.querySelector(".u-cursor-x");
|
|
2443
3030
|
if (!mouseEvent) {
|
|
2444
3031
|
tooltipRef.current.visible = false;
|
|
2445
|
-
|
|
2446
|
-
xCursorLine.classList.add("u-off");
|
|
2447
|
-
}
|
|
3032
|
+
toggleCursorLine(xCursorLine, true);
|
|
2448
3033
|
return;
|
|
2449
3034
|
}
|
|
2450
3035
|
const rect = u.root.getBoundingClientRect();
|
|
2451
|
-
const
|
|
2452
|
-
const
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
Math.max(1, Math.floor(yPos / FIXED_LANE_HEIGHT) + 1)
|
|
2469
|
-
);
|
|
2470
|
-
const events = laneSeries[cursorSeriesIndex - 1];
|
|
2471
|
-
let showTooltip = false;
|
|
2472
|
-
let tooltipContent = {};
|
|
2473
|
-
let tooltipMeta = {};
|
|
2474
|
-
let tooltipX = 0;
|
|
2475
|
-
let tooltipY = 0;
|
|
2476
|
-
let overflow = false;
|
|
2477
|
-
if (events) {
|
|
2478
|
-
const sortedEvents = [...events].sort((a, b) => {
|
|
2479
|
-
if (a.duration === 0 && b.duration !== 0) return 1;
|
|
2480
|
-
if (a.duration !== 0 && b.duration === 0) return -1;
|
|
2481
|
-
return 0;
|
|
3036
|
+
const dpr = window.devicePixelRatio || 1;
|
|
3037
|
+
const cursorPosition = getCursorPosition({
|
|
3038
|
+
mouseEvent,
|
|
3039
|
+
rect,
|
|
3040
|
+
bbox: u.bbox,
|
|
3041
|
+
scaleFactor,
|
|
3042
|
+
dpr
|
|
3043
|
+
});
|
|
3044
|
+
u.cursor.left = cursorPosition.x;
|
|
3045
|
+
u.cursor.top = cursorPosition.y;
|
|
3046
|
+
if (updateCursorLine(xCursorLine, cursorPosition, u, dpr)) {
|
|
3047
|
+
clearTooltipIfVisible({
|
|
3048
|
+
chart: u,
|
|
3049
|
+
tooltipRef,
|
|
3050
|
+
setHighlightedLane,
|
|
3051
|
+
setHighlightedEvent,
|
|
3052
|
+
setHighlightedCategory
|
|
2482
3053
|
});
|
|
2483
|
-
|
|
2484
|
-
for (let i = sortedEvents.length - 1; i >= 0; i -= 1) {
|
|
2485
|
-
const event = sortedEvents[i];
|
|
2486
|
-
const xStartFraction = (event.start - u.scales.x.min) / durationPerTick;
|
|
2487
|
-
const xStartBase = xStartFraction * widthPerTick;
|
|
2488
|
-
const xStart = cursorSeriesIndex - 1 === 0 ? xStartBase + 2 : xStartBase;
|
|
2489
|
-
if (event.duration === 0) {
|
|
2490
|
-
const circleRadius = FIXED_LANE_HEIGHT * CIRCLE_LANE_SCALE_FACTOR / 2;
|
|
2491
|
-
if (xPos >= xStart - circleRadius && xPos <= xStart + circleRadius) {
|
|
2492
|
-
tooltipX = xStart + CIRCLE_X_OFFSET;
|
|
2493
|
-
tooltipY = cursorSeriesIndex * FIXED_LANE_HEIGHT;
|
|
2494
|
-
showTooltip = true;
|
|
2495
|
-
}
|
|
2496
|
-
} else {
|
|
2497
|
-
const durationWidth = event.duration / durationPerTick * widthPerTick;
|
|
2498
|
-
const barWidth = Math.max(durationWidth, MIN_BAR_WIDTH);
|
|
2499
|
-
if (xPos >= xStart && xPos <= xStart + barWidth) {
|
|
2500
|
-
tooltipX = xStart + CIRCLE_X_OFFSET;
|
|
2501
|
-
tooltipY = cursorSeriesIndex * FIXED_LANE_HEIGHT;
|
|
2502
|
-
showTooltip = true;
|
|
2503
|
-
}
|
|
2504
|
-
}
|
|
2505
|
-
if (showTooltip) {
|
|
2506
|
-
const displaySeconds = durationPerTick < 6e4 && event.duration !== 0;
|
|
2507
|
-
const startTime = new Date(event.start).toLocaleTimeString(
|
|
2508
|
-
locale,
|
|
2509
|
-
tooltipLocaleTimeFormat(displaySeconds)
|
|
2510
|
-
);
|
|
2511
|
-
const endTime = new Date(event.end).toLocaleTimeString(
|
|
2512
|
-
locale,
|
|
2513
|
-
tooltipLocaleTimeFormat(displaySeconds)
|
|
2514
|
-
);
|
|
2515
|
-
const lane = lanes[cursorSeriesIndex - 1];
|
|
2516
|
-
tooltipContent = __spreadValues({
|
|
2517
|
-
from: startTime,
|
|
2518
|
-
to: endTime,
|
|
2519
|
-
lane,
|
|
2520
|
-
category: (event == null ? void 0 : event.category) || void 0
|
|
2521
|
-
}, event.additionalTooltipValue);
|
|
2522
|
-
tooltipMeta = __spreadValues({
|
|
2523
|
-
duration: event.duration
|
|
2524
|
-
}, event.additionalTooltipValue);
|
|
2525
|
-
const tooltipWidth = 85;
|
|
2526
|
-
const plotRightEdge = u.bbox.width / dpr;
|
|
2527
|
-
if (tooltipX + tooltipWidth > plotRightEdge) {
|
|
2528
|
-
overflow = true;
|
|
2529
|
-
tooltipY -= FIXED_LANE_HEIGHT / 2;
|
|
2530
|
-
tooltipX -= event.duration === 0 ? FIXED_LANE_HEIGHT : MIN_BAR_WIDTH;
|
|
2531
|
-
}
|
|
2532
|
-
if (!tooltipRef.current.visible || tooltipRef.current.content !== tooltipContent) {
|
|
2533
|
-
u.root.style.cursor = "pointer";
|
|
2534
|
-
tooltipRef.current = {
|
|
2535
|
-
visible: true,
|
|
2536
|
-
x: tooltipX,
|
|
2537
|
-
y: tooltipY,
|
|
2538
|
-
overflow,
|
|
2539
|
-
content: tooltipContent,
|
|
2540
|
-
meta: tooltipMeta
|
|
2541
|
-
};
|
|
2542
|
-
setHighlightedLane(lane);
|
|
2543
|
-
setHighlightedEvent(event);
|
|
2544
|
-
setHighlightedCategory(event.category);
|
|
2545
|
-
}
|
|
2546
|
-
break;
|
|
2547
|
-
}
|
|
2548
|
-
}
|
|
3054
|
+
return;
|
|
2549
3055
|
}
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
3056
|
+
const tooltipState = getTooltipState({
|
|
3057
|
+
cursorPosition,
|
|
3058
|
+
laneSeries,
|
|
3059
|
+
lanes,
|
|
3060
|
+
numTicks,
|
|
3061
|
+
durationPerTick,
|
|
3062
|
+
locale,
|
|
3063
|
+
dpr,
|
|
3064
|
+
chart: u
|
|
3065
|
+
});
|
|
3066
|
+
if (!tooltipState) {
|
|
3067
|
+
clearTooltipIfVisible({
|
|
3068
|
+
chart: u,
|
|
3069
|
+
tooltipRef,
|
|
3070
|
+
setHighlightedLane,
|
|
3071
|
+
setHighlightedEvent,
|
|
3072
|
+
setHighlightedCategory
|
|
3073
|
+
});
|
|
3074
|
+
return;
|
|
2561
3075
|
}
|
|
3076
|
+
applyTooltipState({
|
|
3077
|
+
chart: u,
|
|
3078
|
+
tooltipState,
|
|
3079
|
+
tooltipRef,
|
|
3080
|
+
setHighlightedLane,
|
|
3081
|
+
setHighlightedEvent,
|
|
3082
|
+
setHighlightedCategory
|
|
3083
|
+
});
|
|
2562
3084
|
}
|
|
2563
3085
|
}
|
|
2564
3086
|
};
|
|
2565
3087
|
};
|
|
2566
3088
|
var CursorPlugin_default = CursorPlugin;
|
|
3089
|
+
function toggleCursorLine(xCursorLine, shouldHide) {
|
|
3090
|
+
if (!xCursorLine) {
|
|
3091
|
+
return;
|
|
3092
|
+
}
|
|
3093
|
+
if (shouldHide) {
|
|
3094
|
+
xCursorLine.classList.add("u-off");
|
|
3095
|
+
return;
|
|
3096
|
+
}
|
|
3097
|
+
xCursorLine.classList.remove("u-off");
|
|
3098
|
+
}
|
|
3099
|
+
function getCursorPosition({ mouseEvent, rect, bbox, scaleFactor, dpr }) {
|
|
3100
|
+
const plotLeftCss = bbox.left / dpr;
|
|
3101
|
+
const plotTopCss = bbox.top / dpr;
|
|
3102
|
+
return {
|
|
3103
|
+
x: (mouseEvent.clientX - rect.left - plotLeftCss) / scaleFactor,
|
|
3104
|
+
y: (mouseEvent.clientY - rect.top - plotTopCss) / scaleFactor
|
|
3105
|
+
};
|
|
3106
|
+
}
|
|
3107
|
+
function updateCursorLine(xCursorLine, cursorPosition, chart, dpr) {
|
|
3108
|
+
const { x, y } = cursorPosition;
|
|
3109
|
+
const outOfBounds = x < 0 || x > chart.bbox.width / dpr || y < 0 || y > chart.bbox.height / dpr;
|
|
3110
|
+
if (outOfBounds) {
|
|
3111
|
+
toggleCursorLine(xCursorLine, true);
|
|
3112
|
+
return true;
|
|
3113
|
+
}
|
|
3114
|
+
toggleCursorLine(xCursorLine, false);
|
|
3115
|
+
if (xCursorLine) {
|
|
3116
|
+
xCursorLine.style.transform = `translateX(${x}px)`;
|
|
3117
|
+
}
|
|
3118
|
+
return false;
|
|
3119
|
+
}
|
|
3120
|
+
function getTooltipState({
|
|
3121
|
+
cursorPosition,
|
|
3122
|
+
laneSeries,
|
|
3123
|
+
lanes,
|
|
3124
|
+
numTicks,
|
|
3125
|
+
durationPerTick,
|
|
3126
|
+
locale,
|
|
3127
|
+
dpr,
|
|
3128
|
+
chart
|
|
3129
|
+
}) {
|
|
3130
|
+
var _a, _b, _c;
|
|
3131
|
+
const cursorSeriesIndex = deriveCursorSeriesIndex({
|
|
3132
|
+
cursorPosition,
|
|
3133
|
+
lanes
|
|
3134
|
+
});
|
|
3135
|
+
if (!cursorSeriesIndex) {
|
|
3136
|
+
return null;
|
|
3137
|
+
}
|
|
3138
|
+
const events = laneSeries[cursorSeriesIndex - 1];
|
|
3139
|
+
if (!events || events.length === 0) {
|
|
3140
|
+
return null;
|
|
3141
|
+
}
|
|
3142
|
+
const widthPerTick = chart.bbox.width / dpr / numTicks;
|
|
3143
|
+
const sortedEvents = sortEventsByDuration(events);
|
|
3144
|
+
const hit = findEventHit({
|
|
3145
|
+
events: sortedEvents,
|
|
3146
|
+
cursorSeriesIndex,
|
|
3147
|
+
cursorPosition,
|
|
3148
|
+
durationPerTick,
|
|
3149
|
+
widthPerTick,
|
|
3150
|
+
xScaleMin: (_c = (_b = (_a = chart == null ? void 0 : chart.scales) == null ? void 0 : _a.x) == null ? void 0 : _b.min) != null ? _c : 0
|
|
3151
|
+
});
|
|
3152
|
+
if (!hit) {
|
|
3153
|
+
return null;
|
|
3154
|
+
}
|
|
3155
|
+
const lane = lanes[cursorSeriesIndex - 1];
|
|
3156
|
+
if (!lane) {
|
|
3157
|
+
return null;
|
|
3158
|
+
}
|
|
3159
|
+
const tooltip = adjustForOverflow({
|
|
3160
|
+
tooltipX: hit.tooltipX,
|
|
3161
|
+
tooltipY: hit.tooltipY,
|
|
3162
|
+
event: hit.event,
|
|
3163
|
+
plotRightEdge: chart.bbox.width / dpr
|
|
3164
|
+
});
|
|
3165
|
+
const displaySeconds = durationPerTick < 6e4 && hit.event.duration !== 0;
|
|
3166
|
+
const content = buildTooltipContent({ lane, event: hit.event, locale, displaySeconds });
|
|
3167
|
+
const meta = buildTooltipMeta(hit.event);
|
|
3168
|
+
return {
|
|
3169
|
+
lane,
|
|
3170
|
+
event: hit.event,
|
|
3171
|
+
tooltip,
|
|
3172
|
+
content,
|
|
3173
|
+
meta
|
|
3174
|
+
};
|
|
3175
|
+
}
|
|
3176
|
+
function deriveCursorSeriesIndex({ cursorPosition, lanes }) {
|
|
3177
|
+
if (!lanes.length) {
|
|
3178
|
+
return 0;
|
|
3179
|
+
}
|
|
3180
|
+
const rawIndex = Math.floor(cursorPosition.y / FIXED_LANE_HEIGHT) + 1;
|
|
3181
|
+
return Math.min(lanes.length, Math.max(1, rawIndex));
|
|
3182
|
+
}
|
|
3183
|
+
function sortEventsByDuration(events) {
|
|
3184
|
+
return [...events].sort((a, b) => {
|
|
3185
|
+
if (a.duration === 0 && b.duration !== 0) return 1;
|
|
3186
|
+
if (a.duration !== 0 && b.duration === 0) return -1;
|
|
3187
|
+
return 0;
|
|
3188
|
+
});
|
|
3189
|
+
}
|
|
3190
|
+
function findEventHit({
|
|
3191
|
+
events,
|
|
3192
|
+
cursorSeriesIndex,
|
|
3193
|
+
cursorPosition,
|
|
3194
|
+
durationPerTick,
|
|
3195
|
+
widthPerTick,
|
|
3196
|
+
xScaleMin
|
|
3197
|
+
}) {
|
|
3198
|
+
for (let i = events.length - 1; i >= 0; i -= 1) {
|
|
3199
|
+
const event = events[i];
|
|
3200
|
+
const metrics = getEventMetrics({
|
|
3201
|
+
event,
|
|
3202
|
+
cursorSeriesIndex,
|
|
3203
|
+
durationPerTick,
|
|
3204
|
+
widthPerTick,
|
|
3205
|
+
xScaleMin
|
|
3206
|
+
});
|
|
3207
|
+
if (metrics && hitTestEvent({ metrics, cursorPosition })) {
|
|
3208
|
+
return {
|
|
3209
|
+
event,
|
|
3210
|
+
tooltipX: metrics.tooltipX,
|
|
3211
|
+
tooltipY: metrics.tooltipY
|
|
3212
|
+
};
|
|
3213
|
+
}
|
|
3214
|
+
}
|
|
3215
|
+
return null;
|
|
3216
|
+
}
|
|
3217
|
+
function getEventMetrics({ event, cursorSeriesIndex, durationPerTick, widthPerTick, xScaleMin }) {
|
|
3218
|
+
const xStartFraction = (event.start - xScaleMin) / durationPerTick;
|
|
3219
|
+
const xStartBase = xStartFraction * widthPerTick;
|
|
3220
|
+
const xStart = cursorSeriesIndex - 1 === 0 ? xStartBase + 2 : xStartBase;
|
|
3221
|
+
if (event.duration === 0) {
|
|
3222
|
+
const circleRadius = FIXED_LANE_HEIGHT * CIRCLE_LANE_SCALE_FACTOR / 2;
|
|
3223
|
+
return {
|
|
3224
|
+
tooltipX: xStart + CIRCLE_X_OFFSET,
|
|
3225
|
+
tooltipY: cursorSeriesIndex * FIXED_LANE_HEIGHT,
|
|
3226
|
+
hitMin: xStart - circleRadius,
|
|
3227
|
+
hitMax: xStart + circleRadius
|
|
3228
|
+
};
|
|
3229
|
+
}
|
|
3230
|
+
const durationWidth = event.duration / durationPerTick * widthPerTick;
|
|
3231
|
+
const barWidth = Math.max(durationWidth, MIN_BAR_WIDTH);
|
|
3232
|
+
return {
|
|
3233
|
+
tooltipX: xStart + CIRCLE_X_OFFSET,
|
|
3234
|
+
tooltipY: cursorSeriesIndex * FIXED_LANE_HEIGHT,
|
|
3235
|
+
hitMin: xStart,
|
|
3236
|
+
hitMax: xStart + barWidth
|
|
3237
|
+
};
|
|
3238
|
+
}
|
|
3239
|
+
function hitTestEvent({ metrics, cursorPosition }) {
|
|
3240
|
+
const { x } = cursorPosition;
|
|
3241
|
+
return x >= metrics.hitMin && x <= metrics.hitMax;
|
|
3242
|
+
}
|
|
3243
|
+
function adjustForOverflow({ tooltipX, tooltipY, event, plotRightEdge }) {
|
|
3244
|
+
const tooltipWidth = 85;
|
|
3245
|
+
let overflow = false;
|
|
3246
|
+
let adjustedX = tooltipX;
|
|
3247
|
+
let adjustedY = tooltipY;
|
|
3248
|
+
if (tooltipX + tooltipWidth > plotRightEdge) {
|
|
3249
|
+
overflow = true;
|
|
3250
|
+
adjustedY -= FIXED_LANE_HEIGHT / 2;
|
|
3251
|
+
adjustedX -= event.duration === 0 ? FIXED_LANE_HEIGHT : MIN_BAR_WIDTH;
|
|
3252
|
+
}
|
|
3253
|
+
return {
|
|
3254
|
+
x: adjustedX,
|
|
3255
|
+
y: adjustedY,
|
|
3256
|
+
overflow
|
|
3257
|
+
};
|
|
3258
|
+
}
|
|
3259
|
+
function buildTooltipContent({ lane, event, locale, displaySeconds }) {
|
|
3260
|
+
const startTime = new Date(event.start).toLocaleTimeString(
|
|
3261
|
+
locale,
|
|
3262
|
+
tooltipLocaleTimeFormat(displaySeconds)
|
|
3263
|
+
);
|
|
3264
|
+
const endTime = new Date(event.end).toLocaleTimeString(locale, tooltipLocaleTimeFormat(displaySeconds));
|
|
3265
|
+
return __spreadValues({
|
|
3266
|
+
from: startTime,
|
|
3267
|
+
to: endTime,
|
|
3268
|
+
lane,
|
|
3269
|
+
category: (event == null ? void 0 : event.category) || void 0
|
|
3270
|
+
}, event.additionalTooltipValue);
|
|
3271
|
+
}
|
|
3272
|
+
function buildTooltipMeta(event) {
|
|
3273
|
+
return __spreadValues({
|
|
3274
|
+
duration: event.duration
|
|
3275
|
+
}, event.additionalTooltipValue);
|
|
3276
|
+
}
|
|
3277
|
+
function applyTooltipState({
|
|
3278
|
+
chart,
|
|
3279
|
+
tooltipState,
|
|
3280
|
+
tooltipRef,
|
|
3281
|
+
setHighlightedLane,
|
|
3282
|
+
setHighlightedEvent,
|
|
3283
|
+
setHighlightedCategory
|
|
3284
|
+
}) {
|
|
3285
|
+
var _a;
|
|
3286
|
+
chart.root.style.cursor = "pointer";
|
|
3287
|
+
tooltipRef.current = {
|
|
3288
|
+
visible: true,
|
|
3289
|
+
x: tooltipState.tooltip.x,
|
|
3290
|
+
y: tooltipState.tooltip.y,
|
|
3291
|
+
overflow: tooltipState.tooltip.overflow,
|
|
3292
|
+
content: tooltipState.content,
|
|
3293
|
+
meta: tooltipState.meta
|
|
3294
|
+
};
|
|
3295
|
+
setHighlightedLane(tooltipState.lane);
|
|
3296
|
+
setHighlightedEvent(tooltipState.event);
|
|
3297
|
+
setHighlightedCategory((_a = tooltipState.event) == null ? void 0 : _a.category);
|
|
3298
|
+
}
|
|
3299
|
+
function clearTooltipIfVisible({
|
|
3300
|
+
chart,
|
|
3301
|
+
tooltipRef,
|
|
3302
|
+
setHighlightedLane,
|
|
3303
|
+
setHighlightedEvent,
|
|
3304
|
+
setHighlightedCategory
|
|
3305
|
+
}) {
|
|
3306
|
+
if (!tooltipRef.current.visible) {
|
|
3307
|
+
return;
|
|
3308
|
+
}
|
|
3309
|
+
chart.root.style.cursor = "default";
|
|
3310
|
+
tooltipRef.current = {
|
|
3311
|
+
visible: false,
|
|
3312
|
+
overflow: false,
|
|
3313
|
+
content: "",
|
|
3314
|
+
meta: ""
|
|
3315
|
+
};
|
|
3316
|
+
setHighlightedLane(null);
|
|
3317
|
+
setHighlightedEvent(null);
|
|
3318
|
+
setHighlightedCategory(null);
|
|
3319
|
+
}
|
|
2567
3320
|
|
|
2568
3321
|
// src/Timeline/PureTimeline/src/TimelinePlugin.tsx
|
|
2569
3322
|
var TimelinePlugin = ({
|
|
@@ -2573,52 +3326,58 @@ var TimelinePlugin = ({
|
|
|
2573
3326
|
numTicks,
|
|
2574
3327
|
durationPerTick,
|
|
2575
3328
|
highlightedCategory = null,
|
|
2576
|
-
highlightedEvent = null
|
|
3329
|
+
highlightedEvent = null,
|
|
3330
|
+
theme
|
|
2577
3331
|
}) => {
|
|
2578
|
-
const
|
|
3332
|
+
const FIXED_LANE_HEIGHT2 = 32;
|
|
2579
3333
|
const AXIS_COLOR = backgroundColor;
|
|
2580
3334
|
const ALTERNATE_COLOR = getAlternateColor(backgroundColor, 0.1);
|
|
2581
|
-
const
|
|
3335
|
+
const MIN_BAR_WIDTH2 = 20;
|
|
2582
3336
|
const LANE_SCALE_FACTOR = 0.85;
|
|
2583
|
-
const theme = (0, themes_exports.useSplunkTheme)();
|
|
2584
3337
|
let dpr = window.devicePixelRatio || 1;
|
|
2585
3338
|
const redrawChart = (u) => {
|
|
2586
3339
|
u.redraw();
|
|
2587
3340
|
};
|
|
3341
|
+
let resizeHandler;
|
|
2588
3342
|
return {
|
|
2589
3343
|
hooks: {
|
|
3344
|
+
destroy: () => {
|
|
3345
|
+
if (resizeHandler) {
|
|
3346
|
+
window.removeEventListener("resize", resizeHandler);
|
|
3347
|
+
}
|
|
3348
|
+
},
|
|
2590
3349
|
drawClear: (u) => {
|
|
2591
3350
|
const { ctx } = u;
|
|
2592
3351
|
const canvas = u.root.querySelector("canvas");
|
|
2593
3352
|
if (canvas) {
|
|
2594
3353
|
canvas.style.position = "absolute";
|
|
2595
3354
|
}
|
|
2596
|
-
|
|
3355
|
+
resizeHandler = () => {
|
|
2597
3356
|
const newDpr = window.devicePixelRatio || 1;
|
|
3357
|
+
console.warn(newDpr, dpr);
|
|
2598
3358
|
if (newDpr !== dpr) {
|
|
2599
3359
|
dpr = newDpr;
|
|
2600
3360
|
redrawChart(u);
|
|
2601
3361
|
}
|
|
2602
|
-
}
|
|
3362
|
+
};
|
|
3363
|
+
window.addEventListener("resize", resizeHandler);
|
|
2603
3364
|
ctx.save();
|
|
2604
|
-
|
|
2605
|
-
const chartTopY = u.bbox.top / dpr;
|
|
3365
|
+
const chartTopY = 0;
|
|
2606
3366
|
lanes.forEach((lane, sidx) => {
|
|
2607
|
-
const y = chartTopY + sidx *
|
|
3367
|
+
const y = chartTopY + sidx * FIXED_LANE_HEIGHT2;
|
|
2608
3368
|
ctx.fillStyle = (lanes.length - sidx - 1) % 2 === 0 ? AXIS_COLOR : ALTERNATE_COLOR;
|
|
2609
|
-
ctx.fillRect(
|
|
3369
|
+
ctx.fillRect(0, y, u.width, FIXED_LANE_HEIGHT2);
|
|
2610
3370
|
});
|
|
2611
3371
|
ctx.restore();
|
|
2612
3372
|
},
|
|
2613
3373
|
draw: (u) => {
|
|
2614
3374
|
const { ctx } = u;
|
|
2615
|
-
const widthPerTick = u.
|
|
3375
|
+
const widthPerTick = u.width / numTicks;
|
|
2616
3376
|
const scaleMin = u.scales.x.min;
|
|
2617
3377
|
ctx.save();
|
|
2618
|
-
ctx.scale(dpr, dpr);
|
|
2619
3378
|
lanes.forEach((lane, sidx) => {
|
|
2620
3379
|
const events = laneSeries[sidx];
|
|
2621
|
-
const laneCenterY =
|
|
3380
|
+
const laneCenterY = sidx * FIXED_LANE_HEIGHT2 + FIXED_LANE_HEIGHT2 / 2;
|
|
2622
3381
|
events.forEach((event) => {
|
|
2623
3382
|
const isHighlighted = highlightedEvent ? highlightedEvent === event : highlightedCategory === null || event.category === highlightedCategory;
|
|
2624
3383
|
const fillColor = isHighlighted ? hexToRgba(event.color, 0.5) : hexToRgba(theme.contentColorMuted, 0.2);
|
|
@@ -2626,8 +3385,8 @@ var TimelinePlugin = ({
|
|
|
2626
3385
|
const xStartFraction = (event.start - scaleMin) / durationPerTick;
|
|
2627
3386
|
const xStart = sidx === 0 ? xStartFraction * widthPerTick + 2 : xStartFraction * widthPerTick;
|
|
2628
3387
|
const durationWidth = event.duration / durationPerTick * widthPerTick;
|
|
2629
|
-
const barWidth = Math.max(durationWidth,
|
|
2630
|
-
const barHeight =
|
|
3388
|
+
const barWidth = Math.max(durationWidth, MIN_BAR_WIDTH2);
|
|
3389
|
+
const barHeight = FIXED_LANE_HEIGHT2 * LANE_SCALE_FACTOR;
|
|
2631
3390
|
const yBarTop = laneCenterY - barHeight / 2;
|
|
2632
3391
|
if (xStart >= 0) {
|
|
2633
3392
|
if (event.duration === null || event.duration === 0) {
|
|
@@ -2664,9 +3423,10 @@ var XAxisPlugin = ({
|
|
|
2664
3423
|
tickInterval = "1d",
|
|
2665
3424
|
isFontLoaded = false,
|
|
2666
3425
|
locale = "en-US",
|
|
2667
|
-
setIsFontLoaded
|
|
3426
|
+
setIsFontLoaded,
|
|
3427
|
+
theme
|
|
2668
3428
|
} = {}) => {
|
|
2669
|
-
const themes3 =
|
|
3429
|
+
const themes3 = theme;
|
|
2670
3430
|
const redrawFont = () => {
|
|
2671
3431
|
if (!isFontLoaded) {
|
|
2672
3432
|
setIsFontLoaded(true);
|
|
@@ -2686,17 +3446,14 @@ var XAxisPlugin = ({
|
|
|
2686
3446
|
},
|
|
2687
3447
|
drawClear: (u) => {
|
|
2688
3448
|
const { ctx } = u;
|
|
2689
|
-
const dpr = window.devicePixelRatio || 1;
|
|
2690
3449
|
ctx.save();
|
|
2691
|
-
|
|
2692
|
-
const xAxisY = (u.bbox.top + u.bbox.height - X_AXIS_HEIGHT * dpr) / dpr;
|
|
3450
|
+
const xAxisY = u.height - X_AXIS_HEIGHT;
|
|
2693
3451
|
ctx.fillStyle = backgroundColor;
|
|
2694
|
-
ctx.fillRect(0, xAxisY, u.
|
|
3452
|
+
ctx.fillRect(0, xAxisY, u.width, X_AXIS_HEIGHT);
|
|
2695
3453
|
ctx.restore();
|
|
2696
3454
|
},
|
|
2697
3455
|
draw: (u) => {
|
|
2698
3456
|
const { ctx } = u;
|
|
2699
|
-
const dpr = window.devicePixelRatio || 1;
|
|
2700
3457
|
const scaleMin = u.scales.x.min;
|
|
2701
3458
|
const maxLabelWidth = 50;
|
|
2702
3459
|
const ticks = [scaleMin];
|
|
@@ -2739,7 +3496,6 @@ var XAxisPlugin = ({
|
|
|
2739
3496
|
return labelParts;
|
|
2740
3497
|
});
|
|
2741
3498
|
ctx.save();
|
|
2742
|
-
ctx.scale(dpr, dpr);
|
|
2743
3499
|
ctx.font = `10px ${VIZ_FONT_FAMILY}`;
|
|
2744
3500
|
ctx.fillStyle = themes3.contentColorDefault;
|
|
2745
3501
|
ctx.textAlign = "left";
|
|
@@ -2747,15 +3503,15 @@ var XAxisPlugin = ({
|
|
|
2747
3503
|
const tickHeight = 5;
|
|
2748
3504
|
const labelOffset = 5;
|
|
2749
3505
|
const lineHeight = 12;
|
|
2750
|
-
const xAxisY =
|
|
3506
|
+
const xAxisY = u.height - X_AXIS_HEIGHT;
|
|
2751
3507
|
ticks.forEach((val, i) => {
|
|
2752
3508
|
let xTickPosition;
|
|
2753
3509
|
if (i === 0) {
|
|
2754
3510
|
xTickPosition = 0;
|
|
2755
3511
|
} else {
|
|
2756
|
-
xTickPosition = i * (u.
|
|
3512
|
+
xTickPosition = i * (u.width / numTicks);
|
|
2757
3513
|
}
|
|
2758
|
-
if (i === ticks.length - 1 && xTickPosition + maxLabelWidth > u.
|
|
3514
|
+
if (i === ticks.length - 1 && xTickPosition + maxLabelWidth > u.width) {
|
|
2759
3515
|
return;
|
|
2760
3516
|
}
|
|
2761
3517
|
const yLabelPosition = xAxisY + tickHeight + labelOffset;
|
|
@@ -2763,7 +3519,7 @@ var XAxisPlugin = ({
|
|
|
2763
3519
|
ctx.moveTo(xTickPosition, xAxisY);
|
|
2764
3520
|
ctx.lineTo(xTickPosition, xAxisY + tickHeight);
|
|
2765
3521
|
ctx.strokeStyle = "rgba(144, 144, 144, 0.5)";
|
|
2766
|
-
ctx.lineWidth = i === 0 ? 1
|
|
3522
|
+
ctx.lineWidth = i === 0 ? 1 : 0.5;
|
|
2767
3523
|
ctx.stroke();
|
|
2768
3524
|
const label = labels[i];
|
|
2769
3525
|
if (label) {
|
|
@@ -2864,7 +3620,7 @@ TimelineYAxis.propTypes = {
|
|
|
2864
3620
|
var TimelineYAxis_default = TimelineYAxis;
|
|
2865
3621
|
|
|
2866
3622
|
// src/Timeline/PureTimeline/src/TimelineLegend.tsx
|
|
2867
|
-
var LEGEND_WIDTH =
|
|
3623
|
+
var LEGEND_WIDTH = 88;
|
|
2868
3624
|
var LEGEND_TEXT_WIDTH = 55;
|
|
2869
3625
|
var LegendContainer = styled_components_default.div`
|
|
2870
3626
|
display: flex;
|
|
@@ -2891,7 +3647,7 @@ var LegendContainer = styled_components_default.div`
|
|
|
2891
3647
|
`;
|
|
2892
3648
|
var LegendItem = styled_components_default.div`
|
|
2893
3649
|
display: flex;
|
|
2894
|
-
align-items: center;
|
|
3650
|
+
align-items: ${({ legendTruncation }) => legendTruncation === "ellipsisOff" ? "flex-start" : "center"};
|
|
2895
3651
|
margin: ${({ legendDisplay }) => legendDisplay === "bottom" ? "10px 20px 10px 0px" : "4px"};
|
|
2896
3652
|
cursor: pointer;
|
|
2897
3653
|
opacity: ${({ isHighlighted }) => isHighlighted ? 1 : 0.5};
|
|
@@ -2901,13 +3657,18 @@ var LegendColor = styled_components_default.div`
|
|
|
2901
3657
|
width: 6px;
|
|
2902
3658
|
height: 11px;
|
|
2903
3659
|
margin-right: ${({ legendDisplay }) => legendDisplay === "bottom" ? "8px" : "4px"};
|
|
3660
|
+
margin-top: ${({ legendTruncation }) => legendTruncation === "ellipsisOff" ? "2px" : "0"};
|
|
2904
3661
|
background-color: ${({ color }) => hexToRgba(color, 0.5)};
|
|
2905
3662
|
border: 1px solid ${({ color }) => color};
|
|
2906
3663
|
transform: ${({ legendDisplay }) => legendDisplay === "bottom" ? "rotate(90deg)" : "none"};
|
|
2907
3664
|
opacity: ${({ isHighlighted }) => isHighlighted ? 1 : 0.5};
|
|
2908
3665
|
`;
|
|
2909
3666
|
var LegendText = styled_components_default.div`
|
|
2910
|
-
${({ legendTruncation }) => legendTruncation
|
|
3667
|
+
${({ legendTruncation }) => legendTruncation === "ellipsisOff" ? `
|
|
3668
|
+
white-space: normal;
|
|
3669
|
+
word-wrap: break-word;
|
|
3670
|
+
overflow-wrap: break-word;
|
|
3671
|
+
` : `
|
|
2911
3672
|
white-space: nowrap;
|
|
2912
3673
|
overflow: hidden;
|
|
2913
3674
|
text-overflow: ellipsis;
|
|
@@ -2930,10 +3691,8 @@ var TimelineLegend = ({
|
|
|
2930
3691
|
const handleMouseEnter = (category) => {
|
|
2931
3692
|
setHighlightedCategory == null ? void 0 : setHighlightedCategory(category);
|
|
2932
3693
|
};
|
|
2933
|
-
const handleMouseLeave = (
|
|
2934
|
-
|
|
2935
|
-
setHighlightedCategory == null ? void 0 : setHighlightedCategory(null);
|
|
2936
|
-
}
|
|
3694
|
+
const handleMouseLeave = () => {
|
|
3695
|
+
setHighlightedCategory == null ? void 0 : setHighlightedCategory(null);
|
|
2937
3696
|
};
|
|
2938
3697
|
return /* @__PURE__ */ react_exports.createElement(
|
|
2939
3698
|
LegendContainer,
|
|
@@ -2958,8 +3717,9 @@ var TimelineLegend = ({
|
|
|
2958
3717
|
color,
|
|
2959
3718
|
isHighlighted,
|
|
2960
3719
|
legendDisplay,
|
|
3720
|
+
legendTruncation,
|
|
2961
3721
|
onMouseEnter: () => handleMouseEnter(category),
|
|
2962
|
-
|
|
3722
|
+
onMouseLeave: handleMouseLeave,
|
|
2963
3723
|
onClick: () => {
|
|
2964
3724
|
handleLegendClick2(category);
|
|
2965
3725
|
}
|
|
@@ -2970,7 +3730,8 @@ var TimelineLegend = ({
|
|
|
2970
3730
|
"data-test": "legend-color",
|
|
2971
3731
|
color,
|
|
2972
3732
|
isHighlighted,
|
|
2973
|
-
legendDisplay
|
|
3733
|
+
legendDisplay,
|
|
3734
|
+
legendTruncation
|
|
2974
3735
|
}
|
|
2975
3736
|
),
|
|
2976
3737
|
/* @__PURE__ */ react_exports.createElement(LegendText, { legendTruncation, "data-test": "legend-text" }, truncatedText)
|
|
@@ -2994,9 +3755,9 @@ var useSplunkTheme_exports = {};
|
|
|
2994
3755
|
__export(useSplunkTheme_exports, {
|
|
2995
3756
|
default: () => useSplunkTheme_default
|
|
2996
3757
|
});
|
|
2997
|
-
var
|
|
3758
|
+
var defaultImport38 = __toESM(require("@splunk/themes/useSplunkTheme"));
|
|
2998
3759
|
__reExport(useSplunkTheme_exports, require("@splunk/themes/useSplunkTheme"));
|
|
2999
|
-
var useSplunkTheme_default = "default" in
|
|
3760
|
+
var useSplunkTheme_default = "default" in defaultImport38 ? defaultImport38.default : defaultImport38;
|
|
3000
3761
|
|
|
3001
3762
|
// src/Timeline/PureTimeline/src/TimelineTooltip.tsx
|
|
3002
3763
|
var TooltipContainer = styled_components_default.div`
|
|
@@ -3086,9 +3847,9 @@ var uPlot_min_exports = {};
|
|
|
3086
3847
|
__export(uPlot_min_exports, {
|
|
3087
3848
|
default: () => uPlot_min_default
|
|
3088
3849
|
});
|
|
3089
|
-
var
|
|
3850
|
+
var defaultImport39 = __toESM(require("uplot/dist/uPlot.min.css"));
|
|
3090
3851
|
__reExport(uPlot_min_exports, require("uplot/dist/uPlot.min.css"));
|
|
3091
|
-
var uPlot_min_default = "default" in
|
|
3852
|
+
var uPlot_min_default = "default" in defaultImport39 ? defaultImport39.default : defaultImport39;
|
|
3092
3853
|
|
|
3093
3854
|
// src/Timeline/PureTimeline/src/TimelineUplot.tsx
|
|
3094
3855
|
var TimelineUplotContainer = styled_components_default.div`
|
|
@@ -3129,6 +3890,11 @@ var TimelineUplot = ({
|
|
|
3129
3890
|
const [highlightedEvent, setHighlightedEvent] = react_exports.useState(null);
|
|
3130
3891
|
const [highlightedLane, setHighlightedLane] = react_exports.useState(null);
|
|
3131
3892
|
const [isFontLoaded, setIsFontLoaded] = react_exports.useState(false);
|
|
3893
|
+
const theme = (0, themes_exports.useSplunkTheme)();
|
|
3894
|
+
const zoom = (0, ZoomContext_exports.useZoomContext)();
|
|
3895
|
+
const fullscreenEl = typeof document !== "undefined" ? document.fullscreenElement : null;
|
|
3896
|
+
const scaleFactor = fullscreenEl && fullscreenEl.tagName !== "BODY" ? 1 : zoom || 1;
|
|
3897
|
+
const { version: dprVersion } = (0, visualization_canvas_exports.useDevicePixelRatio)();
|
|
3132
3898
|
const tooltipRef = react_exports.useRef({
|
|
3133
3899
|
visible: false,
|
|
3134
3900
|
x: 0,
|
|
@@ -3153,63 +3919,98 @@ var TimelineUplot = ({
|
|
|
3153
3919
|
const unitsPerTick = Math.ceil(totalNumberOfTicks / maxNumOfTicks);
|
|
3154
3920
|
const numTicks = totalNumberOfTicks / unitsPerTick;
|
|
3155
3921
|
const durationPerTick = granularityMultiplier * unitsPerTick;
|
|
3156
|
-
const opts =
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3922
|
+
const opts = react_exports.useMemo(
|
|
3923
|
+
() => ({
|
|
3924
|
+
width: chartWidth,
|
|
3925
|
+
height: chartHeight,
|
|
3926
|
+
series: [],
|
|
3927
|
+
axes: [
|
|
3928
|
+
{ scale: "x", show: false },
|
|
3929
|
+
{ scale: "y", show: false }
|
|
3930
|
+
],
|
|
3931
|
+
cursor: {
|
|
3932
|
+
x: true,
|
|
3933
|
+
y: false,
|
|
3934
|
+
hover: {
|
|
3935
|
+
prox: 1e3,
|
|
3936
|
+
bias: 0
|
|
3937
|
+
},
|
|
3938
|
+
drag: {
|
|
3939
|
+
setScale: false,
|
|
3940
|
+
x: false,
|
|
3941
|
+
y: false
|
|
3942
|
+
}
|
|
3170
3943
|
},
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3944
|
+
padding: [0, 0, 0, 0],
|
|
3945
|
+
legend: { show: false },
|
|
3946
|
+
pxAlign: false,
|
|
3947
|
+
pxRatio: 1,
|
|
3948
|
+
plugins: [
|
|
3949
|
+
{
|
|
3950
|
+
hooks: createTimelineCanvasScaleHooks(scaleFactor)
|
|
3951
|
+
},
|
|
3952
|
+
TimelinePlugin_default({
|
|
3953
|
+
laneSeries,
|
|
3954
|
+
lanes,
|
|
3955
|
+
backgroundColor,
|
|
3956
|
+
numTicks,
|
|
3957
|
+
durationPerTick,
|
|
3958
|
+
highlightedCategory,
|
|
3959
|
+
highlightedEvent,
|
|
3960
|
+
theme
|
|
3961
|
+
}),
|
|
3962
|
+
XAxisPlugin_default({
|
|
3963
|
+
durationPerTick,
|
|
3964
|
+
numTicks,
|
|
3965
|
+
backgroundColor,
|
|
3966
|
+
tickInterval,
|
|
3967
|
+
isFontLoaded,
|
|
3968
|
+
setIsFontLoaded,
|
|
3969
|
+
locale,
|
|
3970
|
+
theme
|
|
3971
|
+
}),
|
|
3972
|
+
CursorPlugin_default({
|
|
3973
|
+
laneSeries,
|
|
3974
|
+
lanes,
|
|
3975
|
+
numTicks,
|
|
3976
|
+
durationPerTick,
|
|
3977
|
+
setHighlightedCategory,
|
|
3978
|
+
setHighlightedEvent,
|
|
3979
|
+
setHighlightedLane,
|
|
3980
|
+
handleEventClick,
|
|
3981
|
+
tooltipRef,
|
|
3982
|
+
locale,
|
|
3983
|
+
scaleFactor
|
|
3984
|
+
})
|
|
3985
|
+
]
|
|
3986
|
+
}),
|
|
3987
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3988
|
+
[
|
|
3989
|
+
chartWidth,
|
|
3990
|
+
chartHeight,
|
|
3991
|
+
scaleFactor,
|
|
3992
|
+
dprVersion,
|
|
3993
|
+
// Force recreation of canvas scale hooks when DPR changes
|
|
3994
|
+
laneSeries,
|
|
3995
|
+
lanes,
|
|
3996
|
+
backgroundColor,
|
|
3997
|
+
numTicks,
|
|
3998
|
+
durationPerTick,
|
|
3999
|
+
highlightedCategory,
|
|
4000
|
+
highlightedEvent,
|
|
4001
|
+
tickInterval,
|
|
4002
|
+
isFontLoaded,
|
|
4003
|
+
setIsFontLoaded,
|
|
4004
|
+
locale,
|
|
4005
|
+
setHighlightedCategory,
|
|
4006
|
+
setHighlightedEvent,
|
|
4007
|
+
setHighlightedLane,
|
|
4008
|
+
handleEventClick,
|
|
4009
|
+
tooltipRef,
|
|
4010
|
+
theme
|
|
3210
4011
|
]
|
|
3211
|
-
|
|
3212
|
-
return /* @__PURE__ */ react_exports.createElement(TimelineUplotContainer, { legendDisplay }, /* @__PURE__ */ react_exports.createElement(TimelineChartContainer, { "data-test": "timeline-chart-container" }, /* @__PURE__ */ react_exports.createElement(
|
|
4012
|
+
);
|
|
4013
|
+
return /* @__PURE__ */ react_exports.createElement(TimelineUplotContainer, { legendDisplay, "data-test": "timeline-uplot-container" }, /* @__PURE__ */ react_exports.createElement(TimelineChartContainer, { "data-test": "timeline-chart-container" }, /* @__PURE__ */ react_exports.createElement(
|
|
3213
4014
|
TimelineYAxis_default,
|
|
3214
4015
|
{
|
|
3215
4016
|
height: chartHeight,
|
|
@@ -3220,7 +4021,14 @@ var TimelineUplot = ({
|
|
|
3220
4021
|
highlightedLane,
|
|
3221
4022
|
handleLaneClick
|
|
3222
4023
|
}
|
|
3223
|
-
), /* @__PURE__ */ react_exports.createElement(TimelineUplotWrapper, { width: chartWidth }, /* @__PURE__ */ react_exports.createElement(
|
|
4024
|
+
), /* @__PURE__ */ react_exports.createElement(TimelineUplotWrapper, { width: chartWidth }, /* @__PURE__ */ react_exports.createElement(
|
|
4025
|
+
uplot_react_default,
|
|
4026
|
+
{
|
|
4027
|
+
key: `timeline-${dprVersion}-${scaleFactor}`,
|
|
4028
|
+
options: opts,
|
|
4029
|
+
data: [[xMin], ...lanes.map(() => [])]
|
|
4030
|
+
}
|
|
4031
|
+
), /* @__PURE__ */ react_exports.createElement(TimelineTooltip_default, __spreadValues({}, tooltipRef.current)))), showLegend && /* @__PURE__ */ react_exports.createElement(
|
|
3224
4032
|
TimelineLegend_default,
|
|
3225
4033
|
{
|
|
3226
4034
|
height: chartHeight,
|
|
@@ -3274,7 +4082,7 @@ var PureTimeline = (_a) => {
|
|
|
3274
4082
|
const showLegend = (!dataColors || (dataColors == null ? void 0 : dataColors.length) === 0) && (category == null ? void 0 : category.length) > 0 && (legendDisplay === "right" || legendDisplay === "bottom");
|
|
3275
4083
|
const timezone = react_exports.useContext(TimezoneContext_default);
|
|
3276
4084
|
const theme = (0, themes_exports.useSplunkTheme)();
|
|
3277
|
-
const { laneSeries, lanes, categoricalColors, tickInterval } = mapDataToTimeline(
|
|
4085
|
+
const { laneSeries, lanes, categoricalColors, tickInterval } = mapDataToTimeline({
|
|
3278
4086
|
resultLimit,
|
|
3279
4087
|
x,
|
|
3280
4088
|
y,
|
|
@@ -3284,7 +4092,7 @@ var PureTimeline = (_a) => {
|
|
|
3284
4092
|
seriesColors,
|
|
3285
4093
|
additionalTooltipValues,
|
|
3286
4094
|
timezone
|
|
3287
|
-
);
|
|
4095
|
+
});
|
|
3288
4096
|
const handleLaneClick = (laneValue) => {
|
|
3289
4097
|
onLaneClick({
|
|
3290
4098
|
type: "lane.click",
|
|
@@ -3447,40 +4255,17 @@ var computeVizProps = (_a) => {
|
|
|
3447
4255
|
"onLegendClick",
|
|
3448
4256
|
"onLaneClick"
|
|
3449
4257
|
]);
|
|
3450
|
-
let convertedDuration;
|
|
3451
|
-
let timelineDataColors = dataColors;
|
|
3452
|
-
let timelineSeriesColors = seriesColors;
|
|
3453
4258
|
const pickedOptions = (0, lodash_exports.chain)(otherOptions).pick(validOptions).value();
|
|
3454
4259
|
const columns = ((_c = (_b = dataSources == null ? void 0 : dataSources.primary) == null ? void 0 : _b.data) == null ? void 0 : _c.columns) || [];
|
|
3455
4260
|
const fields = ((_e = (_d = dataSources == null ? void 0 : dataSources.primary) == null ? void 0 : _d.data) == null ? void 0 : _e.fields) || [];
|
|
3456
4261
|
const additionalTooltipValues = (pickedOptions == null ? void 0 : pickedOptions.additionalTooltipFields) ? extractAdditionalTooltipValues(columns, fields, pickedOptions == null ? void 0 : pickedOptions.additionalTooltipFields) : [];
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
} catch (e) {
|
|
3461
|
-
timelineSeriesColors = visualization_color_palettes_exports.VIZ_CATEGORICAL;
|
|
3462
|
-
}
|
|
3463
|
-
} else if (!seriesColors) {
|
|
3464
|
-
timelineSeriesColors = visualization_color_palettes_exports.VIZ_CATEGORICAL;
|
|
3465
|
-
} else if (seriesColors && Array.isArray(seriesColors)) {
|
|
3466
|
-
timelineSeriesColors = (0, colorUtils_exports.sanitizeArrayOfColors)(seriesColors);
|
|
3467
|
-
}
|
|
3468
|
-
if (Array.isArray(dataColors) && (dataColors == null ? void 0 : dataColors.length)) {
|
|
3469
|
-
timelineDataColors = (0, colorUtils_exports.sanitizeArrayOfColors)(dataColors);
|
|
3470
|
-
} else if (dataColors && typeof dataColors === "string") {
|
|
3471
|
-
try {
|
|
3472
|
-
timelineDataColors = JSON.parse(dataColors);
|
|
3473
|
-
} catch (e) {
|
|
3474
|
-
timelineDataColors = visualization_color_palettes_exports.VIZ_CATEGORICAL;
|
|
3475
|
-
}
|
|
3476
|
-
}
|
|
3477
|
-
if ((duration == null ? void 0 : duration.length) > 0 && typeof duration[0] === "string") {
|
|
3478
|
-
convertedDuration = convertToNumbers(duration);
|
|
3479
|
-
}
|
|
4262
|
+
const timelineSeriesColors = normalizeSeriesColors(seriesColors);
|
|
4263
|
+
const timelineDataColors = normalizeDataColors(dataColors);
|
|
4264
|
+
const durationValues = normalizeDuration(duration);
|
|
3480
4265
|
return __spreadValues({
|
|
3481
4266
|
x,
|
|
3482
4267
|
y,
|
|
3483
|
-
duration:
|
|
4268
|
+
duration: durationValues,
|
|
3484
4269
|
category,
|
|
3485
4270
|
additionalTooltipValues,
|
|
3486
4271
|
onEventClick,
|
|
@@ -3495,6 +4280,41 @@ function convertToNumbers(arr) {
|
|
|
3495
4280
|
return (0, types_exports.isNumber)(item) ? parseFloat(item) : 0;
|
|
3496
4281
|
});
|
|
3497
4282
|
}
|
|
4283
|
+
function normalizeSeriesColors(seriesColors) {
|
|
4284
|
+
if (seriesColors && typeof seriesColors === "string") {
|
|
4285
|
+
try {
|
|
4286
|
+
return JSON.parse(seriesColors);
|
|
4287
|
+
} catch (e) {
|
|
4288
|
+
return visualization_color_palettes_exports.VIZ_CATEGORICAL;
|
|
4289
|
+
}
|
|
4290
|
+
}
|
|
4291
|
+
if (!seriesColors) {
|
|
4292
|
+
return visualization_color_palettes_exports.VIZ_CATEGORICAL;
|
|
4293
|
+
}
|
|
4294
|
+
if (Array.isArray(seriesColors)) {
|
|
4295
|
+
return (0, colorUtils_exports.sanitizeArrayOfColors)(seriesColors);
|
|
4296
|
+
}
|
|
4297
|
+
return seriesColors;
|
|
4298
|
+
}
|
|
4299
|
+
function normalizeDataColors(dataColors) {
|
|
4300
|
+
if (Array.isArray(dataColors) && (dataColors == null ? void 0 : dataColors.length)) {
|
|
4301
|
+
return (0, colorUtils_exports.sanitizeArrayOfColors)(dataColors);
|
|
4302
|
+
}
|
|
4303
|
+
if (dataColors && typeof dataColors === "string") {
|
|
4304
|
+
try {
|
|
4305
|
+
return JSON.parse(dataColors);
|
|
4306
|
+
} catch (e) {
|
|
4307
|
+
return visualization_color_palettes_exports.VIZ_CATEGORICAL;
|
|
4308
|
+
}
|
|
4309
|
+
}
|
|
4310
|
+
return dataColors;
|
|
4311
|
+
}
|
|
4312
|
+
function normalizeDuration(duration) {
|
|
4313
|
+
if ((duration == null ? void 0 : duration.length) > 0 && typeof duration[0] === "string") {
|
|
4314
|
+
return convertToNumbers(duration);
|
|
4315
|
+
}
|
|
4316
|
+
return duration;
|
|
4317
|
+
}
|
|
3498
4318
|
function extractAdditionalTooltipValues(columns, fields, additionalTooltipFields) {
|
|
3499
4319
|
var _a;
|
|
3500
4320
|
const fieldIndexMap = fields.reduce((acc, field, index) => {
|