dtable-statistic 4.3.3 → 4.3.4
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/es/api/dtable-db-api.js +3 -10
- package/es/calculator/base-calculator.js +12 -20
- package/es/calculator/basic-chart-calculator.js +65 -72
- package/es/calculator/combination-calculator.js +57 -64
- package/es/calculator/compare-bar-calculator.js +26 -33
- package/es/calculator/completeness-calculator.js +30 -37
- package/es/calculator/copy-value.js +1 -7
- package/es/calculator/dashboard-calculator.js +13 -20
- package/es/calculator/heat-map-calculator.js +18 -25
- package/es/calculator/horizontal-bar-calculator.js +8 -15
- package/es/calculator/index.js +35 -42
- package/es/calculator/map-calculator.js +22 -29
- package/es/calculator/mirror-calculator.js +20 -27
- package/es/calculator/number-card-calculator.js +10 -17
- package/es/calculator/pivot-table-calculator.js +58 -65
- package/es/calculator/scatter-calculator.js +14 -21
- package/es/calculator/thread-manager.js +1 -7
- package/es/calculator/trend-calculator.js +22 -29
- package/es/calculator/workers/basic-chart-calculator-worker.js +76 -83
- package/es/calculator/workers/calculator.worker.js +30 -33
- package/es/calculator/workers/card-calculator-worker.js +13 -19
- package/es/calculator/workers/combination-calculator-worker.js +46 -53
- package/es/calculator/workers/compare-bar-chart-calculator-worker.js +22 -29
- package/es/calculator/workers/completeness-calculator-worker.js +34 -41
- package/es/calculator/workers/dashboard-calculator-worker.js +18 -24
- package/es/calculator/workers/mirror-calculator-worker.js +22 -29
- package/es/calculator/workers/pivot-table-calculator-worker.js +77 -84
- package/es/calculator/workers/scatter-calculator-worker.js +20 -27
- package/es/calculator/workers/trend-calculator-worker.js +27 -34
- package/es/calculator/world-map-calculator.js +17 -24
- package/es/components/common-add-tool.js +5 -12
- package/es/components/dialog/chart-addition-edit-dialog.js +12 -20
- package/es/components/dialog/chart-addition-widgets/chart-selector.js +101 -108
- package/es/components/dialog/color-theme-dialog.js +15 -22
- package/es/components/dialog/delete-confirmation-dialog.js +11 -18
- package/es/components/dialog/enlarged-chart-dialog.js +20 -28
- package/es/components/dialog/new-table-dialog.js +16 -23
- package/es/components/dialog/new-view-dialog.js +14 -21
- package/es/components/dialog/rename-view-dialog.js +14 -22
- package/es/components/dialog/statistic-record-dialog/index.js +37 -45
- package/es/components/dialog/statistic-types-dialog/index.js +14 -22
- package/es/components/dialog/table-select-dialog.js +15 -23
- package/es/components/dropdown-menu/statistic-dropdown-menu.js +41 -49
- package/es/components/dtable-popover.js +12 -19
- package/es/components/dtable-search-input.js +13 -21
- package/es/components/dtable-select.js +15 -21
- package/es/components/icon.js +4 -11
- package/es/components/index.js +11 -76
- package/es/components/loading.js +3 -10
- package/es/components/modal-portal.js +5 -12
- package/es/components/popover/color-rules/color-rule.js +25 -33
- package/es/components/popover/color-rules/index.js +6 -14
- package/es/components/popover/color-rules/rule-filters/filter.js +27 -34
- package/es/components/popover/color-rules/rule-filters/index.js +17 -25
- package/es/components/popover/color-rules/rule-filters/number-input.js +9 -17
- package/es/components/popover/color-rules-popover.js +24 -32
- package/es/components/popover/color-selector-popover.js +10 -17
- package/es/components/seatable-radio/index.js +9 -16
- package/es/components/select/index.js +2 -9
- package/es/components/select/option-group.js +19 -27
- package/es/components/select/option.js +6 -14
- package/es/components/select/select.js +17 -25
- package/es/components/toast/alert.js +24 -31
- package/es/components/toast/index.js +3 -10
- package/es/components/toast/toast.js +12 -20
- package/es/components/toast/toastManager.js +9 -17
- package/es/components/toast/toaster.js +6 -14
- package/es/constants/color-rules.js +6 -12
- package/es/constants/dtable-select-style.js +4 -9
- package/es/constants/event-types.js +4 -10
- package/es/constants/index.js +67 -96
- package/es/constants/key-codes.js +0 -2
- package/es/constants/map.js +2 -8
- package/es/constants/model.js +20 -26
- package/es/constants/regions.js +3 -8
- package/es/constants/zIndexes.js +1 -7
- package/es/custom-g2.js +208 -236
- package/es/dashboard.js +50 -58
- package/es/desktop-dashboard.js +47 -55
- package/es/index.js +3 -6
- package/es/locale/index.js +10 -13
- package/es/locale/lang/de.js +1 -7
- package/es/locale/lang/en.js +1 -7
- package/es/locale/lang/fr.js +1 -7
- package/es/locale/lang/zh_CN.js +1 -7
- package/es/mobile-dashboard.js +38 -46
- package/es/model/bar-group.js +11 -19
- package/es/model/bar.js +10 -18
- package/es/model/base-model.js +2 -9
- package/es/model/basic-number-card.js +8 -16
- package/es/model/collaborators.js +2 -9
- package/es/model/combination.js +12 -20
- package/es/model/compare-bar.js +16 -24
- package/es/model/completeness-group.js +8 -16
- package/es/model/completeness.js +5 -13
- package/es/model/custom-bar.js +6 -14
- package/es/model/dashboard.js +6 -14
- package/es/model/generic-model.js +133 -141
- package/es/model/heat-map.js +11 -19
- package/es/model/horizontal-bar-group.js +10 -18
- package/es/model/horizontal-bar.js +10 -18
- package/es/model/index.js +53 -185
- package/es/model/map.js +15 -23
- package/es/model/mirror.js +13 -21
- package/es/model/pie.js +10 -18
- package/es/model/ring.js +11 -19
- package/es/model/scatter.js +6 -14
- package/es/model/statistic-dashboard.js +2 -9
- package/es/model/table.js +10 -18
- package/es/model/trend.js +12 -20
- package/es/model/world-map.js +13 -21
- package/es/service/chart-service.js +7 -14
- package/es/service/dashboard-service.js +34 -41
- package/es/service/map-json.js +8 -14
- package/es/stat-editor/chart-name-editor.js +8 -15
- package/es/stat-editor/index.js +16 -24
- package/es/stat-editor/stat-settings/advance-chart-settings/basic-number-card-settings.js +21 -29
- package/es/stat-editor/stat-settings/advance-chart-settings/combination-settings.js +49 -57
- package/es/stat-editor/stat-settings/advance-chart-settings/dashboard-chart-settings.js +23 -31
- package/es/stat-editor/stat-settings/advance-chart-settings/geo-granularity-settings.js +4 -11
- package/es/stat-editor/stat-settings/advance-chart-settings/heat-map-settings.js +19 -27
- package/es/stat-editor/stat-settings/advance-chart-settings/index.js +43 -51
- package/es/stat-editor/stat-settings/advance-chart-settings/map-settings.js +23 -31
- package/es/stat-editor/stat-settings/advance-chart-settings/mirror-settings.js +23 -31
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/combination-style-setting.js +37 -45
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/heat-map-settings.js +19 -27
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/map-setting.js +26 -34
- package/es/stat-editor/stat-settings/advance-chart-settings/summary-settings.js +47 -55
- package/es/stat-editor/stat-settings/advance-chart-settings/trend-chart-settings.js +22 -30
- package/es/stat-editor/stat-settings/advance-chart-settings/world-map-settings.js +18 -26
- package/es/stat-editor/stat-settings/basic-chart-settings/advance-bar-chart-settings.js +27 -35
- package/es/stat-editor/stat-settings/basic-chart-settings/bar-settings.js +24 -32
- package/es/stat-editor/stat-settings/basic-chart-settings/completeness-chart-settings.js +33 -41
- package/es/stat-editor/stat-settings/basic-chart-settings/custom-bar-settings.js +22 -30
- package/es/stat-editor/stat-settings/basic-chart-settings/groupby-settings.js +27 -26
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-axis-group-settings.js +46 -54
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-bar-settings.js +23 -31
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-group-chart-settings.js +26 -34
- package/es/stat-editor/stat-settings/basic-chart-settings/index.js +77 -85
- package/es/stat-editor/stat-settings/basic-chart-settings/pie-settings.js +21 -29
- package/es/stat-editor/stat-settings/basic-chart-settings/pivot-table-settings.js +73 -81
- package/es/stat-editor/stat-settings/basic-chart-settings/scatter-settings.js +16 -24
- package/es/stat-editor/stat-settings/basic-chart-settings/stack-item-settings.js +19 -27
- package/es/stat-editor/stat-settings/basic-chart-settings/stacks-settings.js +18 -26
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/bar-chart-style-setting.js +49 -57
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/completeness-style.js +17 -25
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/horizontal-bar-chart-style.js +47 -55
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/label-font-size-editor.js +11 -19
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/pie-chart-style-settings.js +45 -53
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/time-compare-style.js +9 -17
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-method-setting.js +20 -28
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-settings.js +30 -38
- package/es/stat-editor/stat-settings/basic-chart-settings/time-comparison-settings.js +50 -58
- package/es/stat-editor/stat-settings/basic-chart-settings/timer-picker.js +17 -25
- package/es/stat-editor/stat-settings/basic-chart-settings/y-axis-group-settings.js +47 -55
- package/es/stat-editor/stat-settings/color-setting/color-group-selector.js +11 -19
- package/es/stat-editor/stat-settings/color-setting/color-picker.js +12 -19
- package/es/stat-editor/stat-settings/color-setting/color-use-type-selector.js +62 -70
- package/es/stat-editor/stat-settings/map/map-level.js +13 -20
- package/es/stat-editor/stat-settings/map/map-province-city.js +20 -27
- package/es/stat-editor/stat-settings/public-setting/axis-label-position-setting.js +11 -19
- package/es/stat-editor/stat-settings/public-setting/base-settings.js +20 -28
- package/es/stat-editor/stat-settings/public-setting/calender.js +22 -29
- package/es/stat-editor/stat-settings/public-setting/column-settings.js +6 -13
- package/es/stat-editor/stat-settings/public-setting/custom-title-setting.js +9 -16
- package/es/stat-editor/stat-settings/public-setting/data-sort-setting.js +13 -21
- package/es/stat-editor/stat-settings/public-setting/ind-toggle-setting.js +8 -15
- package/es/stat-editor/stat-settings/public-setting/min-max-setting.js +11 -19
- package/es/stat-editor/stat-settings/public-setting/numeric-summary-item.js +27 -35
- package/es/stat-editor/stat-settings/public-setting/toggle-setting.js +8 -15
- package/es/stat-editor/stat-settings/public-setting/type-settings/index.js +18 -26
- package/es/stat-list/chart-preview.js +20 -28
- package/es/stat-list/index.js +27 -35
- package/es/stat-view/area-chart.js +43 -50
- package/es/stat-view/bar-chart.js +47 -54
- package/es/stat-view/base-chart.js +24 -32
- package/es/stat-view/basic-number-card.js +19 -26
- package/es/stat-view/combination-chart.js +49 -56
- package/es/stat-view/compare-chart.js +39 -46
- package/es/stat-view/completeness-chart.js +28 -35
- package/es/stat-view/custom-bar.js +31 -38
- package/es/stat-view/dashboard-chart.js +15 -22
- package/es/stat-view/heat-map.js +43 -50
- package/es/stat-view/horizontal-bar-chart.js +51 -58
- package/es/stat-view/index.js +73 -80
- package/es/stat-view/line-chart.js +39 -46
- package/es/stat-view/map.js +33 -40
- package/es/stat-view/mirror.js +21 -28
- package/es/stat-view/pie-chart.js +29 -36
- package/es/stat-view/pivot-table/index.js +32 -39
- package/es/stat-view/pivot-table/one-dimension-table-no-numeric-columns.js +31 -39
- package/es/stat-view/pivot-table/one-dimension-table-with-numeric-columns.js +29 -37
- package/es/stat-view/pivot-table/pivot-table-display-name.js +46 -54
- package/es/stat-view/pivot-table/two-dimension-table.js +62 -70
- package/es/stat-view/ring-chart.js +38 -45
- package/es/stat-view/scatter-chart.js +30 -37
- package/es/stat-view/treemap-chart.js +37 -44
- package/es/stat-view/trend-chart.js +32 -39
- package/es/stat-view/world-map.js +33 -40
- package/es/tabs/index.js +32 -40
- package/es/tabs/tab.js +26 -34
- package/es/utils/basic-chart-utils.js +2 -9
- package/es/utils/cell-format.js +14 -22
- package/es/utils/cell-value.js +7 -14
- package/es/utils/collaborator.js +4 -13
- package/es/utils/color-utils.js +18 -29
- package/es/utils/column-utils.js +18 -29
- package/es/utils/column.js +4 -11
- package/es/utils/common-utils.js +41 -65
- package/es/utils/date-format.js +2 -8
- package/es/utils/export-table-utils.js +82 -91
- package/es/utils/index.js +11 -100
- package/es/utils/map.js +26 -36
- package/es/utils/model.js +6 -14
- package/es/utils/object.js +6 -15
- package/es/utils/pivot-table.js +16 -23
- package/es/utils/row-utils.js +23 -33
- package/es/utils/search.js +21 -29
- package/es/utils/sql-utils.js +65 -75
- package/es/utils/stat-utils.js +60 -66
- package/es/utils/trend-utils.js +32 -40
- package/package.json +1 -1
package/es/custom-g2.js
CHANGED
|
@@ -1,244 +1,214 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
var _exportNames = {
|
|
9
|
-
Util: true,
|
|
10
|
-
getRectWithCornerRadius: true
|
|
11
|
-
};
|
|
12
|
-
exports.Util = void 0;
|
|
13
|
-
Object.defineProperty(exports, "getRectWithCornerRadius", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
return _util.getRectWithCornerRadius;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
var CanvasEngine = _interopRequireWildcard(require("@antv/g-canvas/esm/index"));
|
|
20
|
-
var _area = _interopRequireDefault(require("@antv/g2/esm/geometry/area"));
|
|
21
|
-
var _edge = _interopRequireDefault(require("@antv/g2/esm/geometry/edge"));
|
|
22
|
-
var _heatmap = _interopRequireDefault(require("@antv/g2/esm/geometry/heatmap"));
|
|
23
|
-
var _interval = _interopRequireDefault(require("@antv/g2/esm/geometry/interval"));
|
|
24
|
-
var _line = _interopRequireDefault(require("@antv/g2/esm/geometry/line"));
|
|
25
|
-
var _path = _interopRequireDefault(require("@antv/g2/esm/geometry/path"));
|
|
26
|
-
var _point = _interopRequireDefault(require("@antv/g2/esm/geometry/point"));
|
|
27
|
-
var _polygon = _interopRequireDefault(require("@antv/g2/esm/geometry/polygon"));
|
|
28
|
-
var _schema = _interopRequireDefault(require("@antv/g2/esm/geometry/schema"));
|
|
29
|
-
require("@antv/g2/esm/geometry/shape/area/line");
|
|
30
|
-
require("@antv/g2/esm/geometry/shape/area/smooth");
|
|
31
|
-
require("@antv/g2/esm/geometry/shape/area/smooth-line");
|
|
32
|
-
require("@antv/g2/esm/geometry/shape/edge/arc");
|
|
33
|
-
require("@antv/g2/esm/geometry/shape/edge/smooth");
|
|
34
|
-
require("@antv/g2/esm/geometry/shape/edge/vhv");
|
|
35
|
-
require("@antv/g2/esm/geometry/shape/interval/funnel");
|
|
36
|
-
require("@antv/g2/esm/geometry/shape/interval/hollow-rect");
|
|
37
|
-
require("@antv/g2/esm/geometry/shape/interval/line");
|
|
38
|
-
require("@antv/g2/esm/geometry/shape/interval/pyramid");
|
|
39
|
-
require("@antv/g2/esm/geometry/shape/interval/tick");
|
|
40
|
-
require("@antv/g2/esm/geometry/shape/line/step");
|
|
41
|
-
require("@antv/g2/esm/geometry/shape/point/hollow");
|
|
42
|
-
require("@antv/g2/esm/geometry/shape/point/image");
|
|
43
|
-
require("@antv/g2/esm/geometry/shape/point/solid");
|
|
44
|
-
require("@antv/g2/esm/geometry/shape/schema/box");
|
|
45
|
-
require("@antv/g2/esm/geometry/shape/schema/candle");
|
|
46
|
-
var _base = _interopRequireDefault(require("@antv/g2/esm/geometry/label/base"));
|
|
47
|
-
var _interval2 = _interopRequireDefault(require("@antv/g2/esm/geometry/label/interval"));
|
|
48
|
-
var _pie = _interopRequireDefault(require("@antv/g2/esm/geometry/label/pie"));
|
|
49
|
-
var _polar = _interopRequireDefault(require("@antv/g2/esm/geometry/label/polar"));
|
|
50
|
-
var _limitInCanvas = require("@antv/g2/esm/geometry/label/layout/limit-in-canvas");
|
|
51
|
-
var _limitInShape = require("@antv/g2/esm/geometry/label/layout/limit-in-shape");
|
|
52
|
-
var _overlap = require("@antv/g2/esm/geometry/label/layout/overlap");
|
|
53
|
-
var _fade = require("@antv/g2/esm/animate/animation/fade");
|
|
54
|
-
var _growIn = require("@antv/g2/esm/animate/animation/grow-in");
|
|
55
|
-
var _pathIn = require("@antv/g2/esm/animate/animation/path-in");
|
|
56
|
-
var _positionUpdate = require("@antv/g2/esm/animate/animation/position-update");
|
|
57
|
-
var _scaleIn = require("@antv/g2/esm/animate/animation/scale-in");
|
|
58
|
-
var _sectorPathUpdate = require("@antv/g2/esm/animate/animation/sector-path-update");
|
|
59
|
-
var _waveIn = require("@antv/g2/esm/animate/animation/wave-in");
|
|
60
|
-
var _zoom = require("@antv/g2/esm/animate/animation/zoom");
|
|
61
|
-
var _core = require("@antv/g2/esm/core");
|
|
62
|
-
Object.keys(_core).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
65
|
-
if (key in exports && exports[key] === _core[key]) return;
|
|
66
|
-
Object.defineProperty(exports, key, {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
-
return _core[key];
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
var _circle = _interopRequireDefault(require("@antv/g2/esm/facet/circle"));
|
|
74
|
-
var _list = _interopRequireDefault(require("@antv/g2/esm/facet/list"));
|
|
75
|
-
var _matrix = _interopRequireDefault(require("@antv/g2/esm/facet/matrix"));
|
|
76
|
-
var _mirror = _interopRequireDefault(require("@antv/g2/esm/facet/mirror"));
|
|
77
|
-
var _rect = _interopRequireDefault(require("@antv/g2/esm/facet/rect"));
|
|
78
|
-
var _tree = _interopRequireDefault(require("@antv/g2/esm/facet/tree"));
|
|
79
|
-
var _annotation = _interopRequireDefault(require("@antv/g2/esm/chart/controller/annotation"));
|
|
80
|
-
var _axis = _interopRequireDefault(require("@antv/g2/esm/chart/controller/axis"));
|
|
81
|
-
var _legend = _interopRequireDefault(require("@antv/g2/esm/chart/controller/legend"));
|
|
82
|
-
var _slider = _interopRequireDefault(require("@antv/g2/esm/chart/controller/slider"));
|
|
83
|
-
var _tooltip = _interopRequireDefault(require("@antv/g2/esm/chart/controller/tooltip"));
|
|
84
|
-
var _activeRegion = _interopRequireDefault(require("@antv/g2/esm/interaction/action/active-region"));
|
|
85
|
-
var _sibling = _interopRequireDefault(require("@antv/g2/esm/interaction/action/component/tooltip/sibling"));
|
|
86
|
-
var _geometry = _interopRequireDefault(require("@antv/g2/esm/interaction/action/component/tooltip/geometry"));
|
|
87
|
-
var _active = _interopRequireDefault(require("@antv/g2/esm/interaction/action/element/active"));
|
|
88
|
-
var _linkByColor = _interopRequireDefault(require("@antv/g2/esm/interaction/action/element/link-by-color"));
|
|
89
|
-
var _rangeActive = _interopRequireDefault(require("@antv/g2/esm/interaction/action/element/range-active"));
|
|
90
|
-
var _singleActive = _interopRequireDefault(require("@antv/g2/esm/interaction/action/element/single-active"));
|
|
91
|
-
var _highlight = _interopRequireDefault(require("@antv/g2/esm/interaction/action/element/highlight"));
|
|
92
|
-
var _highlightByColor = _interopRequireDefault(require("@antv/g2/esm/interaction/action/element/highlight-by-color"));
|
|
93
|
-
var _highlightByX = _interopRequireDefault(require("@antv/g2/esm/interaction/action/element/highlight-by-x"));
|
|
94
|
-
var _rangeHighlight = _interopRequireDefault(require("@antv/g2/esm/interaction/action/element/range-highlight"));
|
|
95
|
-
var _singleHighlight = _interopRequireDefault(require("@antv/g2/esm/interaction/action/element/single-highlight"));
|
|
96
|
-
var _rangeSelected = _interopRequireDefault(require("@antv/g2/esm/interaction/action/element/range-selected"));
|
|
97
|
-
var _selected = _interopRequireDefault(require("@antv/g2/esm/interaction/action/element/selected"));
|
|
98
|
-
var _singleSelected = _interopRequireDefault(require("@antv/g2/esm/interaction/action/element/single-selected"));
|
|
99
|
-
var _listActive = _interopRequireDefault(require("@antv/g2/esm/interaction/action/component/list-active"));
|
|
100
|
-
var _listHighlight = _interopRequireDefault(require("@antv/g2/esm/interaction/action/component/list-highlight"));
|
|
101
|
-
var _listSelected = _interopRequireDefault(require("@antv/g2/esm/interaction/action/component/list-selected"));
|
|
102
|
-
var _listUnchecked = _interopRequireDefault(require("@antv/g2/esm/interaction/action/component/list-unchecked"));
|
|
103
|
-
var _circle2 = _interopRequireDefault(require("@antv/g2/esm/interaction/action/mask/circle"));
|
|
104
|
-
var _dimRect = _interopRequireDefault(require("@antv/g2/esm/interaction/action/mask/dim-rect"));
|
|
105
|
-
var _path2 = _interopRequireDefault(require("@antv/g2/esm/interaction/action/mask/path"));
|
|
106
|
-
var _rect2 = _interopRequireDefault(require("@antv/g2/esm/interaction/action/mask/rect"));
|
|
107
|
-
var _smoothPath = _interopRequireDefault(require("@antv/g2/esm/interaction/action/mask/smooth-path"));
|
|
108
|
-
var _cursor = _interopRequireDefault(require("@antv/g2/esm/interaction/action/cursor"));
|
|
109
|
-
var _filter = _interopRequireDefault(require("@antv/g2/esm/interaction/action/data/filter"));
|
|
110
|
-
var _rangeFilter = _interopRequireDefault(require("@antv/g2/esm/interaction/action/data/range-filter"));
|
|
111
|
-
var _siblingFilter = _interopRequireDefault(require("@antv/g2/esm/interaction/action/data/sibling-filter"));
|
|
112
|
-
var _filter2 = _interopRequireDefault(require("@antv/g2/esm/interaction/action/element/filter"));
|
|
113
|
-
var _siblingFilter2 = _interopRequireDefault(require("@antv/g2/esm/interaction/action/element/sibling-filter"));
|
|
114
|
-
var _button = _interopRequireDefault(require("@antv/g2/esm/interaction/action/view/button"));
|
|
115
|
-
var _drag = _interopRequireDefault(require("@antv/g2/esm/interaction/action/view/drag"));
|
|
116
|
-
var _move = _interopRequireDefault(require("@antv/g2/esm/interaction/action/view/move"));
|
|
117
|
-
var _scaleTranslate = _interopRequireDefault(require("@antv/g2/esm/interaction/action/view/scale-translate"));
|
|
118
|
-
var _scaleZoom = _interopRequireDefault(require("@antv/g2/esm/interaction/action/view/scale-zoom"));
|
|
119
|
-
var _graphics = require("@antv/g2/esm/util/graphics");
|
|
120
|
-
var _transform = require("@antv/g2/esm/util/transform");
|
|
121
|
-
var _util = require("@antv/g2/esm/geometry/shape/interval/util");
|
|
122
1
|
// register theme
|
|
123
|
-
|
|
2
|
+
import * as CanvasEngine from '@antv/g-canvas/esm/index';
|
|
124
3
|
// import * as SvgEngine from '@antv/g-svg/esm/index';
|
|
4
|
+
import Area from '@antv/g2/esm/geometry/area';
|
|
5
|
+
import Edge from '@antv/g2/esm/geometry/edge';
|
|
6
|
+
import HeatMap from '@antv/g2/esm/geometry/heatmap';
|
|
7
|
+
import Interval from '@antv/g2/esm/geometry/interval';
|
|
8
|
+
import Line from '@antv/g2/esm/geometry/line';
|
|
9
|
+
import Path from '@antv/g2/esm/geometry/path';
|
|
10
|
+
import Point from '@antv/g2/esm/geometry/point';
|
|
11
|
+
import Polygon from '@antv/g2/esm/geometry/polygon';
|
|
12
|
+
import Schema from '@antv/g2/esm/geometry/schema';
|
|
125
13
|
|
|
126
14
|
// import all internal shapes
|
|
15
|
+
import '@antv/g2/esm/geometry/shape/area/line';
|
|
16
|
+
import '@antv/g2/esm/geometry/shape/area/smooth';
|
|
17
|
+
import '@antv/g2/esm/geometry/shape/area/smooth-line';
|
|
18
|
+
import '@antv/g2/esm/geometry/shape/edge/arc';
|
|
19
|
+
import '@antv/g2/esm/geometry/shape/edge/smooth';
|
|
20
|
+
import '@antv/g2/esm/geometry/shape/edge/vhv';
|
|
21
|
+
import '@antv/g2/esm/geometry/shape/interval/funnel';
|
|
22
|
+
import '@antv/g2/esm/geometry/shape/interval/hollow-rect';
|
|
23
|
+
import '@antv/g2/esm/geometry/shape/interval/line';
|
|
24
|
+
import '@antv/g2/esm/geometry/shape/interval/pyramid';
|
|
25
|
+
import '@antv/g2/esm/geometry/shape/interval/tick';
|
|
26
|
+
import '@antv/g2/esm/geometry/shape/line/step';
|
|
27
|
+
import '@antv/g2/esm/geometry/shape/point/hollow';
|
|
28
|
+
import '@antv/g2/esm/geometry/shape/point/image';
|
|
29
|
+
import '@antv/g2/esm/geometry/shape/point/solid';
|
|
30
|
+
import '@antv/g2/esm/geometry/shape/schema/box';
|
|
31
|
+
import '@antv/g2/esm/geometry/shape/schema/candle';
|
|
32
|
+
import GeometryLabel from '@antv/g2/esm/geometry/label/base';
|
|
33
|
+
import IntervalLabel from '@antv/g2/esm/geometry/label/interval';
|
|
34
|
+
import PieLabel from '@antv/g2/esm/geometry/label/pie';
|
|
35
|
+
import PolarLabel from '@antv/g2/esm/geometry/label/polar';
|
|
36
|
+
import { limitInCanvas } from '@antv/g2/esm/geometry/label/layout/limit-in-canvas';
|
|
37
|
+
import { limitInShape } from '@antv/g2/esm/geometry/label/layout/limit-in-shape';
|
|
38
|
+
import { fixedOverlap, overlap } from '@antv/g2/esm/geometry/label/layout/overlap';
|
|
39
|
+
import { fadeIn, fadeOut } from '@antv/g2/esm/animate/animation/fade';
|
|
40
|
+
import { growInX, growInXY, growInY } from '@antv/g2/esm/animate/animation/grow-in';
|
|
41
|
+
import { pathIn } from '@antv/g2/esm/animate/animation/path-in';
|
|
42
|
+
import { positionUpdate } from '@antv/g2/esm/animate/animation/position-update';
|
|
43
|
+
import { scaleInX, scaleInY } from '@antv/g2/esm/animate/animation/scale-in';
|
|
44
|
+
import { sectorPathUpdate } from '@antv/g2/esm/animate/animation/sector-path-update';
|
|
45
|
+
import { waveIn } from '@antv/g2/esm/animate/animation/wave-in';
|
|
46
|
+
import { zoomIn, zoomOut } from '@antv/g2/esm/animate/animation/zoom';
|
|
47
|
+
import { registerEngine, registerGeometry, registerAnimation, registerFacet, registerComponentController, registerAction, registerInteraction, registerGeometryLabelLayout, registerGeometryLabel } from '@antv/g2/esm/core';
|
|
48
|
+
import Circle from '@antv/g2/esm/facet/circle';
|
|
49
|
+
import List from '@antv/g2/esm/facet/list';
|
|
50
|
+
import Matrix from '@antv/g2/esm/facet/matrix';
|
|
51
|
+
import Mirror from '@antv/g2/esm/facet/mirror';
|
|
52
|
+
import Rect from '@antv/g2/esm/facet/rect';
|
|
53
|
+
import Tree from '@antv/g2/esm/facet/tree';
|
|
54
|
+
import Annotation from '@antv/g2/esm/chart/controller/annotation';
|
|
55
|
+
import Axis from '@antv/g2/esm/chart/controller/axis';
|
|
56
|
+
import Legend from '@antv/g2/esm/chart/controller/legend';
|
|
57
|
+
import Slider from '@antv/g2/esm/chart/controller/slider';
|
|
58
|
+
import Tooltip from '@antv/g2/esm/chart/controller/tooltip';
|
|
59
|
+
import ActiveRegion from '@antv/g2/esm/interaction/action/active-region';
|
|
60
|
+
import SiblingTooltip from '@antv/g2/esm/interaction/action/component/tooltip/sibling';
|
|
61
|
+
import TooltipAction from '@antv/g2/esm/interaction/action/component/tooltip/geometry';
|
|
62
|
+
import ElementActive from '@antv/g2/esm/interaction/action/element/active';
|
|
63
|
+
import ElementLinkByColor from '@antv/g2/esm/interaction/action/element/link-by-color';
|
|
64
|
+
import ElementRangeActive from '@antv/g2/esm/interaction/action/element/range-active';
|
|
65
|
+
import ElementSingleActive from '@antv/g2/esm/interaction/action/element/single-active';
|
|
66
|
+
import ElementHighlight from '@antv/g2/esm/interaction/action/element/highlight';
|
|
67
|
+
import ElementHighlightByColor from '@antv/g2/esm/interaction/action/element/highlight-by-color';
|
|
68
|
+
import ElementHighlightByX from '@antv/g2/esm/interaction/action/element/highlight-by-x';
|
|
69
|
+
import ElementRangeHighlight from '@antv/g2/esm/interaction/action/element/range-highlight';
|
|
70
|
+
import ElementSingleHighlight from '@antv/g2/esm/interaction/action/element/single-highlight';
|
|
71
|
+
import ElementRangeSelected from '@antv/g2/esm/interaction/action/element/range-selected';
|
|
72
|
+
import ElementSelected from '@antv/g2/esm/interaction/action/element/selected';
|
|
73
|
+
import ElementSingleSelected from '@antv/g2/esm/interaction/action/element/single-selected';
|
|
74
|
+
import ListActive from '@antv/g2/esm/interaction/action/component/list-active';
|
|
75
|
+
import ListHighlight from '@antv/g2/esm/interaction/action/component/list-highlight';
|
|
76
|
+
import ListSelected from '@antv/g2/esm/interaction/action/component/list-selected';
|
|
77
|
+
import ListUnchecked from '@antv/g2/esm/interaction/action/component/list-unchecked';
|
|
78
|
+
import CircleMask from '@antv/g2/esm/interaction/action/mask/circle';
|
|
79
|
+
import DimMask from '@antv/g2/esm/interaction/action/mask/dim-rect';
|
|
80
|
+
import PathMask from '@antv/g2/esm/interaction/action/mask/path';
|
|
81
|
+
import RectMask from '@antv/g2/esm/interaction/action/mask/rect';
|
|
82
|
+
import SmoothPathMask from '@antv/g2/esm/interaction/action/mask/smooth-path';
|
|
83
|
+
import CursorAction from '@antv/g2/esm/interaction/action/cursor';
|
|
84
|
+
import DataFilter from '@antv/g2/esm/interaction/action/data/filter';
|
|
85
|
+
import DataRangeFilter from '@antv/g2/esm/interaction/action/data/range-filter';
|
|
86
|
+
import SiblingFilter from '@antv/g2/esm/interaction/action/data/sibling-filter';
|
|
87
|
+
import ElementFilter from '@antv/g2/esm/interaction/action/element/filter';
|
|
88
|
+
import ElementSiblingFilter from '@antv/g2/esm/interaction/action/element/sibling-filter';
|
|
89
|
+
import ButtonAction from '@antv/g2/esm/interaction/action/view/button';
|
|
90
|
+
import ViewDrag from '@antv/g2/esm/interaction/action/view/drag';
|
|
91
|
+
import ViewMove from '@antv/g2/esm/interaction/action/view/move';
|
|
92
|
+
import ScaleTranslate from '@antv/g2/esm/interaction/action/view/scale-translate';
|
|
93
|
+
import ScaleZoom from '@antv/g2/esm/interaction/action/view/scale-zoom';
|
|
94
|
+
import { getAngle, polarToCartesian } from '@antv/g2/esm/util/graphics';
|
|
95
|
+
import { rotate, transform, translate, zoom } from '@antv/g2/esm/util/transform';
|
|
96
|
+
export { getRectWithCornerRadius } from '@antv/g2/esm/geometry/shape/interval/util';
|
|
127
97
|
|
|
128
98
|
// register G renderer
|
|
129
|
-
|
|
99
|
+
registerEngine('canvas', CanvasEngine);
|
|
130
100
|
// registerEngine('svg', SvgEngine);
|
|
131
101
|
|
|
132
102
|
// register internal G2 geometry
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
103
|
+
registerGeometry('Polygon', Polygon);
|
|
104
|
+
registerGeometry('Interval', Interval);
|
|
105
|
+
registerGeometry('Schema', Schema);
|
|
106
|
+
registerGeometry('Path', Path);
|
|
107
|
+
registerGeometry('Point', Point);
|
|
108
|
+
registerGeometry('Line', Line);
|
|
109
|
+
registerGeometry('Area', Area);
|
|
110
|
+
registerGeometry('Edge', Edge);
|
|
111
|
+
registerGeometry('Heatmap', HeatMap);
|
|
142
112
|
|
|
143
113
|
// register internal Geometry'label
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
114
|
+
registerGeometryLabel('base', GeometryLabel);
|
|
115
|
+
registerGeometryLabel('interval', IntervalLabel);
|
|
116
|
+
registerGeometryLabel('pie', PieLabel);
|
|
117
|
+
registerGeometryLabel('polar', PolarLabel);
|
|
148
118
|
|
|
149
119
|
// register internal Geometry-label's layout funcs
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
120
|
+
registerGeometryLabelLayout('overlap', overlap);
|
|
121
|
+
registerGeometryLabelLayout('fixed-overlap', fixedOverlap);
|
|
122
|
+
registerGeometryLabelLayout('limit-in-shape', limitInShape);
|
|
123
|
+
registerGeometryLabelLayout('limit-in-canvas', limitInCanvas);
|
|
154
124
|
|
|
155
125
|
// register animation funcs
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
126
|
+
registerAnimation('fade-in', fadeIn);
|
|
127
|
+
registerAnimation('fade-out', fadeOut);
|
|
128
|
+
registerAnimation('grow-in-x', growInX);
|
|
129
|
+
registerAnimation('grow-in-xy', growInXY);
|
|
130
|
+
registerAnimation('grow-in-y', growInY);
|
|
131
|
+
registerAnimation('scale-in-x', scaleInX);
|
|
132
|
+
registerAnimation('scale-in-y', scaleInY);
|
|
133
|
+
registerAnimation('wave-in', waveIn);
|
|
134
|
+
registerAnimation('zoom-in', zoomIn);
|
|
135
|
+
registerAnimation('zoom-out', zoomOut);
|
|
136
|
+
registerAnimation('position-update', positionUpdate);
|
|
137
|
+
registerAnimation('sector-path-update', sectorPathUpdate);
|
|
138
|
+
registerAnimation('path-in', pathIn);
|
|
169
139
|
|
|
170
140
|
// register internal Facet
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
141
|
+
registerFacet('rect', Rect);
|
|
142
|
+
registerFacet('mirror', Mirror);
|
|
143
|
+
registerFacet('list', List);
|
|
144
|
+
registerFacet('matrix', Matrix);
|
|
145
|
+
registerFacet('circle', Circle);
|
|
146
|
+
registerFacet('tree', Tree);
|
|
177
147
|
|
|
178
148
|
// register internal Component
|
|
179
149
|
// register build-in components
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
150
|
+
registerComponentController('axis', Axis);
|
|
151
|
+
registerComponentController('legend', Legend);
|
|
152
|
+
registerComponentController('tooltip', Tooltip);
|
|
153
|
+
registerComponentController('annotation', Annotation);
|
|
154
|
+
registerComponentController('slider', Slider);
|
|
185
155
|
|
|
186
156
|
// register Interaction Action
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
157
|
+
registerAction('tooltip', TooltipAction);
|
|
158
|
+
registerAction('sibling-tooltip', SiblingTooltip);
|
|
159
|
+
registerAction('element-active', ElementActive);
|
|
160
|
+
registerAction('element-single-active', ElementSingleActive);
|
|
161
|
+
registerAction('element-range-active', ElementRangeActive);
|
|
162
|
+
registerAction('element-highlight', ElementHighlight);
|
|
163
|
+
registerAction('element-highlight-by-x', ElementHighlightByX);
|
|
164
|
+
registerAction('element-highlight-by-color', ElementHighlightByColor);
|
|
165
|
+
registerAction('element-single-highlight', ElementSingleHighlight);
|
|
166
|
+
registerAction('element-range-highlight', ElementRangeHighlight);
|
|
167
|
+
registerAction('element-sibling-highlight', ElementRangeHighlight, {
|
|
198
168
|
effectSiblings: true,
|
|
199
169
|
effectByRecord: true
|
|
200
170
|
});
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
171
|
+
registerAction('element-selected', ElementSelected);
|
|
172
|
+
registerAction('element-single-selected', ElementSingleSelected);
|
|
173
|
+
registerAction('element-range-selected', ElementRangeSelected);
|
|
174
|
+
registerAction('element-link-by-color', ElementLinkByColor);
|
|
175
|
+
registerAction('active-region', ActiveRegion);
|
|
176
|
+
registerAction('list-active', ListActive);
|
|
177
|
+
registerAction('list-selected', ListSelected);
|
|
178
|
+
registerAction('list-highlight', ListHighlight);
|
|
179
|
+
registerAction('list-unchecked', ListUnchecked);
|
|
180
|
+
registerAction('rect-mask', RectMask);
|
|
181
|
+
registerAction('x-rect-mask', DimMask, {
|
|
212
182
|
dim: 'x'
|
|
213
183
|
});
|
|
214
|
-
|
|
184
|
+
registerAction('y-rect-mask', DimMask, {
|
|
215
185
|
dim: 'y'
|
|
216
186
|
});
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
187
|
+
registerAction('circle-mask', CircleMask);
|
|
188
|
+
registerAction('path-mask', PathMask);
|
|
189
|
+
registerAction('smooth-path-mask', SmoothPathMask);
|
|
190
|
+
registerAction('cursor', CursorAction);
|
|
191
|
+
registerAction('data-filter', DataFilter);
|
|
192
|
+
registerAction('brush', DataRangeFilter);
|
|
193
|
+
registerAction('brush-x', DataRangeFilter, {
|
|
224
194
|
dims: ['x']
|
|
225
195
|
});
|
|
226
|
-
|
|
196
|
+
registerAction('brush-y', DataRangeFilter, {
|
|
227
197
|
dims: ['y']
|
|
228
198
|
});
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
199
|
+
registerAction('sibling-filter', SiblingFilter);
|
|
200
|
+
registerAction('sibling-x-filter', SiblingFilter);
|
|
201
|
+
registerAction('sibling-y-filter', SiblingFilter);
|
|
202
|
+
registerAction('element-filter', ElementFilter);
|
|
203
|
+
registerAction('element-sibling-filter', ElementSiblingFilter);
|
|
204
|
+
registerAction('element-sibling-filter-record', ElementSiblingFilter, {
|
|
235
205
|
byRecord: true
|
|
236
206
|
});
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
207
|
+
registerAction('view-drag', ViewDrag);
|
|
208
|
+
registerAction('view-move', ViewMove);
|
|
209
|
+
registerAction('scale-translate', ScaleTranslate);
|
|
210
|
+
registerAction('scale-zoom', ScaleZoom);
|
|
211
|
+
registerAction('reset-button', ButtonAction, {
|
|
242
212
|
name: 'reset-button',
|
|
243
213
|
text: 'reset'
|
|
244
214
|
});
|
|
@@ -249,7 +219,7 @@ function isPointInView(context) {
|
|
|
249
219
|
}
|
|
250
220
|
|
|
251
221
|
// register tooltip's interaction
|
|
252
|
-
|
|
222
|
+
registerInteraction('tooltip', {
|
|
253
223
|
start: [{
|
|
254
224
|
trigger: 'plot:mousemove',
|
|
255
225
|
action: 'tooltip:show'
|
|
@@ -261,7 +231,7 @@ function isPointInView(context) {
|
|
|
261
231
|
});
|
|
262
232
|
|
|
263
233
|
// activities of element while moved on
|
|
264
|
-
|
|
234
|
+
registerInteraction('element-active', {
|
|
265
235
|
start: [{
|
|
266
236
|
trigger: 'element:mouseenter',
|
|
267
237
|
action: 'element-active:active'
|
|
@@ -273,7 +243,7 @@ function isPointInView(context) {
|
|
|
273
243
|
});
|
|
274
244
|
|
|
275
245
|
// allow unchecked via click
|
|
276
|
-
|
|
246
|
+
registerInteraction('element-selected', {
|
|
277
247
|
start: [{
|
|
278
248
|
trigger: 'element:click',
|
|
279
249
|
action: 'element-selected:toggle'
|
|
@@ -281,7 +251,7 @@ function isPointInView(context) {
|
|
|
281
251
|
});
|
|
282
252
|
|
|
283
253
|
// allow cancel via hover highlight
|
|
284
|
-
|
|
254
|
+
registerInteraction('element-highlight', {
|
|
285
255
|
start: [{
|
|
286
256
|
trigger: 'element:mouseenter',
|
|
287
257
|
action: 'element-highlight:highlight'
|
|
@@ -293,7 +263,7 @@ function isPointInView(context) {
|
|
|
293
263
|
});
|
|
294
264
|
|
|
295
265
|
// allow cancel via hover highlight by x
|
|
296
|
-
|
|
266
|
+
registerInteraction('element-highlight-by-x', {
|
|
297
267
|
start: [{
|
|
298
268
|
trigger: 'element:mouseenter',
|
|
299
269
|
action: 'element-highlight-by-x:highlight'
|
|
@@ -305,7 +275,7 @@ function isPointInView(context) {
|
|
|
305
275
|
});
|
|
306
276
|
|
|
307
277
|
// allow cancel via hover highlight by y
|
|
308
|
-
|
|
278
|
+
registerInteraction('element-highlight-by-color', {
|
|
309
279
|
start: [{
|
|
310
280
|
trigger: 'element:mouseenter',
|
|
311
281
|
action: 'element-highlight-by-color:highlight'
|
|
@@ -317,7 +287,7 @@ function isPointInView(context) {
|
|
|
317
287
|
});
|
|
318
288
|
|
|
319
289
|
// legend hover,element active
|
|
320
|
-
|
|
290
|
+
registerInteraction('legend-active', {
|
|
321
291
|
start: [{
|
|
322
292
|
trigger: 'legend-item:mouseenter',
|
|
323
293
|
action: ['list-active:active', 'element-active:active']
|
|
@@ -329,7 +299,7 @@ function isPointInView(context) {
|
|
|
329
299
|
});
|
|
330
300
|
|
|
331
301
|
// legend hover,element active
|
|
332
|
-
|
|
302
|
+
registerInteraction('legend-highlight', {
|
|
333
303
|
start: [{
|
|
334
304
|
trigger: 'legend-item:mouseenter',
|
|
335
305
|
action: ['list-highlight:highlight', 'element-highlight:highlight']
|
|
@@ -341,7 +311,7 @@ function isPointInView(context) {
|
|
|
341
311
|
});
|
|
342
312
|
|
|
343
313
|
// legend hover,element active
|
|
344
|
-
|
|
314
|
+
registerInteraction('axis-label-highlight', {
|
|
345
315
|
start: [{
|
|
346
316
|
trigger: 'axis-label:mouseenter',
|
|
347
317
|
action: ['list-highlight:highlight', 'element-highlight:highlight']
|
|
@@ -353,7 +323,7 @@ function isPointInView(context) {
|
|
|
353
323
|
});
|
|
354
324
|
|
|
355
325
|
// legend hover,element active
|
|
356
|
-
|
|
326
|
+
registerInteraction('element-list-highlight', {
|
|
357
327
|
start: [{
|
|
358
328
|
trigger: 'element:mouseenter',
|
|
359
329
|
action: ['list-highlight:highlight', 'element-highlight:highlight']
|
|
@@ -365,7 +335,7 @@ function isPointInView(context) {
|
|
|
365
335
|
});
|
|
366
336
|
|
|
367
337
|
// box selection
|
|
368
|
-
|
|
338
|
+
registerInteraction('element-range-highlight', {
|
|
369
339
|
showEnable: [{
|
|
370
340
|
trigger: 'plot:mouseenter',
|
|
371
341
|
action: 'cursor:crosshair'
|
|
@@ -417,7 +387,7 @@ function isPointInView(context) {
|
|
|
417
387
|
action: ['element-range-highlight:clear', 'rect-mask:hide']
|
|
418
388
|
}]
|
|
419
389
|
});
|
|
420
|
-
|
|
390
|
+
registerInteraction('brush', {
|
|
421
391
|
showEnable: [{
|
|
422
392
|
trigger: 'plot:mouseenter',
|
|
423
393
|
action: 'cursor:crosshair'
|
|
@@ -445,7 +415,7 @@ function isPointInView(context) {
|
|
|
445
415
|
action: ['brush:reset', 'reset-button:hide', 'cursor:crosshair']
|
|
446
416
|
}]
|
|
447
417
|
});
|
|
448
|
-
|
|
418
|
+
registerInteraction('brush-visible', {
|
|
449
419
|
showEnable: [{
|
|
450
420
|
trigger: 'plot:mouseenter',
|
|
451
421
|
action: 'cursor:crosshair'
|
|
@@ -474,7 +444,7 @@ function isPointInView(context) {
|
|
|
474
444
|
action: ['element-filter:clear']
|
|
475
445
|
}]
|
|
476
446
|
});
|
|
477
|
-
|
|
447
|
+
registerInteraction('brush-x', {
|
|
478
448
|
showEnable: [{
|
|
479
449
|
trigger: 'plot:mouseenter',
|
|
480
450
|
action: 'cursor:crosshair'
|
|
@@ -502,7 +472,7 @@ function isPointInView(context) {
|
|
|
502
472
|
action: ['brush-x:reset']
|
|
503
473
|
}]
|
|
504
474
|
});
|
|
505
|
-
|
|
475
|
+
registerInteraction('element-path-highlight', {
|
|
506
476
|
showEnable: [{
|
|
507
477
|
trigger: 'plot:mouseenter',
|
|
508
478
|
action: 'cursor:crosshair'
|
|
@@ -534,7 +504,7 @@ function isPointInView(context) {
|
|
|
534
504
|
});
|
|
535
505
|
|
|
536
506
|
// allow unchecked via click
|
|
537
|
-
|
|
507
|
+
registerInteraction('element-single-selected', {
|
|
538
508
|
start: [{
|
|
539
509
|
trigger: 'element:click',
|
|
540
510
|
action: 'element-single-selected:toggle'
|
|
@@ -542,7 +512,7 @@ function isPointInView(context) {
|
|
|
542
512
|
});
|
|
543
513
|
|
|
544
514
|
// filter data
|
|
545
|
-
|
|
515
|
+
registerInteraction('legend-filter', {
|
|
546
516
|
showEnable: [{
|
|
547
517
|
trigger: 'legend-item:mouseenter',
|
|
548
518
|
action: 'cursor:pointer'
|
|
@@ -560,7 +530,7 @@ function isPointInView(context) {
|
|
|
560
530
|
});
|
|
561
531
|
|
|
562
532
|
// filter data
|
|
563
|
-
|
|
533
|
+
registerInteraction('continuous-filter', {
|
|
564
534
|
start: [{
|
|
565
535
|
trigger: 'legend:valuechanged',
|
|
566
536
|
action: 'data-filter:filter'
|
|
@@ -568,7 +538,7 @@ function isPointInView(context) {
|
|
|
568
538
|
});
|
|
569
539
|
|
|
570
540
|
// filter data
|
|
571
|
-
|
|
541
|
+
registerInteraction('continuous-visible-filter', {
|
|
572
542
|
start: [{
|
|
573
543
|
trigger: 'legend:valuechanged',
|
|
574
544
|
action: 'element-filter:filter'
|
|
@@ -576,7 +546,7 @@ function isPointInView(context) {
|
|
|
576
546
|
});
|
|
577
547
|
|
|
578
548
|
// filter graphical
|
|
579
|
-
|
|
549
|
+
registerInteraction('legend-visible-filter', {
|
|
580
550
|
showEnable: [{
|
|
581
551
|
trigger: 'legend-item:mouseenter',
|
|
582
552
|
action: 'cursor:pointer'
|
|
@@ -594,7 +564,7 @@ function isPointInView(context) {
|
|
|
594
564
|
});
|
|
595
565
|
|
|
596
566
|
// show background box
|
|
597
|
-
|
|
567
|
+
registerInteraction('active-region', {
|
|
598
568
|
start: [{
|
|
599
569
|
trigger: 'plot:mousemove',
|
|
600
570
|
action: 'active-region:show'
|
|
@@ -608,7 +578,7 @@ function isWheelDown(event) {
|
|
|
608
578
|
event.gEvent.preventDefault();
|
|
609
579
|
return event.gEvent.originalEvent.deltaY > 0;
|
|
610
580
|
}
|
|
611
|
-
|
|
581
|
+
registerInteraction('view-zoom', {
|
|
612
582
|
start: [{
|
|
613
583
|
trigger: 'plot:mousewheel',
|
|
614
584
|
isEnable: function (context) {
|
|
@@ -623,7 +593,7 @@ function isWheelDown(event) {
|
|
|
623
593
|
action: 'scale-zoom:zoomIn'
|
|
624
594
|
}]
|
|
625
595
|
});
|
|
626
|
-
|
|
596
|
+
registerInteraction('sibling-tooltip', {
|
|
627
597
|
start: [{
|
|
628
598
|
trigger: 'plot:mousemove',
|
|
629
599
|
action: 'sibling-tooltip:show'
|
|
@@ -633,12 +603,14 @@ function isWheelDown(event) {
|
|
|
633
603
|
action: 'sibling-tooltip:hide'
|
|
634
604
|
}]
|
|
635
605
|
});
|
|
606
|
+
export * from '@antv/g2/esm/core';
|
|
607
|
+
|
|
636
608
|
// common utils
|
|
637
|
-
const Util =
|
|
638
|
-
translate
|
|
639
|
-
rotate
|
|
640
|
-
zoom
|
|
641
|
-
transform
|
|
642
|
-
getAngle
|
|
643
|
-
polarToCartesian
|
|
609
|
+
export const Util = {
|
|
610
|
+
translate,
|
|
611
|
+
rotate,
|
|
612
|
+
zoom,
|
|
613
|
+
transform,
|
|
614
|
+
getAngle,
|
|
615
|
+
polarToCartesian
|
|
644
616
|
};
|