@splunk/visualizations 28.4.0 → 28.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Area.config.js +28 -7
- package/Area.config.js.map +2 -2
- package/Area.js +106 -39
- package/Area.js.map +2 -2
- package/Bar.config.js +28 -7
- package/Bar.config.js.map +2 -2
- package/Bar.js +106 -39
- package/Bar.js.map +2 -2
- package/Bubble.config.js +4 -4
- package/Bubble.config.js.map +2 -2
- package/Bubble.js +78 -30
- package/Bubble.js.map +2 -2
- package/CHANGELOG.external.md +89 -0
- package/ChoroplethSvg.js +74 -26
- package/ChoroplethSvg.js.map +2 -2
- package/Column.config.js +28 -7
- package/Column.config.js.map +2 -2
- package/Column.js +106 -39
- package/Column.js.map +2 -2
- package/Ellipse/config.d.ts.map +1 -1
- package/Ellipse.config.js +14 -5
- package/Ellipse.config.js.map +4 -4
- package/Ellipse.js +130 -73
- package/Ellipse.js.map +4 -4
- package/Events.js +74 -26
- package/Events.js.map +2 -2
- package/FillerGauge.js +234 -47
- package/FillerGauge.js.map +2 -2
- package/Image.js +74 -26
- package/Image.js.map +2 -2
- package/Line/lineUtils.d.ts.map +1 -1
- package/Line/mockdata/LineData.d.ts +95 -0
- package/Line/mockdata/LineData.d.ts.map +1 -1
- package/Line.config.js +28 -7
- package/Line.config.js.map +2 -2
- package/Line.js +122 -41
- package/Line.js.map +2 -2
- package/LinkGraph.js +74 -26
- package/LinkGraph.js.map +2 -2
- package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
- package/Map/PureMap/ClusterLayer.d.ts.map +1 -1
- package/Map/PureMap/MapUtils.d.ts +2 -2
- package/Map/PureMap/MapUtils.d.ts.map +1 -1
- package/Map/PureMap/PureMap.d.ts.map +1 -1
- package/Map.js +111 -37
- package/Map.js.map +2 -2
- package/Markdown/config.d.ts.map +1 -1
- package/Markdown.config.js +14 -5
- package/Markdown.config.js.map +4 -4
- package/Markdown.js +91 -34
- package/Markdown.js.map +4 -4
- package/MarkerGauge.js +243 -56
- package/MarkerGauge.js.map +4 -4
- package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/components/Node.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts.map +1 -1
- package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts +78 -0
- package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts.map +1 -0
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts +1 -2
- package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -1
- package/NetworkGraph.config.js.map +2 -2
- package/NetworkGraph.js +365 -105
- package/NetworkGraph.js.map +4 -4
- package/PERFORMANCE.md +23 -0
- package/ParallelCoordinates/ParallelCoordinates.d.ts +1 -46
- package/ParallelCoordinates/ParallelCoordinates.d.ts.map +1 -1
- package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts +12 -58
- package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts.map +1 -1
- package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts +1 -0
- package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts.map +1 -1
- package/ParallelCoordinates.js +150 -153
- package/ParallelCoordinates.js.map +4 -4
- package/Pie/Pie.d.ts.map +1 -1
- package/Pie/config.d.ts.map +1 -1
- package/Pie/pieUtils.d.ts +4 -0
- package/Pie/pieUtils.d.ts.map +1 -1
- package/Pie.config.js +16 -0
- package/Pie.config.js.map +2 -2
- package/Pie.js +118 -35
- package/Pie.js.map +2 -2
- package/Punchcard.js +74 -26
- package/Punchcard.js.map +2 -2
- package/Rectangle/config.d.ts.map +1 -1
- package/Rectangle.config.js +14 -5
- package/Rectangle.config.js.map +4 -4
- package/Rectangle.js +92 -35
- package/Rectangle.js.map +4 -4
- package/Sankey/PureSankey/PureSankey.d.ts +26 -72
- package/Sankey/PureSankey/PureSankey.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyLink.d.ts +3 -19
- package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyNode.d.ts +3 -20
- package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -1
- package/Sankey/PureSankey/SankeyTooltip.d.ts +3 -24
- package/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -1
- package/Sankey.js +270 -336
- package/Sankey.js.map +2 -2
- package/Scatter.config.js +168 -147
- package/Scatter.config.js.map +4 -4
- package/Scatter.js +246 -179
- package/Scatter.js.map +4 -4
- package/SingleValue.js +96 -75
- package/SingleValue.js.map +2 -2
- package/SingleValueIcon/config.d.ts.map +1 -1
- package/SingleValueIcon.config.js +14 -5
- package/SingleValueIcon.config.js.map +4 -4
- package/SingleValueIcon.js +118 -76
- package/SingleValueIcon.js.map +4 -4
- package/SingleValueRadial/PureSingleValueRadial/GaugeGraph.d.ts.map +1 -1
- package/SingleValueRadial.js +95 -76
- package/SingleValueRadial.js.map +2 -2
- package/Table/Table.d.ts.map +1 -1
- package/Table/hooks.d.ts +2 -0
- package/Table/hooks.d.ts.map +1 -1
- package/Table.js +95 -49
- package/Table.js.map +2 -2
- package/Timeline/PureTimeline/PureTimeline.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelinePlugin.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +2 -1
- package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
- package/Timeline.js +154 -54
- package/Timeline.js.map +2 -2
- package/common/GaugeMajorTicks.js +150 -13
- package/common/GaugeMajorTicks.js.map +4 -4
- package/common/GaugeValueMarker.js +84 -17
- package/common/GaugeValueMarker.js.map +4 -4
- package/common/OptionsDoc.js.map +1 -1
- package/common/OverviewDoc.d.ts.map +1 -1
- package/common/OverviewDoc.js +2 -2
- package/common/OverviewDoc.js.map +2 -2
- package/common/TimeSeriesChartWrapper.d.ts.map +1 -1
- package/common/TimeSeriesChartWrapper.js +72 -24
- package/common/TimeSeriesChartWrapper.js.map +2 -2
- package/common/chartingUtils.d.ts +9 -3
- package/common/chartingUtils.d.ts.map +1 -1
- package/common/chartingUtils.js +21 -16
- package/common/chartingUtils.js.map +2 -2
- package/common/editorConfig/AxesChartDataConfig.d.ts +3 -3
- package/common/editorConfig/AxesChartDataConfig.d.ts.map +1 -1
- package/common/editorConfig/AxesChartDataDisplay.d.ts +4 -0
- package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -1
- package/common/editorConfig/AxesChartLegend.d.ts.map +1 -1
- package/common/gaugeUtils.d.ts +37 -0
- package/common/gaugeUtils.d.ts.map +1 -1
- package/common/gaugeUtils.js +152 -2
- package/common/gaugeUtils.js.map +4 -4
- package/common/hocs/mockdata/trellisData.d.ts +119 -0
- package/common/hocs/mockdata/trellisData.d.ts.map +1 -1
- package/common/interfaces/Overview.d.ts +1 -0
- package/common/interfaces/Overview.d.ts.map +1 -1
- package/common/interfaces/VizConfig.d.ts +2 -1
- package/common/interfaces/VizConfig.d.ts.map +1 -1
- package/common/utils/mapUtils.js.map +1 -1
- package/common/utils/trellisUtils.d.ts.map +1 -1
- package/common/utils/trellisUtils.js +4 -6
- package/common/utils/trellisUtils.js.map +2 -2
- package/common/withDashboardViz.js +74 -26
- package/common/withDashboardViz.js.map +2 -2
- package/package.json +36 -36
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PureTimeline.d.ts","sourceRoot":"","sources":["../../src/Timeline/PureTimeline/PureTimeline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"PureTimeline.d.ts","sourceRoot":"","sources":["../../src/Timeline/PureTimeline/PureTimeline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAsBhC,MAAM,WAAW,iBAAiB;IAC9B,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACvB,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC/B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC3C,gBAAgB,CAAC,EAAE,aAAa,GAAG,gBAAgB,GAAG,eAAe,GAAG,aAAa,CAAC;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACvC,aAAa,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;CAC5C;AAED,QAAA,MAAM,YAAY;mBAAkB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkIpD,CAAC;AAyEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimelinePlugin.d.ts","sourceRoot":"","sources":["../../../src/Timeline/PureTimeline/src/TimelinePlugin.tsx"],"names":[],"mappings":"AAGA,QAAA,MAAM,cAAc,GAAI;;;;;;;;;CASvB;;;;;;
|
|
1
|
+
{"version":3,"file":"TimelinePlugin.d.ts","sourceRoot":"","sources":["../../../src/Timeline/PureTimeline/src/TimelinePlugin.tsx"],"names":[],"mappings":"AAGA,QAAA,MAAM,cAAc,GAAI;;;;;;;;;CASvB;;;;;;CA+HA,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimelineYAxis.d.ts","sourceRoot":"","sources":["../../../src/Timeline/PureTimeline/src/TimelineYAxis.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAmDhC,QAAA,MAAM,aAAa;yGAQhB;QACC,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;QAC3B,eAAe,EAAE,MAAM,CAAC;QACxB,UAAU,EAAE,MAAM,CAAC;QACnB,eAAe,EAAE,MAAM,CAAC;QACxB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;QAC/B,eAAe,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;KAC9C;;;;;;
|
|
1
|
+
{"version":3,"file":"TimelineYAxis.d.ts","sourceRoot":"","sources":["../../../src/Timeline/PureTimeline/src/TimelineYAxis.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAmDhC,QAAA,MAAM,aAAa;yGAQhB;QACC,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;QAC3B,eAAe,EAAE,MAAM,CAAC;QACxB,UAAU,EAAE,MAAM,CAAC;QACnB,eAAe,EAAE,MAAM,CAAC;QACxB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;QAC/B,eAAe,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;KAC9C;;;;;;CAmDA,CAAC;AAQF,eAAe,aAAa,CAAC"}
|
|
@@ -35,11 +35,12 @@ export declare function mapDataToTimeline(mapDataToTimelineType: MapDataToTimeli
|
|
|
35
35
|
lanes: (string | number)[];
|
|
36
36
|
categoricalColors: Map<string, string>;
|
|
37
37
|
tickInterval: string;
|
|
38
|
+
hasInvalidData?: boolean;
|
|
38
39
|
};
|
|
39
40
|
export declare const drawRoundedRect: (ctx: CanvasRenderingContext2D, x: number, y: number, width: number, height: number, radius: number) => void;
|
|
40
41
|
type TruncationType = 'ellipsisEnd' | 'ellipsisMiddle' | 'ellipsisStart';
|
|
41
42
|
export declare const truncateText: (text: string, maxWidth: number, truncationType: TruncationType, font?: string) => string;
|
|
42
|
-
export declare const getTickInterval: (averageDiff: any) => "1s" | "1m" | "30m" | "1h" | "12h" | "1d" | "7d"
|
|
43
|
+
export declare const getTickInterval: (averageDiff: any) => "1mo" | "1s" | "1m" | "30m" | "1h" | "12h" | "1d" | "7d";
|
|
43
44
|
export declare function convertTickIntervalToMs(tickInterval: any): 1000 | 60000 | 1800000 | 3600000 | 43200000 | 86400000 | 604800000 | 2750000000;
|
|
44
45
|
export declare function calculateMaxNumberOfTicks(availableWidth: any, pixelPerLabel: any, extraSpacing: any): number;
|
|
45
46
|
export declare const isSafari: () => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timelineUtils.d.ts","sourceRoot":"","sources":["../../../../src/Timeline/PureTimeline/src/utils/timelineUtils.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,SAAS;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,UAAU,GAAG,SAAS,EAAE,EAAE,CAAC;AACvC,MAAM,MAAM,KAAK,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;AAGxC,wBAAgB,SAAS,CAAC,GAAG,KAAA,EAAE,OAAO,SAAI,UAUzC;AAGD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAkCtE;AAED,MAAM,MAAM,QAAQ,GACd;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,GACrB;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,GACxB;IAAE,kBAAkB,EAAE,MAAM,CAAA;CAAE,GAC9B,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"timelineUtils.d.ts","sourceRoot":"","sources":["../../../../src/Timeline/PureTimeline/src/utils/timelineUtils.ts"],"names":[],"mappings":"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"}
|
package/Timeline.js
CHANGED
|
@@ -858,7 +858,7 @@ var Cover = styled_components_default.div`
|
|
|
858
858
|
bottom: 0;
|
|
859
859
|
`;
|
|
860
860
|
var Blocker = styled_components_default.div.attrs({
|
|
861
|
-
"data-splunk-visualization-version": "28.
|
|
861
|
+
"data-splunk-visualization-version": "28.5.0 - b192418b7"
|
|
862
862
|
})`
|
|
863
863
|
position: relative;
|
|
864
864
|
width: 100%;
|
|
@@ -939,7 +939,7 @@ var withFixedSizeContainer = (Viz) => {
|
|
|
939
939
|
FixSizeItem,
|
|
940
940
|
{
|
|
941
941
|
"data-test": "fix-size-item",
|
|
942
|
-
"data-splunk-visualization-version": "28.
|
|
942
|
+
"data-splunk-visualization-version": "28.5.0 - b192418b7",
|
|
943
943
|
width,
|
|
944
944
|
height,
|
|
945
945
|
backgroundColor
|
|
@@ -1544,25 +1544,27 @@ var parseAxisValue = (val) => {
|
|
|
1544
1544
|
const num = typeof val === "number" ? val : Number.parseFloat(val);
|
|
1545
1545
|
return Number.isNaN(num) ? void 0 : num;
|
|
1546
1546
|
};
|
|
1547
|
-
var
|
|
1548
|
-
|
|
1547
|
+
var parseXAxisLineVisibility = (visibility) => {
|
|
1548
|
+
if (visibility === "hide") return false;
|
|
1549
|
+
if (visibility === "show") return true;
|
|
1550
|
+
return void 0;
|
|
1551
|
+
};
|
|
1549
1552
|
var getLegend = (props) => {
|
|
1550
1553
|
const legendPlacement = props == null ? void 0 : props.legendDisplay;
|
|
1551
|
-
const { isSeriesCompare } = props;
|
|
1554
|
+
const { isSeriesCompare, legendTruncation } = props;
|
|
1552
1555
|
const commonLegendProps = {
|
|
1553
1556
|
center: true,
|
|
1554
1557
|
fontSize: 12,
|
|
1555
1558
|
largerTiles: true,
|
|
1556
|
-
hideSeriesValue: !isSeriesCompare
|
|
1559
|
+
hideSeriesValue: !isSeriesCompare,
|
|
1557
1560
|
// Show values if in seriesCompare mode
|
|
1561
|
+
legendTruncation
|
|
1558
1562
|
};
|
|
1559
1563
|
switch (legendPlacement) {
|
|
1560
1564
|
case "off":
|
|
1561
1565
|
return false;
|
|
1562
1566
|
case "left":
|
|
1563
|
-
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
|
|
1564
|
-
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
1565
|
-
}, commonLegendProps));
|
|
1567
|
+
return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
1566
1568
|
case "bottom":
|
|
1567
1569
|
return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
|
|
1568
1570
|
wrap: true
|
|
@@ -1572,9 +1574,7 @@ var getLegend = (props) => {
|
|
|
1572
1574
|
wrap: true
|
|
1573
1575
|
}, commonLegendProps));
|
|
1574
1576
|
default:
|
|
1575
|
-
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
|
|
1576
|
-
width: isSeriesCompare ? SeriesCompareLegendWidth : SideLegendWidth
|
|
1577
|
-
}, commonLegendProps));
|
|
1577
|
+
return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
|
|
1578
1578
|
}
|
|
1579
1579
|
};
|
|
1580
1580
|
var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
|
|
@@ -1635,9 +1635,7 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
|
|
|
1635
1635
|
if (yAxisAbbreviation !== "none") {
|
|
1636
1636
|
yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
|
|
1637
1637
|
}
|
|
1638
|
-
if (yAxisAbbreviation
|
|
1639
|
-
yConfig.y.width = 55;
|
|
1640
|
-
} else {
|
|
1638
|
+
if (yAxisAbbreviation !== "none") {
|
|
1641
1639
|
yConfig.y.width = label && label.length > 0 ? 30 : 10;
|
|
1642
1640
|
}
|
|
1643
1641
|
if (yAxisLabelVisibility === "hide") {
|
|
@@ -1660,6 +1658,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
1660
1658
|
y2Config.y2.type = scaleType;
|
|
1661
1659
|
if (axisAbbreviation !== "none") {
|
|
1662
1660
|
y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
|
|
1661
|
+
y2Config.y2.width = label && label.length > 0 ? 50 : 10;
|
|
1663
1662
|
} else if (roundAxisLabelsToInteger) {
|
|
1664
1663
|
y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
|
|
1665
1664
|
}
|
|
@@ -1675,7 +1674,7 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
|
|
|
1675
1674
|
}
|
|
1676
1675
|
return y2Config;
|
|
1677
1676
|
};
|
|
1678
|
-
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField) => {
|
|
1677
|
+
var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
|
|
1679
1678
|
const seriesConfig = {};
|
|
1680
1679
|
let spanGaps;
|
|
1681
1680
|
let replaceNullsWithZero;
|
|
@@ -1702,6 +1701,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
1702
1701
|
);
|
|
1703
1702
|
if (shouldAssignToY2) {
|
|
1704
1703
|
seriesConfig[field].overrides.scale = "y2";
|
|
1704
|
+
} else {
|
|
1705
|
+
seriesConfig[field].overrides.scale = "y";
|
|
1705
1706
|
}
|
|
1706
1707
|
}
|
|
1707
1708
|
if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
|
|
@@ -1714,6 +1715,11 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
|
|
|
1714
1715
|
if (fieldDashStyle) {
|
|
1715
1716
|
seriesConfig[field].lineDashStyle = fieldDashStyle;
|
|
1716
1717
|
}
|
|
1718
|
+
const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
|
|
1719
|
+
const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
|
|
1720
|
+
if (fieldStepPosition && fieldStepPosition !== "off") {
|
|
1721
|
+
seriesConfig[field].stepPosition = fieldStepPosition;
|
|
1722
|
+
}
|
|
1717
1723
|
if (replaceNullsWithZero !== void 0) {
|
|
1718
1724
|
seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
|
|
1719
1725
|
}
|
|
@@ -1938,6 +1944,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1938
1944
|
backgroundColor,
|
|
1939
1945
|
defaultFontColor,
|
|
1940
1946
|
additionalTooltipValues,
|
|
1947
|
+
xAxisLineVisibility: xAxisLineVisibility,
|
|
1948
|
+
yAxisLineVisibility,
|
|
1949
|
+
y2AxisLineVisibility,
|
|
1941
1950
|
showYAxisWithZero: showYAxisWithZeroFromProps,
|
|
1942
1951
|
showY2AxisWithZero: showY2AxisWithZeroFromProps
|
|
1943
1952
|
} = _a, otherOptions = __objRest(_a, [
|
|
@@ -1961,6 +1970,10 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1961
1970
|
"backgroundColor",
|
|
1962
1971
|
"defaultFontColor",
|
|
1963
1972
|
"additionalTooltipValues",
|
|
1973
|
+
// Extract axis line visibility options from props
|
|
1974
|
+
"xAxisLineVisibility",
|
|
1975
|
+
"yAxisLineVisibility",
|
|
1976
|
+
"y2AxisLineVisibility",
|
|
1964
1977
|
// Extract showYAxisWithZero directly from props for accelerated render mode
|
|
1965
1978
|
"showYAxisWithZero",
|
|
1966
1979
|
"showY2AxisWithZero"
|
|
@@ -1973,6 +1986,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1973
1986
|
fieldColors,
|
|
1974
1987
|
legendLabels: legendLabelsStr,
|
|
1975
1988
|
legendMode,
|
|
1989
|
+
legendTruncation,
|
|
1976
1990
|
"axisTitleX.text": xAxisTitleText,
|
|
1977
1991
|
"axisTitleY.text": yAxisTitleText,
|
|
1978
1992
|
"axisTitleY2.text": y2AxisTitleText,
|
|
@@ -1981,6 +1995,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1981
1995
|
"axisTitleY2.visibility": y2AxisTitleVisibility,
|
|
1982
1996
|
"axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
|
|
1983
1997
|
"axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
|
|
1998
|
+
"axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
|
|
1984
1999
|
"axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
|
|
1985
2000
|
"axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
|
|
1986
2001
|
"axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
|
|
@@ -1998,6 +2013,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
1998
2013
|
lineWidth,
|
|
1999
2014
|
lineDashStyle,
|
|
2000
2015
|
fieldDashStyles: lineDashStylesByFieldStr,
|
|
2016
|
+
stepPosition,
|
|
2017
|
+
fieldStepPositions: stepPositionsByFieldStr,
|
|
2001
2018
|
yAxisMin: yAxisMinRaw,
|
|
2002
2019
|
yAxisMax: yAxisMaxRaw,
|
|
2003
2020
|
y2AxisMin: y2AxisMinRaw,
|
|
@@ -2008,6 +2025,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2008
2025
|
showYMinorGridLines,
|
|
2009
2026
|
showY2MinorGridLines,
|
|
2010
2027
|
showLineSmoothing,
|
|
2028
|
+
xAxisMajorTickVisibility,
|
|
2029
|
+
xAxisMajorTickSize,
|
|
2011
2030
|
yAxisMajorTickVisibility,
|
|
2012
2031
|
y2AxisMajorTickVisibility,
|
|
2013
2032
|
yAxisMajorTickSize,
|
|
@@ -2024,10 +2043,14 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2024
2043
|
const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
|
|
2025
2044
|
const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
|
|
2026
2045
|
const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
|
|
2046
|
+
const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
|
|
2027
2047
|
const showYMajorTicks = yAxisMajorTickVisibility === "show";
|
|
2028
2048
|
const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
|
|
2029
2049
|
const showYMinorTicks = yAxisMinorTickVisibility === "show";
|
|
2030
2050
|
const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
|
|
2051
|
+
const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
|
|
2052
|
+
const showYAxisLine = yAxisLineVisibility === "show";
|
|
2053
|
+
const showY2AxisLine = y2AxisLineVisibility === "show";
|
|
2031
2054
|
const yAxisMin = parseAxisValue(yAxisMinRaw);
|
|
2032
2055
|
const yAxisMax = parseAxisValue(yAxisMaxRaw);
|
|
2033
2056
|
const y2AxisMin = parseAxisValue(y2AxisMinRaw);
|
|
@@ -2042,13 +2065,15 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2042
2065
|
y2AxisMajorUnitFromSimpleXML,
|
|
2043
2066
|
y2AxisMajorTickInterval
|
|
2044
2067
|
);
|
|
2045
|
-
const
|
|
2046
|
-
const
|
|
2047
|
-
const
|
|
2048
|
-
const
|
|
2068
|
+
const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
|
|
2069
|
+
const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
|
|
2070
|
+
const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
|
|
2071
|
+
const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
|
|
2072
|
+
const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
|
|
2049
2073
|
const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
|
|
2050
2074
|
const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
|
|
2051
2075
|
const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
|
|
2076
|
+
const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
|
|
2052
2077
|
const legendLabels = parseArrayOption(legendLabelsStr);
|
|
2053
2078
|
const bgColor = backgroundColor || bgColorFromOptions;
|
|
2054
2079
|
const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
|
|
@@ -2136,7 +2161,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2136
2161
|
nullValueMode,
|
|
2137
2162
|
markerDisplay,
|
|
2138
2163
|
lineDashStyle,
|
|
2139
|
-
lineDashStylesByField
|
|
2164
|
+
lineDashStylesByField,
|
|
2165
|
+
stepPosition,
|
|
2166
|
+
stepPositionsByField
|
|
2140
2167
|
),
|
|
2141
2168
|
[
|
|
2142
2169
|
yFields,
|
|
@@ -2147,7 +2174,9 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2147
2174
|
nullValueMode,
|
|
2148
2175
|
markerDisplay,
|
|
2149
2176
|
lineDashStyle,
|
|
2150
|
-
lineDashStylesByField
|
|
2177
|
+
lineDashStylesByField,
|
|
2178
|
+
stepPosition,
|
|
2179
|
+
stepPositionsByField
|
|
2151
2180
|
]
|
|
2152
2181
|
);
|
|
2153
2182
|
const chartingEventAnnotations = (0, react_exports.useMemo)(
|
|
@@ -2162,9 +2191,14 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2162
2191
|
() => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
|
|
2163
2192
|
[xScaleConfig, yScaleConfig, y2ScaleConfig]
|
|
2164
2193
|
);
|
|
2194
|
+
const isSeriesCompare = legendMode === "seriesCompare";
|
|
2165
2195
|
const legend = (0, react_exports.useMemo)(
|
|
2166
|
-
() => getLegend({
|
|
2167
|
-
|
|
2196
|
+
() => getLegend({
|
|
2197
|
+
legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
|
|
2198
|
+
isSeriesCompare,
|
|
2199
|
+
legendTruncation
|
|
2200
|
+
}),
|
|
2201
|
+
[legendDisplay, isSeriesCompare, legendTruncation]
|
|
2168
2202
|
);
|
|
2169
2203
|
const handleChartClick = react_exports.useCallback(
|
|
2170
2204
|
(event) => {
|
|
@@ -2269,6 +2303,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2269
2303
|
seriesConfig: seriesOverrides,
|
|
2270
2304
|
legend,
|
|
2271
2305
|
legendLabels,
|
|
2306
|
+
legendTruncation,
|
|
2272
2307
|
isSeriesCompare: legendMode === "seriesCompare",
|
|
2273
2308
|
maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
|
|
2274
2309
|
scaleConfig,
|
|
@@ -2290,6 +2325,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2290
2325
|
showY2MinorGridLines,
|
|
2291
2326
|
showLineSmoothing,
|
|
2292
2327
|
dataValuesDisplay,
|
|
2328
|
+
showXMajorTicks,
|
|
2329
|
+
xAxisMajorTickSize: xAxisMajorTickSizeNum,
|
|
2293
2330
|
showYMajorTicks,
|
|
2294
2331
|
showY2MajorTicks,
|
|
2295
2332
|
yAxisMajorTickSize: yAxisMajorTickSizeNum,
|
|
@@ -2301,7 +2338,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2301
2338
|
yAxisMinorTickSize: yAxisMinorTickSizeNum,
|
|
2302
2339
|
y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
|
|
2303
2340
|
showYAxisWithZero,
|
|
2304
|
-
showY2AxisWithZero
|
|
2341
|
+
showY2AxisWithZero,
|
|
2342
|
+
showXAxisLine,
|
|
2343
|
+
showYAxisLine,
|
|
2344
|
+
showY2AxisLine,
|
|
2345
|
+
xAxisMaxLabelParts
|
|
2305
2346
|
}
|
|
2306
2347
|
));
|
|
2307
2348
|
}, [
|
|
@@ -2316,6 +2357,7 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2316
2357
|
seriesOverrides,
|
|
2317
2358
|
legend,
|
|
2318
2359
|
legendLabels,
|
|
2360
|
+
legendTruncation,
|
|
2319
2361
|
scaleConfig,
|
|
2320
2362
|
onClick,
|
|
2321
2363
|
handleChartClick,
|
|
@@ -2334,6 +2376,8 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2334
2376
|
showY2MinorGridLines,
|
|
2335
2377
|
showLineSmoothing,
|
|
2336
2378
|
dataValuesDisplay,
|
|
2379
|
+
showXMajorTicks,
|
|
2380
|
+
xAxisMajorTickSizeNum,
|
|
2337
2381
|
showYMajorTicks,
|
|
2338
2382
|
showY2MajorTicks,
|
|
2339
2383
|
yAxisMajorTickSizeNum,
|
|
@@ -2346,7 +2390,11 @@ var TimeSeriesChartWrapper = (props) => {
|
|
|
2346
2390
|
y2AxisMinorTickSizeNum,
|
|
2347
2391
|
showYAxisWithZero,
|
|
2348
2392
|
showY2AxisWithZero,
|
|
2349
|
-
|
|
2393
|
+
showXAxisLine,
|
|
2394
|
+
showYAxisLine,
|
|
2395
|
+
showY2AxisLine,
|
|
2396
|
+
legendMode,
|
|
2397
|
+
xAxisMaxLabelParts
|
|
2350
2398
|
]);
|
|
2351
2399
|
const memoizedVisualization = (0, react_exports.useMemo)(() => {
|
|
2352
2400
|
return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
|
|
@@ -2748,6 +2796,33 @@ function getAlternateColor(hex, percent) {
|
|
|
2748
2796
|
const bLight = lighten(b);
|
|
2749
2797
|
return `rgba(${rLight}, ${gLight}, ${bLight}, 1)`;
|
|
2750
2798
|
}
|
|
2799
|
+
function assignCategoryColor(categoryValue, categoricalColors, seriesColors, defaultColor) {
|
|
2800
|
+
if (categoryValue && !categoricalColors.has(categoryValue)) {
|
|
2801
|
+
const colorIndex = categoricalColors.size;
|
|
2802
|
+
const colors = Array.isArray(seriesColors) ? seriesColors : [];
|
|
2803
|
+
const assignedColor = colors[colorIndex % colors.length] || defaultColor;
|
|
2804
|
+
categoricalColors.set(categoryValue, assignedColor);
|
|
2805
|
+
}
|
|
2806
|
+
}
|
|
2807
|
+
function getEventColor(dataColors, index, categoryValue, categoricalColors, defaultColor) {
|
|
2808
|
+
const colors = Array.isArray(dataColors) ? dataColors : [];
|
|
2809
|
+
if (colors.length > 0) {
|
|
2810
|
+
return colors[index] || defaultColor;
|
|
2811
|
+
}
|
|
2812
|
+
if (categoryValue) {
|
|
2813
|
+
return categoricalColors.get(categoryValue) || defaultColor;
|
|
2814
|
+
}
|
|
2815
|
+
return defaultColor;
|
|
2816
|
+
}
|
|
2817
|
+
function updateTimeDifferences(timeDifferences, lastValidStart, currentStart) {
|
|
2818
|
+
if (lastValidStart !== null && !Number.isNaN(currentStart)) {
|
|
2819
|
+
const timeDiff = currentStart - lastValidStart;
|
|
2820
|
+
if (!Number.isNaN(timeDiff)) {
|
|
2821
|
+
timeDifferences.push(timeDiff);
|
|
2822
|
+
}
|
|
2823
|
+
}
|
|
2824
|
+
return !Number.isNaN(currentStart) ? currentStart : lastValidStart;
|
|
2825
|
+
}
|
|
2751
2826
|
var toTimestamp = (dateStr, timezone = {}) => {
|
|
2752
2827
|
try {
|
|
2753
2828
|
let dateTime;
|
|
@@ -2789,22 +2864,19 @@ function mapDataToTimeline(mapDataToTimelineType) {
|
|
|
2789
2864
|
const lanesSet = /* @__PURE__ */ new Set();
|
|
2790
2865
|
const laneSeriesMap = /* @__PURE__ */ new Map();
|
|
2791
2866
|
const timeDifferences = [];
|
|
2867
|
+
let lastValidStart = null;
|
|
2868
|
+
if (!x || !y || !Array.isArray(x) || !Array.isArray(y)) {
|
|
2869
|
+
return { laneSeries: [], lanes: [], categoricalColors, tickInterval: "1mo", hasInvalidData: true };
|
|
2870
|
+
}
|
|
2792
2871
|
for (let i = 0; i < Math.min(x.length, resultLimit); i += 1) {
|
|
2793
2872
|
const lane = y[i];
|
|
2873
|
+
if (lane === void 0 || lane === null || typeof lane === "object") {
|
|
2874
|
+
continue;
|
|
2875
|
+
}
|
|
2794
2876
|
lanesSet.add(lane);
|
|
2795
|
-
let color = defaultColor;
|
|
2796
2877
|
const categoryValue = ((_a = category[i]) == null ? void 0 : _a.toString()) || null;
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
const assignedColor = seriesColors[colorIndex % seriesColors.length] || defaultColor;
|
|
2800
|
-
categoricalColors.set(categoryValue, assignedColor);
|
|
2801
|
-
}
|
|
2802
|
-
if (dataColors && (dataColors == null ? void 0 : dataColors.length) > 0) {
|
|
2803
|
-
const assignedDataColor = dataColors[i];
|
|
2804
|
-
color = assignedDataColor || defaultColor;
|
|
2805
|
-
} else if (categoryValue) {
|
|
2806
|
-
color = categoricalColors.get(categoryValue);
|
|
2807
|
-
}
|
|
2878
|
+
assignCategoryColor(categoryValue, categoricalColors, seriesColors, defaultColor);
|
|
2879
|
+
const color = getEventColor(dataColors, i, categoryValue, categoricalColors, defaultColor);
|
|
2808
2880
|
const start = toTimestamp(x[i].toString(), timezone);
|
|
2809
2881
|
const durationValue = duration[i] || 0;
|
|
2810
2882
|
const end = start + durationValue;
|
|
@@ -2821,11 +2893,7 @@ function mapDataToTimeline(mapDataToTimelineType) {
|
|
|
2821
2893
|
color,
|
|
2822
2894
|
additionalTooltipValue
|
|
2823
2895
|
});
|
|
2824
|
-
|
|
2825
|
-
const prevStart = toTimestamp(x[i - 1].toString(), timezone);
|
|
2826
|
-
const timeDiff = start - prevStart;
|
|
2827
|
-
timeDifferences.push(timeDiff);
|
|
2828
|
-
}
|
|
2896
|
+
lastValidStart = updateTimeDifferences(timeDifferences, lastValidStart, start);
|
|
2829
2897
|
}
|
|
2830
2898
|
const lanes = Array.from(lanesSet);
|
|
2831
2899
|
const laneSeries = lanes.map((lane) => {
|
|
@@ -2842,16 +2910,17 @@ function mapDataToTimeline(mapDataToTimelineType) {
|
|
|
2842
2910
|
return { laneSeries, lanes, categoricalColors, tickInterval };
|
|
2843
2911
|
}
|
|
2844
2912
|
var drawRoundedRect = (ctx, x, y, width, height, radius) => {
|
|
2913
|
+
const r = Math.min(radius, width / 2, height / 2);
|
|
2845
2914
|
ctx.beginPath();
|
|
2846
|
-
ctx.moveTo(x +
|
|
2847
|
-
ctx.lineTo(x + width -
|
|
2848
|
-
ctx.quadraticCurveTo(x + width, y, x + width, y +
|
|
2849
|
-
ctx.lineTo(x + width, y + height -
|
|
2850
|
-
ctx.quadraticCurveTo(x + width, y + height, x + width -
|
|
2851
|
-
ctx.lineTo(x +
|
|
2852
|
-
ctx.quadraticCurveTo(x, y + height, x, y + height -
|
|
2853
|
-
ctx.lineTo(x, y +
|
|
2854
|
-
ctx.quadraticCurveTo(x, y, x +
|
|
2915
|
+
ctx.moveTo(x + r, y);
|
|
2916
|
+
ctx.lineTo(x + width - r, y);
|
|
2917
|
+
ctx.quadraticCurveTo(x + width, y, x + width, y + r);
|
|
2918
|
+
ctx.lineTo(x + width, y + height - r);
|
|
2919
|
+
ctx.quadraticCurveTo(x + width, y + height, x + width - r, y + height);
|
|
2920
|
+
ctx.lineTo(x + r, y + height);
|
|
2921
|
+
ctx.quadraticCurveTo(x, y + height, x, y + height - r);
|
|
2922
|
+
ctx.lineTo(x, y + r);
|
|
2923
|
+
ctx.quadraticCurveTo(x, y, x + r, y);
|
|
2855
2924
|
ctx.closePath();
|
|
2856
2925
|
ctx.fill();
|
|
2857
2926
|
ctx.stroke();
|
|
@@ -3332,7 +3401,7 @@ var TimelinePlugin = ({
|
|
|
3332
3401
|
const FIXED_LANE_HEIGHT2 = 32;
|
|
3333
3402
|
const AXIS_COLOR = backgroundColor;
|
|
3334
3403
|
const ALTERNATE_COLOR = getAlternateColor(backgroundColor, 0.1);
|
|
3335
|
-
const MIN_BAR_WIDTH2 =
|
|
3404
|
+
const MIN_BAR_WIDTH2 = 1;
|
|
3336
3405
|
const LANE_SCALE_FACTOR = 0.85;
|
|
3337
3406
|
let dpr = window.devicePixelRatio || 1;
|
|
3338
3407
|
const redrawChart = (u) => {
|
|
@@ -3398,6 +3467,13 @@ var TimelinePlugin = ({
|
|
|
3398
3467
|
ctx.strokeStyle = strokeColor;
|
|
3399
3468
|
ctx.lineWidth = 1;
|
|
3400
3469
|
ctx.stroke();
|
|
3470
|
+
} else if (barWidth <= 1) {
|
|
3471
|
+
ctx.beginPath();
|
|
3472
|
+
ctx.moveTo(xStart, yBarTop);
|
|
3473
|
+
ctx.lineTo(xStart, yBarTop + barHeight);
|
|
3474
|
+
ctx.strokeStyle = strokeColor;
|
|
3475
|
+
ctx.lineWidth = 1;
|
|
3476
|
+
ctx.stroke();
|
|
3401
3477
|
} else {
|
|
3402
3478
|
ctx.fillStyle = fillColor;
|
|
3403
3479
|
ctx.strokeStyle = strokeColor;
|
|
@@ -3578,6 +3654,9 @@ var TimelineYAxis = ({
|
|
|
3578
3654
|
const theme = (0, themes_exports.useSplunkTheme)();
|
|
3579
3655
|
const lanePadding = 16;
|
|
3580
3656
|
return /* @__PURE__ */ react_exports.createElement(YAxisContainer, { "data-test": "timeline-yaxis-container", height, width: yAxisLabelWidth }, lanes.map((lane, index) => {
|
|
3657
|
+
if (lane === void 0 || lane === null || typeof lane === "object") {
|
|
3658
|
+
return null;
|
|
3659
|
+
}
|
|
3581
3660
|
let laneTextColor = theme.contentColorDefault;
|
|
3582
3661
|
const isHovering = highlightedLane !== null;
|
|
3583
3662
|
const isMuted = highlightedLane !== lane;
|
|
@@ -4082,7 +4161,7 @@ var PureTimeline = (_a) => {
|
|
|
4082
4161
|
const showLegend = (!dataColors || (dataColors == null ? void 0 : dataColors.length) === 0) && (category == null ? void 0 : category.length) > 0 && (legendDisplay === "right" || legendDisplay === "bottom");
|
|
4083
4162
|
const timezone = react_exports.useContext(TimezoneContext_default);
|
|
4084
4163
|
const theme = (0, themes_exports.useSplunkTheme)();
|
|
4085
|
-
const { laneSeries, lanes, categoricalColors, tickInterval } = mapDataToTimeline({
|
|
4164
|
+
const { laneSeries, lanes, categoricalColors, tickInterval, hasInvalidData } = mapDataToTimeline({
|
|
4086
4165
|
resultLimit,
|
|
4087
4166
|
x,
|
|
4088
4167
|
y,
|
|
@@ -4093,6 +4172,27 @@ var PureTimeline = (_a) => {
|
|
|
4093
4172
|
additionalTooltipValues,
|
|
4094
4173
|
timezone
|
|
4095
4174
|
});
|
|
4175
|
+
if (hasInvalidData) {
|
|
4176
|
+
return /* @__PURE__ */ react_exports.createElement(
|
|
4177
|
+
TimelineContainer,
|
|
4178
|
+
{
|
|
4179
|
+
"data-test": "timeline-container",
|
|
4180
|
+
backgroundColor: backgroundColor || theme.backgroundColorPage,
|
|
4181
|
+
width,
|
|
4182
|
+
height,
|
|
4183
|
+
"data-test-data-colors": JSON.stringify(dataColors)
|
|
4184
|
+
},
|
|
4185
|
+
/* @__PURE__ */ react_exports.createElement(
|
|
4186
|
+
Message_default,
|
|
4187
|
+
{
|
|
4188
|
+
width,
|
|
4189
|
+
height,
|
|
4190
|
+
level: "error",
|
|
4191
|
+
message: "Incompatible data format. Please check your data source configuration."
|
|
4192
|
+
}
|
|
4193
|
+
)
|
|
4194
|
+
);
|
|
4195
|
+
}
|
|
4096
4196
|
const handleLaneClick = (laneValue) => {
|
|
4097
4197
|
onLaneClick({
|
|
4098
4198
|
type: "lane.click",
|