@antv/gpt-vis 1.3.2 → 1.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/README.md +261 -137
- package/README.zh-CN.md +263 -116
- package/dist/cjs/annotation/components/bottom-n.d.ts +2 -0
- package/dist/cjs/annotation/components/bottom-n.js +57 -0
- package/dist/cjs/annotation/components/centroid.d.ts +2 -0
- package/dist/cjs/annotation/components/centroid.js +75 -0
- package/dist/cjs/annotation/components/connector.d.ts +25 -0
- package/dist/cjs/annotation/components/connector.js +298 -0
- package/dist/cjs/annotation/components/contribution.d.ts +3 -0
- package/dist/cjs/annotation/components/contribution.js +136 -0
- package/dist/cjs/annotation/components/crossing.d.ts +3 -0
- package/dist/cjs/annotation/components/crossing.js +504 -0
- package/dist/cjs/annotation/components/event.d.ts +2 -0
- package/dist/cjs/annotation/components/event.js +62 -0
- package/dist/cjs/annotation/components/first.d.ts +2 -0
- package/dist/cjs/annotation/components/first.js +42 -0
- package/dist/cjs/annotation/components/group.d.ts +3 -0
- package/dist/cjs/annotation/components/group.js +73 -0
- package/dist/cjs/annotation/components/highlight.d.ts +14 -0
- package/dist/cjs/annotation/components/highlight.js +552 -0
- package/dist/cjs/annotation/components/index.d.ts +34 -0
- package/dist/cjs/annotation/components/index.js +128 -0
- package/dist/cjs/annotation/components/last.d.ts +2 -0
- package/dist/cjs/annotation/components/last.js +42 -0
- package/dist/cjs/annotation/components/max-x.d.ts +2 -0
- package/dist/cjs/annotation/components/max-x.js +41 -0
- package/dist/cjs/annotation/components/max-y.d.ts +2 -0
- package/dist/cjs/annotation/components/max-y.js +41 -0
- package/dist/cjs/annotation/components/mean.d.ts +2 -0
- package/dist/cjs/annotation/components/mean.js +50 -0
- package/dist/cjs/annotation/components/median.d.ts +2 -0
- package/dist/cjs/annotation/components/median.js +49 -0
- package/dist/cjs/annotation/components/min-x.d.ts +2 -0
- package/dist/cjs/annotation/components/min-x.js +41 -0
- package/dist/cjs/annotation/components/min-y.d.ts +2 -0
- package/dist/cjs/annotation/components/min-y.js +41 -0
- package/dist/cjs/annotation/components/outlier.d.ts +3 -0
- package/dist/cjs/annotation/components/outlier.js +83 -0
- package/dist/cjs/annotation/components/path.d.ts +20 -0
- package/dist/cjs/annotation/components/path.js +147 -0
- package/dist/cjs/annotation/components/peak.d.ts +2 -0
- package/dist/cjs/annotation/components/peak.js +42 -0
- package/dist/cjs/annotation/components/point.d.ts +26 -0
- package/dist/cjs/annotation/components/point.js +241 -0
- package/dist/cjs/annotation/components/quadrant.d.ts +3 -0
- package/dist/cjs/annotation/components/quadrant.js +97 -0
- package/dist/cjs/annotation/components/quantile.d.ts +2 -0
- package/dist/cjs/annotation/components/quantile.js +49 -0
- package/dist/cjs/annotation/components/range-inside.d.ts +2 -0
- package/dist/cjs/annotation/components/range-inside.js +65 -0
- package/dist/cjs/annotation/components/range-outside.d.ts +2 -0
- package/dist/cjs/annotation/components/range-outside.js +65 -0
- package/dist/cjs/annotation/components/range-x.d.ts +2 -0
- package/dist/cjs/annotation/components/range-x.js +39 -0
- package/dist/cjs/annotation/components/range-y.d.ts +2 -0
- package/dist/cjs/annotation/components/range-y.js +39 -0
- package/dist/cjs/annotation/components/range.d.ts +15 -0
- package/dist/cjs/annotation/components/range.js +87 -0
- package/dist/cjs/annotation/components/target.d.ts +2 -0
- package/dist/cjs/annotation/components/target.js +51 -0
- package/dist/cjs/annotation/components/text.d.ts +15 -0
- package/dist/cjs/annotation/components/text.js +74 -0
- package/dist/cjs/annotation/components/threshold-highlight.d.ts +3 -0
- package/dist/cjs/annotation/components/threshold-highlight.js +223 -0
- package/dist/cjs/annotation/components/threshold-x.d.ts +2 -0
- package/dist/cjs/annotation/components/threshold-x.js +39 -0
- package/dist/cjs/annotation/components/threshold-y.d.ts +2 -0
- package/dist/cjs/annotation/components/threshold-y.js +40 -0
- package/dist/cjs/annotation/components/top-n.d.ts +2 -0
- package/dist/cjs/annotation/components/top-n.js +57 -0
- package/dist/cjs/annotation/components/valley.d.ts +2 -0
- package/dist/cjs/annotation/components/valley.js +42 -0
- package/dist/cjs/annotation/index.d.ts +1 -0
- package/dist/cjs/annotation/index.js +29 -0
- package/dist/cjs/annotation/label.d.ts +38 -0
- package/dist/cjs/annotation/label.js +347 -0
- package/dist/cjs/annotation/layout.d.ts +12 -0
- package/dist/cjs/annotation/layout.js +142 -0
- package/dist/cjs/annotation/merge.d.ts +19 -0
- package/dist/cjs/annotation/merge.js +60 -0
- package/dist/cjs/annotation/registry.d.ts +190 -0
- package/dist/cjs/annotation/registry.js +134 -0
- package/dist/cjs/annotation/runtime/g2.d.ts +90 -0
- package/dist/cjs/annotation/runtime/g2.js +521 -0
- package/dist/cjs/annotation/runtime/g6.d.ts +40 -0
- package/dist/cjs/annotation/runtime/g6.js +310 -0
- package/dist/cjs/annotation/runtime/index.d.ts +11 -0
- package/dist/cjs/annotation/runtime/index.js +41 -0
- package/dist/cjs/annotation/runtime/summary.d.ts +17 -0
- package/dist/cjs/annotation/runtime/summary.js +39 -0
- package/dist/cjs/annotation/runtime/table.d.ts +16 -0
- package/dist/cjs/annotation/runtime/table.js +39 -0
- package/dist/cjs/annotation/utils.d.ts +40 -0
- package/dist/cjs/annotation/utils.js +275 -0
- package/dist/cjs/theme/annotation.d.ts +236 -0
- package/dist/cjs/theme/annotation.js +167 -0
- package/dist/cjs/theme/g2.js +13 -15
- package/dist/cjs/theme/g6.js +2 -2
- package/dist/cjs/theme/summary.js +2 -2
- package/dist/cjs/types/annotation.d.ts +310 -0
- package/dist/cjs/types/annotation.js +17 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/util/axis.d.ts +28 -0
- package/dist/cjs/util/axis.js +184 -0
- package/dist/cjs/util/components.d.ts +0 -10
- package/dist/cjs/util/components.js +9 -64
- package/dist/cjs/util/index.d.ts +7 -4
- package/dist/cjs/util/index.js +53 -9
- package/dist/cjs/vis/area/index.d.ts +2 -0
- package/dist/cjs/vis/area/index.js +30 -13
- package/dist/cjs/vis/bar/index.d.ts +2 -0
- package/dist/cjs/vis/bar/index.js +37 -7
- package/dist/cjs/vis/boxplot/index.js +14 -3
- package/dist/cjs/vis/column/index.d.ts +2 -0
- package/dist/cjs/vis/column/index.js +28 -9
- package/dist/cjs/vis/dual-axes/index.js +9 -9
- package/dist/cjs/vis/fishbone-diagram/index.js +2 -2
- package/dist/cjs/vis/flow-diagram/index.js +2 -2
- package/dist/cjs/vis/funnel/index.js +10 -13
- package/dist/cjs/vis/histogram/index.js +2 -2
- package/dist/cjs/vis/indented-tree/index.js +2 -2
- package/dist/cjs/vis/line/index.d.ts +2 -0
- package/dist/cjs/vis/line/index.js +26 -10
- package/dist/cjs/vis/liquid/index.js +2 -2
- package/dist/cjs/vis/mindmap/index.js +2 -2
- package/dist/cjs/vis/network-graph/index.d.ts +2 -0
- package/dist/cjs/vis/network-graph/index.js +24 -3
- package/dist/cjs/vis/organization-chart/index.js +2 -2
- package/dist/cjs/vis/pie/index.d.ts +2 -0
- package/dist/cjs/vis/pie/index.js +21 -10
- package/dist/cjs/vis/radar/index.js +4 -6
- package/dist/cjs/vis/sankey/index.js +14 -1
- package/dist/cjs/vis/scatter/index.d.ts +10 -3
- package/dist/cjs/vis/scatter/index.js +18 -7
- package/dist/cjs/vis/summary/index.d.ts +9 -2
- package/dist/cjs/vis/summary/index.js +25 -8
- package/dist/cjs/vis/table/index.d.ts +2 -0
- package/dist/cjs/vis/table/index.js +48 -30
- package/dist/cjs/vis/venn/index.js +2 -2
- package/dist/cjs/vis/violin/index.js +14 -3
- package/dist/cjs/vis/waterfall/index.js +17 -9
- package/dist/cjs/vis/word-cloud/index.js +4 -6
- package/dist/esm/annotation/components/bottom-n.d.ts +2 -0
- package/dist/esm/annotation/components/bottom-n.js +42 -0
- package/dist/esm/annotation/components/centroid.d.ts +2 -0
- package/dist/esm/annotation/components/centroid.js +73 -0
- package/dist/esm/annotation/components/connector.d.ts +25 -0
- package/dist/esm/annotation/components/connector.js +332 -0
- package/dist/esm/annotation/components/contribution.d.ts +3 -0
- package/dist/esm/annotation/components/contribution.js +174 -0
- package/dist/esm/annotation/components/crossing.d.ts +3 -0
- package/dist/esm/annotation/components/crossing.js +665 -0
- package/dist/esm/annotation/components/event.d.ts +2 -0
- package/dist/esm/annotation/components/event.js +46 -0
- package/dist/esm/annotation/components/first.d.ts +2 -0
- package/dist/esm/annotation/components/first.js +18 -0
- package/dist/esm/annotation/components/group.d.ts +3 -0
- package/dist/esm/annotation/components/group.js +64 -0
- package/dist/esm/annotation/components/highlight.d.ts +14 -0
- package/dist/esm/annotation/components/highlight.js +838 -0
- package/dist/esm/annotation/components/index.d.ts +34 -0
- package/dist/esm/annotation/components/index.js +34 -0
- package/dist/esm/annotation/components/last.d.ts +2 -0
- package/dist/esm/annotation/components/last.js +18 -0
- package/dist/esm/annotation/components/max-x.d.ts +2 -0
- package/dist/esm/annotation/components/max-x.js +17 -0
- package/dist/esm/annotation/components/max-y.d.ts +2 -0
- package/dist/esm/annotation/components/max-y.js +17 -0
- package/dist/esm/annotation/components/mean.d.ts +2 -0
- package/dist/esm/annotation/components/mean.js +40 -0
- package/dist/esm/annotation/components/median.d.ts +2 -0
- package/dist/esm/annotation/components/median.js +32 -0
- package/dist/esm/annotation/components/min-x.d.ts +2 -0
- package/dist/esm/annotation/components/min-x.js +17 -0
- package/dist/esm/annotation/components/min-y.d.ts +2 -0
- package/dist/esm/annotation/components/min-y.js +17 -0
- package/dist/esm/annotation/components/outlier.d.ts +3 -0
- package/dist/esm/annotation/components/outlier.js +98 -0
- package/dist/esm/annotation/components/path.d.ts +20 -0
- package/dist/esm/annotation/components/path.js +165 -0
- package/dist/esm/annotation/components/peak.d.ts +2 -0
- package/dist/esm/annotation/components/peak.js +20 -0
- package/dist/esm/annotation/components/point.d.ts +26 -0
- package/dist/esm/annotation/components/point.js +277 -0
- package/dist/esm/annotation/components/quadrant.d.ts +3 -0
- package/dist/esm/annotation/components/quadrant.js +83 -0
- package/dist/esm/annotation/components/quantile.d.ts +2 -0
- package/dist/esm/annotation/components/quantile.js +32 -0
- package/dist/esm/annotation/components/range-inside.d.ts +2 -0
- package/dist/esm/annotation/components/range-inside.js +55 -0
- package/dist/esm/annotation/components/range-outside.d.ts +2 -0
- package/dist/esm/annotation/components/range-outside.js +55 -0
- package/dist/esm/annotation/components/range-x.d.ts +2 -0
- package/dist/esm/annotation/components/range-x.js +15 -0
- package/dist/esm/annotation/components/range-y.d.ts +2 -0
- package/dist/esm/annotation/components/range-y.js +15 -0
- package/dist/esm/annotation/components/range.d.ts +15 -0
- package/dist/esm/annotation/components/range.js +92 -0
- package/dist/esm/annotation/components/target.d.ts +2 -0
- package/dist/esm/annotation/components/target.js +44 -0
- package/dist/esm/annotation/components/text.d.ts +15 -0
- package/dist/esm/annotation/components/text.js +78 -0
- package/dist/esm/annotation/components/threshold-highlight.d.ts +3 -0
- package/dist/esm/annotation/components/threshold-highlight.js +297 -0
- package/dist/esm/annotation/components/threshold-x.d.ts +2 -0
- package/dist/esm/annotation/components/threshold-x.js +23 -0
- package/dist/esm/annotation/components/threshold-y.d.ts +2 -0
- package/dist/esm/annotation/components/threshold-y.js +24 -0
- package/dist/esm/annotation/components/top-n.d.ts +2 -0
- package/dist/esm/annotation/components/top-n.js +42 -0
- package/dist/esm/annotation/components/valley.d.ts +2 -0
- package/dist/esm/annotation/components/valley.js +20 -0
- package/dist/esm/annotation/index.d.ts +1 -0
- package/dist/esm/annotation/index.js +1 -0
- package/dist/esm/annotation/label.d.ts +38 -0
- package/dist/esm/annotation/label.js +449 -0
- package/dist/esm/annotation/layout.d.ts +12 -0
- package/dist/esm/annotation/layout.js +182 -0
- package/dist/esm/annotation/merge.d.ts +19 -0
- package/dist/esm/annotation/merge.js +67 -0
- package/dist/esm/annotation/registry.d.ts +190 -0
- package/dist/esm/annotation/registry.js +220 -0
- package/dist/esm/annotation/runtime/g2.d.ts +90 -0
- package/dist/esm/annotation/runtime/g2.js +754 -0
- package/dist/esm/annotation/runtime/g6.d.ts +40 -0
- package/dist/esm/annotation/runtime/g6.js +447 -0
- package/dist/esm/annotation/runtime/index.d.ts +11 -0
- package/dist/esm/annotation/runtime/index.js +26 -0
- package/dist/esm/annotation/runtime/summary.d.ts +17 -0
- package/dist/esm/annotation/runtime/summary.js +21 -0
- package/dist/esm/annotation/runtime/table.d.ts +16 -0
- package/dist/esm/annotation/runtime/table.js +21 -0
- package/dist/esm/annotation/utils.d.ts +40 -0
- package/dist/esm/annotation/utils.js +370 -0
- package/dist/esm/theme/annotation.d.ts +236 -0
- package/dist/esm/theme/annotation.js +186 -0
- package/dist/esm/theme/g2.js +2 -10
- package/dist/esm/theme/g6.js +1 -1
- package/dist/esm/theme/summary.js +1 -1
- package/dist/esm/types/annotation.d.ts +310 -0
- package/dist/esm/types/annotation.js +1 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/util/axis.d.ts +28 -0
- package/dist/esm/util/axis.js +222 -0
- package/dist/esm/util/components.d.ts +0 -10
- package/dist/esm/util/components.js +24 -69
- package/dist/esm/util/index.d.ts +7 -4
- package/dist/esm/util/index.js +7 -4
- package/dist/esm/vis/area/index.d.ts +2 -0
- package/dist/esm/vis/area/index.js +32 -9
- package/dist/esm/vis/bar/index.d.ts +2 -0
- package/dist/esm/vis/bar/index.js +37 -6
- package/dist/esm/vis/boxplot/index.js +10 -2
- package/dist/esm/vis/column/index.d.ts +2 -0
- package/dist/esm/vis/column/index.js +33 -12
- package/dist/esm/vis/dual-axes/index.js +10 -10
- package/dist/esm/vis/fishbone-diagram/index.js +1 -1
- package/dist/esm/vis/flow-diagram/index.js +1 -1
- package/dist/esm/vis/funnel/index.js +2 -7
- package/dist/esm/vis/histogram/index.js +4 -3
- package/dist/esm/vis/indented-tree/index.js +1 -1
- package/dist/esm/vis/line/index.d.ts +2 -0
- package/dist/esm/vis/line/index.js +31 -9
- package/dist/esm/vis/liquid/index.js +1 -1
- package/dist/esm/vis/mindmap/index.js +1 -1
- package/dist/esm/vis/network-graph/index.d.ts +2 -0
- package/dist/esm/vis/network-graph/index.js +29 -2
- package/dist/esm/vis/organization-chart/index.js +1 -1
- package/dist/esm/vis/pie/index.d.ts +2 -0
- package/dist/esm/vis/pie/index.js +25 -8
- package/dist/esm/vis/radar/index.js +1 -3
- package/dist/esm/vis/sankey/index.js +15 -1
- package/dist/esm/vis/scatter/index.d.ts +10 -3
- package/dist/esm/vis/scatter/index.js +28 -5
- package/dist/esm/vis/summary/index.d.ts +9 -2
- package/dist/esm/vis/summary/index.js +31 -13
- package/dist/esm/vis/table/index.d.ts +2 -0
- package/dist/esm/vis/table/index.js +50 -33
- package/dist/esm/vis/venn/index.js +1 -1
- package/dist/esm/vis/violin/index.js +10 -2
- package/dist/esm/vis/waterfall/index.js +16 -13
- package/dist/esm/vis/word-cloud/index.js +1 -3
- package/dist/umd/index.min.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target2, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target2, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/annotation/components/index.ts
|
|
20
|
+
var components_exports = {};
|
|
21
|
+
__export(components_exports, {
|
|
22
|
+
bottomN: () => import_bottom_n.bottomN,
|
|
23
|
+
centroid: () => import_centroid.centroid,
|
|
24
|
+
connector: () => import_connector.connector,
|
|
25
|
+
contribution: () => import_contribution.contribution,
|
|
26
|
+
crossing: () => import_crossing.crossing,
|
|
27
|
+
event: () => import_event.event,
|
|
28
|
+
first: () => import_first.first,
|
|
29
|
+
group: () => import_group.group,
|
|
30
|
+
highlight: () => import_highlight.highlight,
|
|
31
|
+
last: () => import_last.last,
|
|
32
|
+
maxX: () => import_max_x.maxX,
|
|
33
|
+
maxY: () => import_max_y.maxY,
|
|
34
|
+
mean: () => import_mean.mean,
|
|
35
|
+
median: () => import_median.median,
|
|
36
|
+
minX: () => import_min_x.minX,
|
|
37
|
+
minY: () => import_min_y.minY,
|
|
38
|
+
outlier: () => import_outlier.outlier,
|
|
39
|
+
path: () => import_path.path,
|
|
40
|
+
peak: () => import_peak.peak,
|
|
41
|
+
point: () => import_point.point,
|
|
42
|
+
quadrant: () => import_quadrant.quadrant,
|
|
43
|
+
quantile: () => import_quantile.quantile,
|
|
44
|
+
range: () => import_range.range,
|
|
45
|
+
rangeInside: () => import_range_inside.rangeInside,
|
|
46
|
+
rangeOutside: () => import_range_outside.rangeOutside,
|
|
47
|
+
rangeX: () => import_range_x.rangeX,
|
|
48
|
+
rangeY: () => import_range_y.rangeY,
|
|
49
|
+
target: () => import_target.target,
|
|
50
|
+
text: () => import_text.text,
|
|
51
|
+
thresholdHighlight: () => import_threshold_highlight.thresholdHighlight,
|
|
52
|
+
thresholdX: () => import_threshold_x.thresholdX,
|
|
53
|
+
thresholdY: () => import_threshold_y.thresholdY,
|
|
54
|
+
topN: () => import_top_n.topN,
|
|
55
|
+
valley: () => import_valley.valley
|
|
56
|
+
});
|
|
57
|
+
module.exports = __toCommonJS(components_exports);
|
|
58
|
+
var import_bottom_n = require("./bottom-n");
|
|
59
|
+
var import_centroid = require("./centroid");
|
|
60
|
+
var import_connector = require("./connector");
|
|
61
|
+
var import_contribution = require("./contribution");
|
|
62
|
+
var import_crossing = require("./crossing");
|
|
63
|
+
var import_event = require("./event");
|
|
64
|
+
var import_first = require("./first");
|
|
65
|
+
var import_group = require("./group");
|
|
66
|
+
var import_highlight = require("./highlight");
|
|
67
|
+
var import_last = require("./last");
|
|
68
|
+
var import_max_x = require("./max-x");
|
|
69
|
+
var import_max_y = require("./max-y");
|
|
70
|
+
var import_mean = require("./mean");
|
|
71
|
+
var import_median = require("./median");
|
|
72
|
+
var import_min_x = require("./min-x");
|
|
73
|
+
var import_min_y = require("./min-y");
|
|
74
|
+
var import_outlier = require("./outlier");
|
|
75
|
+
var import_path = require("./path");
|
|
76
|
+
var import_peak = require("./peak");
|
|
77
|
+
var import_point = require("./point");
|
|
78
|
+
var import_quadrant = require("./quadrant");
|
|
79
|
+
var import_quantile = require("./quantile");
|
|
80
|
+
var import_range = require("./range");
|
|
81
|
+
var import_range_inside = require("./range-inside");
|
|
82
|
+
var import_range_outside = require("./range-outside");
|
|
83
|
+
var import_range_x = require("./range-x");
|
|
84
|
+
var import_range_y = require("./range-y");
|
|
85
|
+
var import_target = require("./target");
|
|
86
|
+
var import_text = require("./text");
|
|
87
|
+
var import_threshold_highlight = require("./threshold-highlight");
|
|
88
|
+
var import_threshold_x = require("./threshold-x");
|
|
89
|
+
var import_threshold_y = require("./threshold-y");
|
|
90
|
+
var import_top_n = require("./top-n");
|
|
91
|
+
var import_valley = require("./valley");
|
|
92
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
93
|
+
0 && (module.exports = {
|
|
94
|
+
bottomN,
|
|
95
|
+
centroid,
|
|
96
|
+
connector,
|
|
97
|
+
contribution,
|
|
98
|
+
crossing,
|
|
99
|
+
event,
|
|
100
|
+
first,
|
|
101
|
+
group,
|
|
102
|
+
highlight,
|
|
103
|
+
last,
|
|
104
|
+
maxX,
|
|
105
|
+
maxY,
|
|
106
|
+
mean,
|
|
107
|
+
median,
|
|
108
|
+
minX,
|
|
109
|
+
minY,
|
|
110
|
+
outlier,
|
|
111
|
+
path,
|
|
112
|
+
peak,
|
|
113
|
+
point,
|
|
114
|
+
quadrant,
|
|
115
|
+
quantile,
|
|
116
|
+
range,
|
|
117
|
+
rangeInside,
|
|
118
|
+
rangeOutside,
|
|
119
|
+
rangeX,
|
|
120
|
+
rangeY,
|
|
121
|
+
target,
|
|
122
|
+
text,
|
|
123
|
+
thresholdHighlight,
|
|
124
|
+
thresholdX,
|
|
125
|
+
thresholdY,
|
|
126
|
+
topN,
|
|
127
|
+
valley
|
|
128
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/annotation/components/last.ts
|
|
20
|
+
var last_exports = {};
|
|
21
|
+
__export(last_exports, {
|
|
22
|
+
last: () => last
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(last_exports);
|
|
25
|
+
var import_utils = require("../utils");
|
|
26
|
+
var import_highlight = require("./highlight");
|
|
27
|
+
var last = {
|
|
28
|
+
g2: (annotations, { mapping }) => annotations.flatMap((annotation) => {
|
|
29
|
+
const rows = (0, import_utils.selectRows)(mapping.data, annotation.data);
|
|
30
|
+
return rows.slice(-1).flatMap(
|
|
31
|
+
(row) => import_highlight.highlight.create({
|
|
32
|
+
data: [row],
|
|
33
|
+
label: annotation.label ?? `Last: ${row[mapping.y]}`,
|
|
34
|
+
style: annotation.style
|
|
35
|
+
})
|
|
36
|
+
);
|
|
37
|
+
})
|
|
38
|
+
};
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
last
|
|
42
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/annotation/components/max-x.ts
|
|
20
|
+
var max_x_exports = {};
|
|
21
|
+
__export(max_x_exports, {
|
|
22
|
+
maxX: () => maxX
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(max_x_exports);
|
|
25
|
+
var import_utils = require("../utils");
|
|
26
|
+
var import_highlight = require("./highlight");
|
|
27
|
+
var maxX = {
|
|
28
|
+
g2: (annotations, { mapping }) => annotations.flatMap(
|
|
29
|
+
(annotation) => (0, import_utils.selectExtreme)((0, import_utils.selectRows)(mapping.data, annotation.data), mapping.x, true, true).flatMap(
|
|
30
|
+
(row) => import_highlight.highlight.create({
|
|
31
|
+
data: [row],
|
|
32
|
+
label: annotation.label ?? `Max X: ${row[mapping.x]}`,
|
|
33
|
+
style: annotation.style
|
|
34
|
+
})
|
|
35
|
+
)
|
|
36
|
+
)
|
|
37
|
+
};
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
maxX
|
|
41
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/annotation/components/max-y.ts
|
|
20
|
+
var max_y_exports = {};
|
|
21
|
+
__export(max_y_exports, {
|
|
22
|
+
maxY: () => maxY
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(max_y_exports);
|
|
25
|
+
var import_utils = require("../utils");
|
|
26
|
+
var import_highlight = require("./highlight");
|
|
27
|
+
var maxY = {
|
|
28
|
+
g2: (annotations, { mapping }) => annotations.flatMap(
|
|
29
|
+
(annotation) => (0, import_utils.selectExtreme)((0, import_utils.selectRows)(mapping.data, annotation.data), mapping.y, true, false).flatMap(
|
|
30
|
+
(row) => import_highlight.highlight.create({
|
|
31
|
+
data: [row],
|
|
32
|
+
label: annotation.label ?? `Max Y: ${row[mapping.y]}`,
|
|
33
|
+
style: annotation.style
|
|
34
|
+
})
|
|
35
|
+
)
|
|
36
|
+
)
|
|
37
|
+
};
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
maxY
|
|
41
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/annotation/components/mean.ts
|
|
20
|
+
var mean_exports = {};
|
|
21
|
+
__export(mean_exports, {
|
|
22
|
+
mean: () => mean
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(mean_exports);
|
|
25
|
+
var import_utils = require("../utils");
|
|
26
|
+
var import_path = require("./path");
|
|
27
|
+
var mean = {
|
|
28
|
+
g2: (annotations, { mapping }) => annotations.flatMap((annotation) => {
|
|
29
|
+
const field = (0, import_utils.annotationField)(mapping, annotation.axis);
|
|
30
|
+
const values = (0, import_utils.numericRows)((0, import_utils.selectRows)(mapping.data, annotation.data), field).map(
|
|
31
|
+
({ value: value2 }) => value2
|
|
32
|
+
);
|
|
33
|
+
if (!values.length)
|
|
34
|
+
return [];
|
|
35
|
+
const value = meanValue(values);
|
|
36
|
+
return import_path.path.create({
|
|
37
|
+
data: (0, import_utils.axisPosition)(field, value),
|
|
38
|
+
label: annotation.label ?? `Mean: ${(0, import_utils.formatNumber)(value)}`,
|
|
39
|
+
style: { lineDash: [4, 4], ...annotation.style }
|
|
40
|
+
});
|
|
41
|
+
})
|
|
42
|
+
};
|
|
43
|
+
function meanValue(values) {
|
|
44
|
+
const scale = values.reduce((max, value) => Math.max(max, Math.abs(value)), 0);
|
|
45
|
+
return scale === 0 ? 0 : values.reduce((sum, value) => sum + value / scale / values.length, 0) * scale;
|
|
46
|
+
}
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
mean
|
|
50
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/annotation/components/median.ts
|
|
20
|
+
var median_exports = {};
|
|
21
|
+
__export(median_exports, {
|
|
22
|
+
median: () => median
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(median_exports);
|
|
25
|
+
var import_utils = require("../utils");
|
|
26
|
+
var import_path = require("./path");
|
|
27
|
+
var median = {
|
|
28
|
+
g2: (annotations, { mapping }) => annotations.flatMap((annotation) => {
|
|
29
|
+
const field = (0, import_utils.annotationField)(mapping, annotation.axis);
|
|
30
|
+
const values = (0, import_utils.numericRows)((0, import_utils.selectRows)(mapping.data, annotation.data), field).map(
|
|
31
|
+
({ value: value2 }) => value2
|
|
32
|
+
);
|
|
33
|
+
if (!values.length)
|
|
34
|
+
return [];
|
|
35
|
+
const value = (0, import_utils.quantileValue)(
|
|
36
|
+
values.sort((a, b) => a - b),
|
|
37
|
+
0.5
|
|
38
|
+
);
|
|
39
|
+
return import_path.path.create({
|
|
40
|
+
data: (0, import_utils.axisPosition)(field, value),
|
|
41
|
+
label: annotation.label ?? `Median: ${(0, import_utils.formatNumber)(value)}`,
|
|
42
|
+
style: { lineDash: [4, 4], ...annotation.style }
|
|
43
|
+
});
|
|
44
|
+
})
|
|
45
|
+
};
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
median
|
|
49
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/annotation/components/min-x.ts
|
|
20
|
+
var min_x_exports = {};
|
|
21
|
+
__export(min_x_exports, {
|
|
22
|
+
minX: () => minX
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(min_x_exports);
|
|
25
|
+
var import_utils = require("../utils");
|
|
26
|
+
var import_highlight = require("./highlight");
|
|
27
|
+
var minX = {
|
|
28
|
+
g2: (annotations, { mapping }) => annotations.flatMap(
|
|
29
|
+
(annotation) => (0, import_utils.selectExtreme)((0, import_utils.selectRows)(mapping.data, annotation.data), mapping.x, false, true).flatMap(
|
|
30
|
+
(row) => import_highlight.highlight.create({
|
|
31
|
+
data: [row],
|
|
32
|
+
label: annotation.label ?? `Min X: ${row[mapping.x]}`,
|
|
33
|
+
style: annotation.style
|
|
34
|
+
})
|
|
35
|
+
)
|
|
36
|
+
)
|
|
37
|
+
};
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
minX
|
|
41
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/annotation/components/min-y.ts
|
|
20
|
+
var min_y_exports = {};
|
|
21
|
+
__export(min_y_exports, {
|
|
22
|
+
minY: () => minY
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(min_y_exports);
|
|
25
|
+
var import_utils = require("../utils");
|
|
26
|
+
var import_highlight = require("./highlight");
|
|
27
|
+
var minY = {
|
|
28
|
+
g2: (annotations, { mapping }) => annotations.flatMap(
|
|
29
|
+
(annotation) => (0, import_utils.selectExtreme)((0, import_utils.selectRows)(mapping.data, annotation.data), mapping.y, false, false).flatMap(
|
|
30
|
+
(row) => import_highlight.highlight.create({
|
|
31
|
+
data: [row],
|
|
32
|
+
label: annotation.label ?? `Min Y: ${row[mapping.y]}`,
|
|
33
|
+
style: annotation.style
|
|
34
|
+
})
|
|
35
|
+
)
|
|
36
|
+
)
|
|
37
|
+
};
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
minY
|
|
41
|
+
});
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/annotation/components/outlier.ts
|
|
20
|
+
var outlier_exports = {};
|
|
21
|
+
__export(outlier_exports, {
|
|
22
|
+
outlier: () => outlier
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(outlier_exports);
|
|
25
|
+
var import_utils = require("../utils");
|
|
26
|
+
var import_highlight = require("./highlight");
|
|
27
|
+
var outlier = {
|
|
28
|
+
g2: (annotations, { mapping }) => annotations.flatMap(
|
|
29
|
+
(annotation) => selectOutliers(
|
|
30
|
+
(0, import_utils.selectRows)(mapping.data, annotation.data),
|
|
31
|
+
mapping.y,
|
|
32
|
+
annotation.factor,
|
|
33
|
+
mapping.series
|
|
34
|
+
).flatMap(
|
|
35
|
+
(row) => import_highlight.highlight.create({
|
|
36
|
+
data: [row],
|
|
37
|
+
label: annotation.label ?? `Outlier: ${row[mapping.y]}`,
|
|
38
|
+
style: annotation.style
|
|
39
|
+
})
|
|
40
|
+
)
|
|
41
|
+
),
|
|
42
|
+
table: (annotations, { data }) => annotations.flatMap(
|
|
43
|
+
(annotation) => selectOutliers(
|
|
44
|
+
(0, import_utils.selectRows)(data, annotation.data.row),
|
|
45
|
+
annotation.data.field,
|
|
46
|
+
annotation.factor
|
|
47
|
+
).flatMap(
|
|
48
|
+
(row) => import_highlight.highlight.create({
|
|
49
|
+
data: [{ row, column: annotation.data.column }],
|
|
50
|
+
label: annotation.label ?? `Outlier: ${row[annotation.data.field]}`,
|
|
51
|
+
style: annotation.style
|
|
52
|
+
})
|
|
53
|
+
)
|
|
54
|
+
)
|
|
55
|
+
};
|
|
56
|
+
function selectOutliers(data, field, factor = 1.5, series) {
|
|
57
|
+
if (!Number.isFinite(factor) || factor <= 0)
|
|
58
|
+
throw new Error("Invalid annotation: outlier factor must be positive and finite.");
|
|
59
|
+
const groups = /* @__PURE__ */ new Map();
|
|
60
|
+
for (const item of (0, import_utils.numericRows)(data, field)) {
|
|
61
|
+
const key = series ? item.row[series] : void 0;
|
|
62
|
+
if (!groups.has(key))
|
|
63
|
+
groups.set(key, []);
|
|
64
|
+
groups.get(key).push(item);
|
|
65
|
+
}
|
|
66
|
+
const selected = /* @__PURE__ */ new Set();
|
|
67
|
+
for (const items of groups.values()) {
|
|
68
|
+
if (items.length < 4)
|
|
69
|
+
continue;
|
|
70
|
+
const values = items.map(({ value }) => value).sort((a, b) => a - b);
|
|
71
|
+
const q1 = (0, import_utils.quantileValue)(values, 0.25);
|
|
72
|
+
const q3 = (0, import_utils.quantileValue)(values, 0.75);
|
|
73
|
+
const spread = factor * (q3 - q1);
|
|
74
|
+
for (const { row, value } of items)
|
|
75
|
+
if (value < q1 - spread || value > q3 + spread)
|
|
76
|
+
selected.add(row);
|
|
77
|
+
}
|
|
78
|
+
return data.filter((row) => selected.has(row));
|
|
79
|
+
}
|
|
80
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
81
|
+
0 && (module.exports = {
|
|
82
|
+
outlier
|
|
83
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Annotation } from '../../types/annotation';
|
|
2
|
+
import type { Point } from '../layout';
|
|
3
|
+
import type { AnnotationComponent } from '../registry';
|
|
4
|
+
import type { G2AnnotationContext } from '../runtime';
|
|
5
|
+
/** One axis value spans a chart; multiple anchors form an ordered path. */
|
|
6
|
+
export declare const path: AnnotationComponent<'path', 'g2' | 'g6'> & {
|
|
7
|
+
create: typeof createPath;
|
|
8
|
+
};
|
|
9
|
+
type Region = {
|
|
10
|
+
fill: string;
|
|
11
|
+
fillOpacity: number;
|
|
12
|
+
visible?: () => boolean;
|
|
13
|
+
positions?: (context: Pick<G2AnnotationContext<object>, 'library' | 'axisValue' | 'getScene'>, coordinate: Parameters<G2AnnotationContext<object>['position']>[1]) => Point[][];
|
|
14
|
+
};
|
|
15
|
+
declare function createPath<T extends object>(options: Omit<Extract<Annotation<T>, {
|
|
16
|
+
type: 'path';
|
|
17
|
+
}>, 'type'>, region?: Region): Extract<Annotation<T>, {
|
|
18
|
+
type: 'path';
|
|
19
|
+
}>[];
|
|
20
|
+
export {};
|