@visactor/vtable 0.13.0-alpha.4 → 0.13.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/cjs/ListTable.js +4 -3
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.d.ts +1 -0
- package/cjs/PivotChart.js +10 -7
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.js +6 -6
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/body-helper.d.ts +1 -1
- package/cjs/body-helper/body-helper.js +4 -1
- package/cjs/body-helper/body-helper.js.map +1 -1
- package/cjs/body-helper/style/CheckboxStyle.d.ts +7 -0
- package/cjs/body-helper/style/CheckboxStyle.js +24 -0
- package/cjs/body-helper/style/CheckboxStyle.js.map +1 -0
- package/cjs/components/axis/axis.d.ts +2 -2
- package/cjs/components/axis/axis.js +5 -4
- package/cjs/components/axis/axis.js.map +1 -1
- package/cjs/components/axis/linear-scale.d.ts +8 -5
- package/cjs/components/axis/linear-scale.js +19 -5
- package/cjs/components/axis/linear-scale.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuElementStyle.js +8 -3
- package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js +6 -5
- package/cjs/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js +8 -3
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +2 -0
- package/cjs/core/BaseTable.js +27 -11
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +1 -0
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/core/style.js +8 -3
- package/cjs/core/style.js.map +1 -1
- package/cjs/dataset/dataset.js +2 -2
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/event.js +5 -5
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +8 -0
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/listener/touch.js +2 -1
- package/cjs/event/listener/touch.js.map +1 -1
- package/cjs/event/scroll.js +1 -1
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.js +16 -16
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-domain.js +11 -8
- package/cjs/layout/chart-helper/get-axis-domain.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +2 -2
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +2 -2
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/render/layout/text.js +1 -1
- package/cjs/render/layout/text.js.map +1 -1
- package/cjs/scenegraph/component/menu.js +2 -0
- package/cjs/scenegraph/component/menu.js.map +1 -1
- package/cjs/scenegraph/context/canvas.js +2 -2
- package/cjs/scenegraph/context/canvas.js.map +1 -1
- package/cjs/scenegraph/context/context.js +2 -2
- package/cjs/scenegraph/context/context.js.map +1 -1
- package/cjs/scenegraph/context/module.d.ts +1 -1
- package/cjs/scenegraph/context/module.js +2 -2
- package/cjs/scenegraph/context/module.js.map +1 -1
- package/cjs/scenegraph/graphic/chart.d.ts +2 -0
- package/cjs/scenegraph/graphic/chart.js +8 -2
- package/cjs/scenegraph/graphic/chart.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +8 -42
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js +2 -0
- package/cjs/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.d.ts +5 -0
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js +74 -0
- package/cjs/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -0
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +3 -3
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +6 -4
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +3 -3
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/cjs/scenegraph/refresh-node/update-chart.js +6 -3
- package/cjs/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +7 -5
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/text-measure.js +4 -4
- package/cjs/scenegraph/utils/text-measure.js.map +1 -1
- package/cjs/themes/ARCO.js +0 -8
- package/cjs/themes/ARCO.js.map +1 -1
- package/cjs/themes/BRIGHT.js +0 -8
- package/cjs/themes/BRIGHT.js.map +1 -1
- package/cjs/themes/DARK.js +0 -8
- package/cjs/themes/DARK.js.map +1 -1
- package/cjs/themes/DEFAULT.js +0 -8
- package/cjs/themes/DEFAULT.js.map +1 -1
- package/cjs/themes/theme.js +6 -2
- package/cjs/themes/theme.js.map +1 -1
- package/cjs/tools/global.d.ts +1 -2
- package/cjs/tools/global.js +4 -4
- package/cjs/tools/global.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +6 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/column/style.d.ts +2 -1
- package/cjs/ts-types/column/style.js.map +1 -1
- package/cjs/ts-types/column/type.d.ts +1 -1
- package/cjs/ts-types/column/type.js.map +1 -1
- package/cjs/ts-types/events.d.ts +4 -0
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/list-table/define/checkbox-define.d.ts +9 -0
- package/cjs/ts-types/list-table/define/checkbox-define.js +6 -0
- package/cjs/ts-types/list-table/define/checkbox-define.js.map +1 -0
- package/cjs/ts-types/list-table/define/index.d.ts +4 -2
- package/cjs/ts-types/list-table/define/index.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/checkbox-indicator.d.ts +9 -0
- package/cjs/ts-types/pivot-table/indicator/checkbox-indicator.js +6 -0
- package/cjs/ts-types/pivot-table/indicator/checkbox-indicator.js.map +1 -0
- package/cjs/ts-types/pivot-table/indicator/index.d.ts +2 -1
- package/cjs/ts-types/pivot-table/indicator/index.js.map +1 -1
- package/cjs/ts-types/theme.d.ts +6 -3
- package/cjs/ts-types/theme.js.map +1 -1
- package/cjs/ts-types/tooltip.d.ts +2 -1
- package/cjs/ts-types/tooltip.js.map +1 -1
- package/dist/vtable.js +759 -235
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.js +5 -2
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.d.ts +1 -0
- package/es/PivotChart.js +11 -5
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.js +7 -4
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/body-helper.d.ts +1 -1
- package/es/body-helper/body-helper.js +5 -0
- package/es/body-helper/body-helper.js.map +1 -1
- package/es/body-helper/style/CheckboxStyle.d.ts +7 -0
- package/es/body-helper/style/CheckboxStyle.js +16 -0
- package/es/body-helper/style/CheckboxStyle.js.map +1 -0
- package/es/components/axis/axis.d.ts +2 -2
- package/es/components/axis/axis.js +5 -4
- package/es/components/axis/axis.js.map +1 -1
- package/es/components/axis/linear-scale.d.ts +8 -5
- package/es/components/axis/linear-scale.js +15 -6
- package/es/components/axis/linear-scale.js.map +1 -1
- package/es/components/menu/dom/logic/MenuElementStyle.js +3 -0
- package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElement.js +6 -5
- package/es/components/tooltip/logic/BubbleTooltipElement.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js +3 -0
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
- package/es/core/BaseTable.d.ts +2 -0
- package/es/core/BaseTable.js +27 -10
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +1 -0
- package/es/core/TABLE_EVENT_TYPE.js +1 -0
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/core/style.js +3 -0
- package/es/core/style.js.map +1 -1
- package/es/dataset/dataset.js +2 -2
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/event.js +6 -4
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +8 -0
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/listener/touch.js +1 -1
- package/es/event/listener/touch.js.map +1 -1
- package/es/event/scroll.js +1 -1
- package/es/event/scroll.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-axis-config.js +16 -16
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-axis-domain.js +12 -9
- package/es/layout/chart-helper/get-axis-domain.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +2 -2
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/pivot-header-layout.js +2 -2
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/render/layout/text.js +1 -1
- package/es/render/layout/text.js.map +1 -1
- package/es/scenegraph/component/menu.js +2 -0
- package/es/scenegraph/component/menu.js.map +1 -1
- package/es/scenegraph/context/canvas.js +1 -3
- package/es/scenegraph/context/canvas.js.map +1 -1
- package/es/scenegraph/context/context.js +0 -2
- package/es/scenegraph/context/context.js.map +1 -1
- package/es/scenegraph/context/module.d.ts +1 -1
- package/es/scenegraph/context/module.js +1 -3
- package/es/scenegraph/context/module.js.map +1 -1
- package/es/scenegraph/graphic/chart.d.ts +2 -0
- package/es/scenegraph/graphic/chart.js +8 -2
- package/es/scenegraph/graphic/chart.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +6 -42
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/chart-cell.js +2 -0
- package/es/scenegraph/group-creater/cell-type/chart-cell.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.d.ts +5 -0
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js +72 -0
- package/es/scenegraph/group-creater/cell-type/checkbox-cell.js.map +1 -0
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +3 -3
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +6 -4
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js +3 -3
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-y.js.map +1 -1
- package/es/scenegraph/refresh-node/update-chart.js +6 -3
- package/es/scenegraph/refresh-node/update-chart.js.map +1 -1
- package/es/scenegraph/scenegraph.js +8 -3
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/text-measure.js +4 -4
- package/es/scenegraph/utils/text-measure.js.map +1 -1
- package/es/themes/ARCO.js +0 -8
- package/es/themes/ARCO.js.map +1 -1
- package/es/themes/BRIGHT.js +0 -8
- package/es/themes/BRIGHT.js.map +1 -1
- package/es/themes/DARK.js +0 -8
- package/es/themes/DARK.js.map +1 -1
- package/es/themes/DEFAULT.js +0 -8
- package/es/themes/DEFAULT.js.map +1 -1
- package/es/themes/theme.js +7 -3
- package/es/themes/theme.js.map +1 -1
- package/es/tools/global.d.ts +1 -2
- package/es/tools/global.js +1 -3
- package/es/tools/global.js.map +1 -1
- package/es/ts-types/base-table.d.ts +6 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/column/style.d.ts +2 -1
- package/es/ts-types/column/style.js.map +1 -1
- package/es/ts-types/column/type.d.ts +1 -1
- package/es/ts-types/column/type.js.map +1 -1
- package/es/ts-types/events.d.ts +4 -0
- package/es/ts-types/events.js.map +1 -1
- package/es/ts-types/list-table/define/checkbox-define.d.ts +9 -0
- package/es/ts-types/list-table/define/checkbox-define.js +2 -0
- package/es/ts-types/list-table/define/checkbox-define.js.map +1 -0
- package/es/ts-types/list-table/define/index.d.ts +4 -2
- package/es/ts-types/list-table/define/index.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/checkbox-indicator.d.ts +9 -0
- package/es/ts-types/pivot-table/indicator/checkbox-indicator.js +2 -0
- package/es/ts-types/pivot-table/indicator/checkbox-indicator.js.map +1 -0
- package/es/ts-types/pivot-table/indicator/index.d.ts +2 -1
- package/es/ts-types/pivot-table/indicator/index.js.map +1 -1
- package/es/ts-types/theme.d.ts +6 -3
- package/es/ts-types/theme.js.map +1 -1
- package/es/ts-types/tooltip.d.ts +2 -1
- package/es/ts-types/tooltip.js.map +1 -1
- package/package.json +7 -4
package/dist/vtable.js
CHANGED
|
@@ -1979,7 +1979,7 @@
|
|
|
1979
1979
|
}
|
|
1980
1980
|
};
|
|
1981
1981
|
|
|
1982
|
-
let defaultStyle$
|
|
1982
|
+
let defaultStyle$7;
|
|
1983
1983
|
const STYLE_EVENT_TYPE = {
|
|
1984
1984
|
CHANGE_STYLE: 'change_style'
|
|
1985
1985
|
};
|
|
@@ -2014,7 +2014,7 @@
|
|
|
2014
2014
|
return STYLE_EVENT_TYPE;
|
|
2015
2015
|
}
|
|
2016
2016
|
static get DEFAULT() {
|
|
2017
|
-
return defaultStyle$
|
|
2017
|
+
return defaultStyle$7 ? defaultStyle$7 : (defaultStyle$7 = new Style());
|
|
2018
2018
|
}
|
|
2019
2019
|
constructor(style = {}, bodyStyle = {}) {
|
|
2020
2020
|
super();
|
|
@@ -2199,10 +2199,10 @@
|
|
|
2199
2199
|
}
|
|
2200
2200
|
};
|
|
2201
2201
|
|
|
2202
|
-
let defaultStyle$
|
|
2202
|
+
let defaultStyle$6;
|
|
2203
2203
|
let ImageStyle$1 = class ImageStyle extends Style$1 {
|
|
2204
2204
|
static get DEFAULT() {
|
|
2205
|
-
return defaultStyle$
|
|
2205
|
+
return defaultStyle$6 ? defaultStyle$6 : (defaultStyle$6 = new ImageStyle());
|
|
2206
2206
|
}
|
|
2207
2207
|
constructor(style = {}, bodyStyle = {}) {
|
|
2208
2208
|
super(style, bodyStyle);
|
|
@@ -2212,12 +2212,12 @@
|
|
|
2212
2212
|
}
|
|
2213
2213
|
};
|
|
2214
2214
|
|
|
2215
|
-
let defaultStyle$
|
|
2215
|
+
let defaultStyle$5;
|
|
2216
2216
|
class TextStyle extends Style$1 {
|
|
2217
2217
|
_autoWrapText;
|
|
2218
2218
|
_lineClamp;
|
|
2219
2219
|
static get DEFAULT() {
|
|
2220
|
-
return defaultStyle$
|
|
2220
|
+
return defaultStyle$5 ? defaultStyle$5 : (defaultStyle$5 = new TextStyle());
|
|
2221
2221
|
}
|
|
2222
2222
|
constructor(style = {}, bodyStyle = {}) {
|
|
2223
2223
|
super(style, bodyStyle);
|
|
@@ -2260,7 +2260,7 @@
|
|
|
2260
2260
|
return StyleClassDef.DEFAULT;
|
|
2261
2261
|
}
|
|
2262
2262
|
|
|
2263
|
-
let defaultStyle$
|
|
2263
|
+
let defaultStyle$4;
|
|
2264
2264
|
const EVENT_TYPE$1 = {
|
|
2265
2265
|
CHANGE_STYLE: 'change_style'
|
|
2266
2266
|
};
|
|
@@ -2295,7 +2295,7 @@
|
|
|
2295
2295
|
return EVENT_TYPE$1;
|
|
2296
2296
|
}
|
|
2297
2297
|
static get DEFAULT() {
|
|
2298
|
-
return defaultStyle$
|
|
2298
|
+
return defaultStyle$4 ? defaultStyle$4 : (defaultStyle$4 = new Style());
|
|
2299
2299
|
}
|
|
2300
2300
|
constructor(style = {}, headerStyle = {}) {
|
|
2301
2301
|
super();
|
|
@@ -2480,12 +2480,12 @@
|
|
|
2480
2480
|
}
|
|
2481
2481
|
}
|
|
2482
2482
|
|
|
2483
|
-
let defaultStyle$
|
|
2483
|
+
let defaultStyle$3;
|
|
2484
2484
|
class TextHeaderStyle extends Style {
|
|
2485
2485
|
_autoWrapText;
|
|
2486
2486
|
_lineClamp;
|
|
2487
2487
|
static get DEFAULT() {
|
|
2488
|
-
return defaultStyle$
|
|
2488
|
+
return defaultStyle$3 ? defaultStyle$3 : (defaultStyle$3 = new TextHeaderStyle());
|
|
2489
2489
|
}
|
|
2490
2490
|
constructor(style = {}, headerStyle = null) {
|
|
2491
2491
|
super(style, headerStyle);
|
|
@@ -2528,7 +2528,79 @@
|
|
|
2528
2528
|
return StyleClass.DEFAULT;
|
|
2529
2529
|
}
|
|
2530
2530
|
|
|
2531
|
+
class Env {
|
|
2532
|
+
static _mode;
|
|
2533
|
+
static get mode() {
|
|
2534
|
+
if (!Env._mode) {
|
|
2535
|
+
Env._mode = defaultMode();
|
|
2536
|
+
}
|
|
2537
|
+
return Env._mode;
|
|
2538
|
+
}
|
|
2539
|
+
static set mode(mode) {
|
|
2540
|
+
Env._mode = mode;
|
|
2541
|
+
}
|
|
2542
|
+
static dpr = 0;
|
|
2543
|
+
static CreateCanvas;
|
|
2544
|
+
static LoadImage;
|
|
2545
|
+
static RequestAnimationFrame;
|
|
2546
|
+
static CancelAnimationFrame;
|
|
2547
|
+
static RegisterCreateCanvas(func) {
|
|
2548
|
+
Env.CreateCanvas = func;
|
|
2549
|
+
}
|
|
2550
|
+
static RegisterLoadImage(func) {
|
|
2551
|
+
Env.LoadImage = func;
|
|
2552
|
+
}
|
|
2553
|
+
static GetCreateCanvasFunc() {
|
|
2554
|
+
if (Env.CreateCanvas) {
|
|
2555
|
+
return Env.CreateCanvas;
|
|
2556
|
+
}
|
|
2557
|
+
if (Env.mode === 'worker') {
|
|
2558
|
+
return (width = 200, height = 200) => new OffscreenCanvas(width, height);
|
|
2559
|
+
}
|
|
2560
|
+
return undefined;
|
|
2561
|
+
}
|
|
2562
|
+
static RegisterRequestAnimationFrame(func) {
|
|
2563
|
+
Env.RequestAnimationFrame = func();
|
|
2564
|
+
}
|
|
2565
|
+
static GetRequestAnimationFrame() {
|
|
2566
|
+
if (Env.RequestAnimationFrame) {
|
|
2567
|
+
return Env.RequestAnimationFrame;
|
|
2568
|
+
}
|
|
2569
|
+
return undefined;
|
|
2570
|
+
}
|
|
2571
|
+
static RegisterCancelAnimationFrame(func) {
|
|
2572
|
+
Env.CancelAnimationFrame = func();
|
|
2573
|
+
}
|
|
2574
|
+
static GetCancelAnimationFrame() {
|
|
2575
|
+
if (Env.CancelAnimationFrame) {
|
|
2576
|
+
return Env.CancelAnimationFrame;
|
|
2577
|
+
}
|
|
2578
|
+
return undefined;
|
|
2579
|
+
}
|
|
2580
|
+
}
|
|
2581
|
+
function defaultMode() {
|
|
2582
|
+
let mode = 'browser';
|
|
2583
|
+
try {
|
|
2584
|
+
if (window.type === 'node') {
|
|
2585
|
+
mode = 'node';
|
|
2586
|
+
}
|
|
2587
|
+
else if (typeof window !== 'undefined' && !window.performance) {
|
|
2588
|
+
mode = 'miniApp';
|
|
2589
|
+
}
|
|
2590
|
+
else if (typeof window === 'undefined') {
|
|
2591
|
+
mode = 'node';
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
catch (err) {
|
|
2595
|
+
mode = 'node';
|
|
2596
|
+
}
|
|
2597
|
+
return mode;
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2531
2600
|
function importStyle$2() {
|
|
2601
|
+
if (Env.mode === 'node') {
|
|
2602
|
+
return;
|
|
2603
|
+
}
|
|
2532
2604
|
const styleElement = document.createElement('style');
|
|
2533
2605
|
styleElement.id = 'vtable-style-styleSheet';
|
|
2534
2606
|
styleElement.textContent = `
|
|
@@ -3040,6 +3112,7 @@
|
|
|
3040
3112
|
LEGEND_CHANGE: 'legend_change',
|
|
3041
3113
|
MOUSEENTER_AXIS: 'mouseenter_axis',
|
|
3042
3114
|
MOUSELEAVE_AXIS: 'mouseleave_axis',
|
|
3115
|
+
CHECKBOX_STATE_CHANGE: 'checkbox_state_change',
|
|
3043
3116
|
AFTER_RENDER: 'after_render',
|
|
3044
3117
|
INITIALIZED: 'initialized'
|
|
3045
3118
|
};
|
|
@@ -3178,75 +3251,6 @@
|
|
|
3178
3251
|
return debounced;
|
|
3179
3252
|
}
|
|
3180
3253
|
|
|
3181
|
-
class Env {
|
|
3182
|
-
static _mode;
|
|
3183
|
-
static get mode() {
|
|
3184
|
-
if (!Env._mode) {
|
|
3185
|
-
Env._mode = defaultMode();
|
|
3186
|
-
}
|
|
3187
|
-
return Env._mode;
|
|
3188
|
-
}
|
|
3189
|
-
static set mode(mode) {
|
|
3190
|
-
Env._mode = mode;
|
|
3191
|
-
}
|
|
3192
|
-
static dpr = 0;
|
|
3193
|
-
static CreateCanvas;
|
|
3194
|
-
static LoadImage;
|
|
3195
|
-
static RequestAnimationFrame;
|
|
3196
|
-
static CancelAnimationFrame;
|
|
3197
|
-
static RegisterCreateCanvas(func) {
|
|
3198
|
-
Env.CreateCanvas = func;
|
|
3199
|
-
}
|
|
3200
|
-
static RegisterLoadImage(func) {
|
|
3201
|
-
Env.LoadImage = func;
|
|
3202
|
-
}
|
|
3203
|
-
static GetCreateCanvasFunc() {
|
|
3204
|
-
if (Env.CreateCanvas) {
|
|
3205
|
-
return Env.CreateCanvas;
|
|
3206
|
-
}
|
|
3207
|
-
if (Env.mode === 'worker') {
|
|
3208
|
-
return (width = 200, height = 200) => new OffscreenCanvas(width, height);
|
|
3209
|
-
}
|
|
3210
|
-
return undefined;
|
|
3211
|
-
}
|
|
3212
|
-
static RegisterRequestAnimationFrame(func) {
|
|
3213
|
-
Env.RequestAnimationFrame = func();
|
|
3214
|
-
}
|
|
3215
|
-
static GetRequestAnimationFrame() {
|
|
3216
|
-
if (Env.RequestAnimationFrame) {
|
|
3217
|
-
return Env.RequestAnimationFrame;
|
|
3218
|
-
}
|
|
3219
|
-
return undefined;
|
|
3220
|
-
}
|
|
3221
|
-
static RegisterCancelAnimationFrame(func) {
|
|
3222
|
-
Env.CancelAnimationFrame = func();
|
|
3223
|
-
}
|
|
3224
|
-
static GetCancelAnimationFrame() {
|
|
3225
|
-
if (Env.CancelAnimationFrame) {
|
|
3226
|
-
return Env.CancelAnimationFrame;
|
|
3227
|
-
}
|
|
3228
|
-
return undefined;
|
|
3229
|
-
}
|
|
3230
|
-
}
|
|
3231
|
-
function defaultMode() {
|
|
3232
|
-
let mode = 'browser';
|
|
3233
|
-
try {
|
|
3234
|
-
if (window.type === 'node') {
|
|
3235
|
-
mode = 'node';
|
|
3236
|
-
}
|
|
3237
|
-
else if (typeof window !== 'undefined' && !window.performance) {
|
|
3238
|
-
mode = 'miniApp';
|
|
3239
|
-
}
|
|
3240
|
-
else if (typeof window === 'undefined') {
|
|
3241
|
-
mode = 'node';
|
|
3242
|
-
}
|
|
3243
|
-
}
|
|
3244
|
-
catch (err) {
|
|
3245
|
-
mode = 'node';
|
|
3246
|
-
}
|
|
3247
|
-
return mode;
|
|
3248
|
-
}
|
|
3249
|
-
|
|
3250
3254
|
let idCount = 1;
|
|
3251
3255
|
class ResizeObserver {
|
|
3252
3256
|
resizeTime = 100;
|
|
@@ -3693,14 +3697,6 @@
|
|
|
3693
3697
|
endColor: 'rgba(00, 24, 47, 0)'
|
|
3694
3698
|
}
|
|
3695
3699
|
},
|
|
3696
|
-
menuStyle: {
|
|
3697
|
-
color: '#000',
|
|
3698
|
-
highlightColor: '#2E68CF',
|
|
3699
|
-
fontSize: 12,
|
|
3700
|
-
fontFamily: 'sans-serif',
|
|
3701
|
-
highlightFont: '12px sans-serif',
|
|
3702
|
-
hoverBgColor: '#EEE'
|
|
3703
|
-
},
|
|
3704
3700
|
selectionStyle: {
|
|
3705
3701
|
cellBgColor: 'rgba(255, 255, 255, 0.1)',
|
|
3706
3702
|
cellBorderColor: '#4284FF',
|
|
@@ -3765,14 +3761,6 @@
|
|
|
3765
3761
|
endColor: '#CBDCFE'
|
|
3766
3762
|
}
|
|
3767
3763
|
},
|
|
3768
|
-
menuStyle: {
|
|
3769
|
-
color: '#000',
|
|
3770
|
-
highlightColor: '#2E68CF',
|
|
3771
|
-
fontSize: 12,
|
|
3772
|
-
fontFamily: 'sans-serif',
|
|
3773
|
-
highlightFont: '12px sans-serif',
|
|
3774
|
-
hoverBgColor: '#EEE'
|
|
3775
|
-
},
|
|
3776
3764
|
selectionStyle: {
|
|
3777
3765
|
cellBgColor: 'rgba(0, 0, 255,0.1)'
|
|
3778
3766
|
}
|
|
@@ -3876,14 +3864,6 @@
|
|
|
3876
3864
|
endColor: 'rgba(00, 24, 47, 0)'
|
|
3877
3865
|
}
|
|
3878
3866
|
},
|
|
3879
|
-
menuStyle: {
|
|
3880
|
-
color: '#000',
|
|
3881
|
-
highlightColor: '#2E68CF',
|
|
3882
|
-
fontSize: 12,
|
|
3883
|
-
fontFamily: 'sans-serif',
|
|
3884
|
-
highlightFont: '12px sans-serif',
|
|
3885
|
-
hoverBgColor: '#EEE'
|
|
3886
|
-
},
|
|
3887
3867
|
selectionStyle: {
|
|
3888
3868
|
cellBgColor: 'rgba(0, 0, 255,0.1)',
|
|
3889
3869
|
cellBorderLineWidth: 2,
|
|
@@ -3962,14 +3942,6 @@
|
|
|
3962
3942
|
endColor: 'rgba(225, 228, 232, 0.6)'
|
|
3963
3943
|
}
|
|
3964
3944
|
},
|
|
3965
|
-
menuStyle: {
|
|
3966
|
-
color: '#000',
|
|
3967
|
-
highlightColor: '#2E68CF',
|
|
3968
|
-
fontSize: 12,
|
|
3969
|
-
fontFamily: 'sans-serif',
|
|
3970
|
-
highlightFont: '12px sans-serif',
|
|
3971
|
-
hoverBgColor: '#EEE'
|
|
3972
|
-
},
|
|
3973
3945
|
selectionStyle: {
|
|
3974
3946
|
cellBgColor: 'rgba(0, 0, 255,0.1)',
|
|
3975
3947
|
cellBorderLineWidth: 2,
|
|
@@ -4027,9 +3999,8 @@
|
|
|
4027
3999
|
|
|
4028
4000
|
const themes$2 = {};
|
|
4029
4001
|
|
|
4030
|
-
const DEFAULTFONT = '16px sans-serif';
|
|
4031
4002
|
const DEFAULTFONTSIZE = 16;
|
|
4032
|
-
const DEFAULTFONTFAMILY = 'sans-serif';
|
|
4003
|
+
const DEFAULTFONTFAMILY = 'Arial,sans-serif';
|
|
4033
4004
|
const DEFAULTBGCOLOR = '#FFF';
|
|
4034
4005
|
const DEFAULTBORDERCOLOR = '#000';
|
|
4035
4006
|
const DEFAULTBORDERLINEWIDTH = 1;
|
|
@@ -4343,8 +4314,11 @@
|
|
|
4343
4314
|
const { obj, superTheme } = this.internalTheme;
|
|
4344
4315
|
const tooltip = ingoreNoneValueMerge({}, superTheme.tooltipStyle, obj.tooltipStyle);
|
|
4345
4316
|
this._tooltip = {
|
|
4346
|
-
get
|
|
4347
|
-
return tooltip.
|
|
4317
|
+
get fontFamily() {
|
|
4318
|
+
return tooltip.fontFamily ?? DEFAULTFONTFAMILY;
|
|
4319
|
+
},
|
|
4320
|
+
get fontSize() {
|
|
4321
|
+
return tooltip.fontSize ?? DEFAULTFONTSIZE;
|
|
4348
4322
|
},
|
|
4349
4323
|
get bgColor() {
|
|
4350
4324
|
return tooltip.bgColor ?? '#000';
|
|
@@ -28729,6 +28703,13 @@
|
|
|
28729
28703
|
function identity(x) {
|
|
28730
28704
|
return x;
|
|
28731
28705
|
}
|
|
28706
|
+
const logNegative = x => -Math.log(-x);
|
|
28707
|
+
const expNegative = x => -Math.exp(-x);
|
|
28708
|
+
const pow10 = x => isFinite(x) ? Math.pow(10, x) : x < 0 ? 0 : x;
|
|
28709
|
+
const powp = base => 10 === base ? pow10 : base === Math.E ? Math.exp : x => Math.pow(base, x);
|
|
28710
|
+
const logp = base => base === Math.E ? Math.log : 10 === base ? Math.log10 : 2 === base ? Math.log2 : (base = Math.log(base), x => Math.log(x) / base);
|
|
28711
|
+
const symlog = c => x => Math.sign(x) * Math.log1p(Math.abs(x / c));
|
|
28712
|
+
const symexp = c => x => Math.sign(x) * Math.expm1(Math.abs(x)) * c;
|
|
28732
28713
|
function normalize(a, b) {
|
|
28733
28714
|
if (a = Number(a), b = Number(b), b -= a) return x => (x - a) / b;
|
|
28734
28715
|
const result = Number.isNaN(b) ? NaN : .5;
|
|
@@ -28767,6 +28748,25 @@
|
|
|
28767
28748
|
return r[i](d[i](x));
|
|
28768
28749
|
};
|
|
28769
28750
|
}
|
|
28751
|
+
const nice = (domain, options) => {
|
|
28752
|
+
const newDomain = domain.slice();
|
|
28753
|
+
let startIndex = 0,
|
|
28754
|
+
endIndex = newDomain.length - 1,
|
|
28755
|
+
x0 = newDomain[startIndex],
|
|
28756
|
+
x1 = newDomain[endIndex];
|
|
28757
|
+
return x1 < x0 && ([startIndex, endIndex] = [endIndex, startIndex], [x0, x1] = [x1, x0]), newDomain[startIndex] = options.floor(x0), newDomain[endIndex] = options.ceil(x1), newDomain;
|
|
28758
|
+
};
|
|
28759
|
+
const niceNumber = function (value) {
|
|
28760
|
+
let round = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
28761
|
+
const exponent = Math.floor(Math.log10(value)),
|
|
28762
|
+
fraction = value / Math.pow(10, exponent);
|
|
28763
|
+
let niceFraction;
|
|
28764
|
+
return niceFraction = round ? fraction < 1.5 ? 1 : fraction < 3 ? 2 : fraction < 7 ? 5 : 10 : fraction <= 1 ? 1 : fraction <= 2 ? 2 : fraction <= 5 ? 5 : 10, niceFraction * Math.pow(10, exponent);
|
|
28765
|
+
};
|
|
28766
|
+
const restrictNumber = (value, domain) => {
|
|
28767
|
+
let min, max;
|
|
28768
|
+
return domain[0] < domain[1] ? (min = domain[0], max = domain[1]) : (min = domain[1], max = domain[0]), Math.min(Math.max(value, min), max);
|
|
28769
|
+
};
|
|
28770
28770
|
|
|
28771
28771
|
function ticks$2(start, stop, count, allowExcessive) {
|
|
28772
28772
|
let reverse;
|
|
@@ -29199,6 +29199,25 @@
|
|
|
29199
29199
|
domainValidator: domainValidator
|
|
29200
29200
|
};
|
|
29201
29201
|
}
|
|
29202
|
+
const fixPrecision = (start, stop, value) => Math.abs(stop - start) < 1 ? +value.toFixed(1) : Math.round(+value);
|
|
29203
|
+
const ticksBaseTransform = memoize((start, stop, count, base, transformer, untransformer) => {
|
|
29204
|
+
const ticksResult = [],
|
|
29205
|
+
ticksMap = {},
|
|
29206
|
+
startExp = transformer(start),
|
|
29207
|
+
stopExp = transformer(stop);
|
|
29208
|
+
let ticksExp = [];
|
|
29209
|
+
if (Number.isInteger(base)) ticksExp = ticks$1(startExp, stopExp, count);else {
|
|
29210
|
+
const stepExp = (stopExp - startExp) / (count - 1);
|
|
29211
|
+
for (let i = 0; i < count; i++) ticksExp.push(startExp + i * stepExp);
|
|
29212
|
+
}
|
|
29213
|
+
return ticksExp.forEach(tl => {
|
|
29214
|
+
const power = untransformer(tl),
|
|
29215
|
+
nicePower = Number.isInteger(base) ? fixPrecision(start, stop, power) : fixPrecision(start, stop, niceNumber(power)),
|
|
29216
|
+
scopePower = fixPrecision(start, stop, restrictNumber(nicePower, [start, stop]));
|
|
29217
|
+
!ticksMap[scopePower] && !isNaN(scopePower) && ticksExp.length > 1 && (ticksMap[scopePower] = 1, ticksResult.push(scopePower));
|
|
29218
|
+
}), ticksResult;
|
|
29219
|
+
});
|
|
29220
|
+
const forceTicksBaseTransform = memoize((start, stop, count, transformer, untransformer) => forceTicks(transformer(start), transformer(stop), count).map(te => niceNumber(untransformer(te))));
|
|
29202
29221
|
|
|
29203
29222
|
class LinearScale extends ContinuousScale {
|
|
29204
29223
|
constructor() {
|
|
@@ -29278,12 +29297,166 @@
|
|
|
29278
29297
|
}
|
|
29279
29298
|
}
|
|
29280
29299
|
|
|
29300
|
+
function reflect(f) {
|
|
29301
|
+
return x => -f(-x);
|
|
29302
|
+
}
|
|
29303
|
+
class LogScale extends ContinuousScale {
|
|
29304
|
+
constructor() {
|
|
29305
|
+
super(logp(10), powp(10)), this.type = ScaleEnum$1.Log, this._logs = this.transformer, this._pows = this.untransformer, this._domain = [1, 10], this._base = 10;
|
|
29306
|
+
}
|
|
29307
|
+
clone() {
|
|
29308
|
+
return new LogScale().domain(this._domain, !0).range(this._range, !0).unknown(this._unknown).clamp(this.clamp(), null, !0).interpolate(this._interpolate, !0).base(this._base);
|
|
29309
|
+
}
|
|
29310
|
+
rescale(slience) {
|
|
29311
|
+
var _a;
|
|
29312
|
+
if (slience) return this;
|
|
29313
|
+
super.rescale();
|
|
29314
|
+
const logs = logp(this._base),
|
|
29315
|
+
pows = powp(this._base);
|
|
29316
|
+
return (null !== (_a = this._niceDomain) && void 0 !== _a ? _a : this._domain)[0] < 0 ? (this._logs = reflect(logs), this._pows = reflect(pows), this.transformer = logNegative, this.untransformer = expNegative) : (this._logs = logs, this._pows = pows, this.transformer = logs, this.untransformer = pows), this;
|
|
29317
|
+
}
|
|
29318
|
+
base(_, slience) {
|
|
29319
|
+
return arguments.length ? (this._base = _, this.rescale(slience)) : this._base;
|
|
29320
|
+
}
|
|
29321
|
+
tickFormat() {
|
|
29322
|
+
return identity;
|
|
29323
|
+
}
|
|
29324
|
+
d3Ticks() {
|
|
29325
|
+
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
29326
|
+
const d = this.domain();
|
|
29327
|
+
let u = d[0],
|
|
29328
|
+
v = d[d.length - 1];
|
|
29329
|
+
const r = v < u;
|
|
29330
|
+
r && ([u, v] = [v, u]);
|
|
29331
|
+
let k,
|
|
29332
|
+
t,
|
|
29333
|
+
i = this._logs(u),
|
|
29334
|
+
j = this._logs(v),
|
|
29335
|
+
z = [];
|
|
29336
|
+
if (!(this._base % 1) && j - i < count) {
|
|
29337
|
+
if (i = Math.floor(i), j = Math.ceil(j), u > 0) {
|
|
29338
|
+
for (; i <= j; ++i) for (k = 1; k < this._base; ++k) if (t = i < 0 ? k / this._pows(-i) : k * this._pows(i), !(t < u)) {
|
|
29339
|
+
if (t > v) break;
|
|
29340
|
+
z.push(t);
|
|
29341
|
+
}
|
|
29342
|
+
} else for (; i <= j; ++i) for (k = this._base - 1; k >= 1; --k) if (t = i > 0 ? k / this._pows(-i) : k * this._pows(i), !(t < u)) {
|
|
29343
|
+
if (t > v) break;
|
|
29344
|
+
z.push(t);
|
|
29345
|
+
}
|
|
29346
|
+
2 * z.length < count && (z = ticks$1(u, v, count));
|
|
29347
|
+
} else z = ticks$1(i, j, Math.min(j - i, count)).map(this._pows);
|
|
29348
|
+
return r ? z.reverse() : z;
|
|
29349
|
+
}
|
|
29350
|
+
ticks() {
|
|
29351
|
+
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
29352
|
+
const d = this.calculateVisibleDomain(this._range);
|
|
29353
|
+
return ticksBaseTransform(d[0], d[d.length - 1], count, this._base, this.transformer, this.untransformer);
|
|
29354
|
+
}
|
|
29355
|
+
forceTicks() {
|
|
29356
|
+
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
29357
|
+
const d = this.calculateVisibleDomain(this._range);
|
|
29358
|
+
return forceTicksBaseTransform(d[0], d[d.length - 1], count, this.transformer, this.untransformer);
|
|
29359
|
+
}
|
|
29360
|
+
stepTicks(step) {
|
|
29361
|
+
const d = this.calculateVisibleDomain(this._range);
|
|
29362
|
+
return forceTicksBaseTransform(d[0], d[d.length - 1], step, this.transformer, this.untransformer);
|
|
29363
|
+
}
|
|
29364
|
+
nice() {
|
|
29365
|
+
let option = arguments.length > 1 ? arguments[1] : undefined;
|
|
29366
|
+
var _a, _b;
|
|
29367
|
+
const originalDomain = this._domain;
|
|
29368
|
+
let niceMinMax = [],
|
|
29369
|
+
niceType = null;
|
|
29370
|
+
if (option) {
|
|
29371
|
+
const res = parseNiceOptions(originalDomain, option);
|
|
29372
|
+
if (niceMinMax = res.niceMinMax, this._domainValidator = res.domainValidator, niceType = res.niceType, res.niceDomain) return this._niceDomain = res.niceDomain, this.rescale(), this;
|
|
29373
|
+
} else niceType = "all";
|
|
29374
|
+
if (niceType) {
|
|
29375
|
+
const niceDomain = nice(originalDomain.slice(), {
|
|
29376
|
+
floor: x => this._pows(Math.floor(this._logs(x))),
|
|
29377
|
+
ceil: x => this._pows(Math.ceil(this._logs(x)))
|
|
29378
|
+
});
|
|
29379
|
+
return "min" === niceType ? niceDomain[niceDomain.length - 1] = null !== (_a = niceMinMax[1]) && void 0 !== _a ? _a : niceDomain[niceDomain.length - 1] : "max" === niceType && (niceDomain[0] = null !== (_b = niceMinMax[0]) && void 0 !== _b ? _b : niceDomain[0]), this._niceDomain = niceDomain, this.rescale(), this;
|
|
29380
|
+
}
|
|
29381
|
+
return this;
|
|
29382
|
+
}
|
|
29383
|
+
niceMin() {
|
|
29384
|
+
const maxD = this._domain[this._domain.length - 1];
|
|
29385
|
+
this.nice();
|
|
29386
|
+
const niceDomain = this._domain.slice();
|
|
29387
|
+
return this._domain && (niceDomain[niceDomain.length - 1] = maxD, this._niceDomain = niceDomain, this.rescale()), this;
|
|
29388
|
+
}
|
|
29389
|
+
niceMax() {
|
|
29390
|
+
const minD = this._domain[0];
|
|
29391
|
+
this.nice();
|
|
29392
|
+
const niceDomain = this._domain.slice();
|
|
29393
|
+
return this._domain && (niceDomain[0] = minD, this._niceDomain = niceDomain, this.rescale()), this;
|
|
29394
|
+
}
|
|
29395
|
+
}
|
|
29396
|
+
|
|
29281
29397
|
class PointScale extends BandScale {
|
|
29282
29398
|
constructor(slience) {
|
|
29283
29399
|
super(!1), this.type = ScaleEnum$1.Point, this._padding = 0, this.paddingInner(1, slience), this.padding = this.paddingOuter, this.paddingInner = void 0, this.paddingOuter = void 0;
|
|
29284
29400
|
}
|
|
29285
29401
|
}
|
|
29286
29402
|
|
|
29403
|
+
class SymlogScale extends LinearScale {
|
|
29404
|
+
constructor() {
|
|
29405
|
+
super(symlog(1), symexp(1)), this.type = ScaleEnum$1.Symlog, this._const = 1;
|
|
29406
|
+
}
|
|
29407
|
+
clone() {
|
|
29408
|
+
return new SymlogScale().domain(this._domain, !0).range(this._range, !0).unknown(this._unknown).clamp(this.clamp(), null, !0).interpolate(this._interpolate, !0).constant(this._const);
|
|
29409
|
+
}
|
|
29410
|
+
constant(_, slience) {
|
|
29411
|
+
return arguments.length ? (this._const = _, this.transformer = symlog(_), this.untransformer = symexp(_), this.rescale(slience)) : this._const;
|
|
29412
|
+
}
|
|
29413
|
+
ticks() {
|
|
29414
|
+
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
29415
|
+
const d = this.calculateVisibleDomain(this._range);
|
|
29416
|
+
return ticksBaseTransform(d[0], d[d.length - 1], count, this._const, this.transformer, this.untransformer);
|
|
29417
|
+
}
|
|
29418
|
+
forceTicks() {
|
|
29419
|
+
let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
|
|
29420
|
+
const d = this.calculateVisibleDomain(this._range);
|
|
29421
|
+
return forceTicksBaseTransform(d[0], d[d.length - 1], count, this.transformer, this.untransformer);
|
|
29422
|
+
}
|
|
29423
|
+
stepTicks(step) {
|
|
29424
|
+
const d = this.calculateVisibleDomain(this._range);
|
|
29425
|
+
return forceTicksBaseTransform(d[0], d[d.length - 1], step, this.transformer, this.untransformer);
|
|
29426
|
+
}
|
|
29427
|
+
nice() {
|
|
29428
|
+
let option = arguments.length > 1 ? arguments[1] : undefined;
|
|
29429
|
+
var _a, _b;
|
|
29430
|
+
const originalDomain = this._domain;
|
|
29431
|
+
let niceMinMax = [],
|
|
29432
|
+
niceType = null;
|
|
29433
|
+
if (option) {
|
|
29434
|
+
const res = parseNiceOptions(originalDomain, option);
|
|
29435
|
+
if (niceMinMax = res.niceMinMax, this._domainValidator = res.domainValidator, niceType = res.niceType, res.niceDomain) return this._niceDomain = res.niceDomain, this.rescale(), this;
|
|
29436
|
+
} else niceType = "all";
|
|
29437
|
+
if (niceType) {
|
|
29438
|
+
const niceDomain = nice(originalDomain.slice(), {
|
|
29439
|
+
floor: x => this.untransformer(Math.floor(this.transformer(x))),
|
|
29440
|
+
ceil: x => this.untransformer(Math.ceil(this.transformer(x)))
|
|
29441
|
+
});
|
|
29442
|
+
return "min" === niceType ? niceDomain[niceDomain.length - 1] = null !== (_a = niceMinMax[1]) && void 0 !== _a ? _a : niceDomain[niceDomain.length - 1] : "max" === niceType && (niceDomain[0] = null !== (_b = niceMinMax[0]) && void 0 !== _b ? _b : niceDomain[0]), this._niceDomain = niceDomain, this.rescale(), this;
|
|
29443
|
+
}
|
|
29444
|
+
return this;
|
|
29445
|
+
}
|
|
29446
|
+
niceMin() {
|
|
29447
|
+
const maxD = this._domain[this._domain.length - 1];
|
|
29448
|
+
this.nice();
|
|
29449
|
+
const niceDomain = this._domain.slice();
|
|
29450
|
+
return this._domain && (niceDomain[niceDomain.length - 1] = maxD, this._niceDomain = niceDomain, this.rescale()), this;
|
|
29451
|
+
}
|
|
29452
|
+
niceMax() {
|
|
29453
|
+
const minD = this._domain[0];
|
|
29454
|
+
this.nice();
|
|
29455
|
+
const niceDomain = this._domain.slice();
|
|
29456
|
+
return this._domain && (niceDomain[0] = minD, this._niceDomain = niceDomain, this.rescale()), this;
|
|
29457
|
+
}
|
|
29458
|
+
}
|
|
29459
|
+
|
|
29287
29460
|
var SLIDER_ELEMENT_NAME;
|
|
29288
29461
|
!function (SLIDER_ELEMENT_NAME) {
|
|
29289
29462
|
SLIDER_ELEMENT_NAME.innerView = "innerView", SLIDER_ELEMENT_NAME.railContainer = "sliderRailContainer", SLIDER_ELEMENT_NAME.rail = "sliderRail", SLIDER_ELEMENT_NAME.startText = "sliderStartText", SLIDER_ELEMENT_NAME.endText = "sliderEndText", SLIDER_ELEMENT_NAME.startHandler = "sliderStartHandler", SLIDER_ELEMENT_NAME.startHandlerText = "startHandlerText", SLIDER_ELEMENT_NAME.endHandler = "sliderEndHandler", SLIDER_ELEMENT_NAME.endHandlerText = "sliderEndHandlerText", SLIDER_ELEMENT_NAME.track = "sliderTrack", SLIDER_ELEMENT_NAME.trackContainer = "sliderTrackContainer";
|
|
@@ -30168,6 +30341,106 @@
|
|
|
30168
30341
|
}
|
|
30169
30342
|
};
|
|
30170
30343
|
|
|
30344
|
+
const svg = '<svg width="200" height="200" viewBox="0 0 1024 1024" fill="#fff" xmlns="http://www.w3.org/2000/svg"><path d="M877.44815445 206.10060629a64.72691371 64.72691371 0 0 0-95.14856334 4.01306852L380.73381888 685.46812814 235.22771741 533.48933518a64.72691371 64.72691371 0 0 0-92.43003222-1.03563036l-45.82665557 45.82665443a64.72691371 64.72691371 0 0 0-0.90617629 90.61767965l239.61903446 250.10479331a64.72691371 64.72691371 0 0 0 71.19960405 15.14609778 64.33855261 64.33855261 0 0 0 35.08198741-21.23042702l36.24707186-42.71976334 40.5190474-40.77795556-3.36579926-3.49525333 411.40426297-486.74638962a64.72691371 64.72691371 0 0 0-3.88361443-87.64024149l-45.3088404-45.43829334z"></path></svg>';
|
|
30345
|
+
class CheckBox extends AbstractComponent {
|
|
30346
|
+
constructor(attributes) {
|
|
30347
|
+
super(merge$1({}, CheckBox.defaultAttributes, attributes)), this.renderGroup(), this.onBeforeAttributeUpdate = (val, attributes, key) => {
|
|
30348
|
+
"interactive" in val && this.setAttribute("pickable", val.interactive), "disabled" in val && this.setAttribute("cursor", val.disable ? this.attribute.disableCursor : this.attribute.cursor);
|
|
30349
|
+
}, this.addEventListener("click", this.handleClick);
|
|
30350
|
+
}
|
|
30351
|
+
render() {
|
|
30352
|
+
this.removeAllChild(), this.renderBox(), this.renderIcon(), this.renderText(), this.layout();
|
|
30353
|
+
}
|
|
30354
|
+
renderBox() {
|
|
30355
|
+
this._box = new Rect$1(merge$1({}, this.attribute.box)), this.attribute.checked && this.attribute.disabled ? this._box.setAttributes({
|
|
30356
|
+
fill: this.attribute.box.disableCheckedFill,
|
|
30357
|
+
stroke: this.attribute.box.disableCheckedStroke
|
|
30358
|
+
}) : this.attribute.checked && this._box.setAttributes({
|
|
30359
|
+
fill: this.attribute.box.checkedFill,
|
|
30360
|
+
stroke: this.attribute.box.checkedStroke
|
|
30361
|
+
}), this.appendChild(this._box);
|
|
30362
|
+
}
|
|
30363
|
+
renderIcon() {
|
|
30364
|
+
this._icon = new Image$3(merge$1({}, this.attribute.icon)), this.attribute.checked || this._icon.setAttribute("visible", !1), this.appendChild(this._icon);
|
|
30365
|
+
}
|
|
30366
|
+
renderText() {
|
|
30367
|
+
this._text = new WrapText(merge$1({}, this.attribute.text)), this.attribute.disabled && this._text.setAttribute("fill", this.attribute.text.disableFill), this.appendChild(this._text);
|
|
30368
|
+
}
|
|
30369
|
+
renderGroup() {
|
|
30370
|
+
this.attribute.interactive || this.setAttribute("pickable", !1), this.attribute.disabled && this.setAttribute("cursor", this.attribute.disableCursor);
|
|
30371
|
+
}
|
|
30372
|
+
layout() {
|
|
30373
|
+
const boxHeight = this.attribute.box.height,
|
|
30374
|
+
iconHeight = this.attribute.icon.height,
|
|
30375
|
+
textHeight = this._text.AABBBounds.height(),
|
|
30376
|
+
maxHeight = Math.max(boxHeight, iconHeight, textHeight),
|
|
30377
|
+
boxY = maxHeight / 2 - boxHeight / 2,
|
|
30378
|
+
iconY = maxHeight / 2 - iconHeight / 2,
|
|
30379
|
+
textY = maxHeight / 2 - textHeight / 2,
|
|
30380
|
+
boxWidth = this.attribute.box.width,
|
|
30381
|
+
iconWidth = this.attribute.icon.width,
|
|
30382
|
+
maxWidth = Math.max(boxWidth, iconWidth),
|
|
30383
|
+
boxX = maxWidth / 2 - boxWidth / 2,
|
|
30384
|
+
iconX = maxWidth / 2 - iconWidth / 2,
|
|
30385
|
+
textX = maxWidth + this.attribute.spaceBetweenTextAndIcon;
|
|
30386
|
+
this._box.setAttributes({
|
|
30387
|
+
x: boxX,
|
|
30388
|
+
y: boxY
|
|
30389
|
+
}), this._icon.setAttributes({
|
|
30390
|
+
x: iconX,
|
|
30391
|
+
y: iconY
|
|
30392
|
+
}), this._text.setAttributes({
|
|
30393
|
+
x: textX,
|
|
30394
|
+
y: textY
|
|
30395
|
+
});
|
|
30396
|
+
}
|
|
30397
|
+
handleClick() {
|
|
30398
|
+
var _a;
|
|
30399
|
+
if (this.attribute.disabled) return;
|
|
30400
|
+
this.attribute.checked ? this.setAttribute("checked", !1) : this.setAttribute("checked", !0);
|
|
30401
|
+
const changeEvent = new CustomEvent$1("checkbox_state_change", {
|
|
30402
|
+
eventType: "checkbox_state_change",
|
|
30403
|
+
checked: this.attribute.checked
|
|
30404
|
+
});
|
|
30405
|
+
changeEvent.manager = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.eventSystem.manager, this.dispatchEvent(changeEvent);
|
|
30406
|
+
}
|
|
30407
|
+
}
|
|
30408
|
+
CheckBox.defaultAttributes = {
|
|
30409
|
+
interactive: !0,
|
|
30410
|
+
disabled: !1,
|
|
30411
|
+
checked: !1,
|
|
30412
|
+
cursor: "pointer",
|
|
30413
|
+
disableCursor: "not-allowed",
|
|
30414
|
+
spaceBetweenTextAndIcon: 8,
|
|
30415
|
+
text: {
|
|
30416
|
+
text: "text",
|
|
30417
|
+
fontSize: 14,
|
|
30418
|
+
fill: "#000",
|
|
30419
|
+
disableFill: "rgb(201,205,212)",
|
|
30420
|
+
textBaseline: "top",
|
|
30421
|
+
pickable: !1
|
|
30422
|
+
},
|
|
30423
|
+
icon: {
|
|
30424
|
+
image: svg,
|
|
30425
|
+
width: 10,
|
|
30426
|
+
height: 10,
|
|
30427
|
+
pickable: !1
|
|
30428
|
+
},
|
|
30429
|
+
box: {
|
|
30430
|
+
width: 14,
|
|
30431
|
+
height: 14,
|
|
30432
|
+
cornerRadius: 2,
|
|
30433
|
+
fill: "#fff",
|
|
30434
|
+
stroke: "rgb(229,230,235)",
|
|
30435
|
+
disableFill: "rgb(242,243,245)",
|
|
30436
|
+
checkedFill: "rgb(22, 93, 255)",
|
|
30437
|
+
checkedStroke: "rgb(22, 93, 255)",
|
|
30438
|
+
disableCheckedFill: "rgb(148, 191, 255)",
|
|
30439
|
+
disableCheckedStroke: "rgb(148, 191, 255)",
|
|
30440
|
+
pickable: !1
|
|
30441
|
+
}
|
|
30442
|
+
};
|
|
30443
|
+
|
|
30171
30444
|
function transformLegendTitleAttributes(title) {
|
|
30172
30445
|
const transformedTitle = {
|
|
30173
30446
|
...title
|
|
@@ -35751,11 +36024,21 @@
|
|
|
35751
36024
|
forceTickCount;
|
|
35752
36025
|
tickCount;
|
|
35753
36026
|
niceType;
|
|
35754
|
-
|
|
35755
|
-
|
|
36027
|
+
type;
|
|
36028
|
+
constructor(type) {
|
|
36029
|
+
this.type = type ?? 'linear';
|
|
36030
|
+
if (type === 'log') {
|
|
36031
|
+
this._scale = new LogScale();
|
|
36032
|
+
}
|
|
36033
|
+
else if (type === 'symlog') {
|
|
36034
|
+
this._scale = new SymlogScale();
|
|
36035
|
+
}
|
|
36036
|
+
else {
|
|
36037
|
+
this._scale = new LinearScale();
|
|
36038
|
+
}
|
|
35756
36039
|
this._scales = [this._scale];
|
|
35757
36040
|
}
|
|
35758
|
-
setExtraAttrFromSpec(nice, zero, range, expand) {
|
|
36041
|
+
setExtraAttrFromSpec(nice, zero, range, expand, base, constant) {
|
|
35759
36042
|
this.nice = false;
|
|
35760
36043
|
this.zero = zero;
|
|
35761
36044
|
if (this.zero) {
|
|
@@ -35764,11 +36047,39 @@
|
|
|
35764
36047
|
}
|
|
35765
36048
|
this.domain = range;
|
|
35766
36049
|
this.expand = expand;
|
|
36050
|
+
if (this.type === 'log') {
|
|
36051
|
+
this._scale.base(base ?? 10);
|
|
36052
|
+
}
|
|
36053
|
+
else if (this.type === 'symlog') {
|
|
36054
|
+
this._scale.constant(constant ?? 10);
|
|
36055
|
+
}
|
|
35767
36056
|
}
|
|
35768
36057
|
transformScaleDomain() {
|
|
35769
|
-
this.
|
|
36058
|
+
if (this.type === 'symlog' || this.type === 'log') ;
|
|
36059
|
+
else {
|
|
36060
|
+
this.setScaleNice();
|
|
36061
|
+
}
|
|
35770
36062
|
}
|
|
35771
36063
|
setScaleNice() {
|
|
36064
|
+
if (this.type === 'log') {
|
|
36065
|
+
this.setLogScaleNice();
|
|
36066
|
+
}
|
|
36067
|
+
else {
|
|
36068
|
+
this.setLinearScaleNice();
|
|
36069
|
+
}
|
|
36070
|
+
}
|
|
36071
|
+
setLogScaleNice() {
|
|
36072
|
+
if (isNil$5(this.domain?.min) && isNil$5(this.domain?.max)) {
|
|
36073
|
+
this.nice && this._scale.nice();
|
|
36074
|
+
}
|
|
36075
|
+
else if (isValid$6(this.domain?.min) && isNil$5(this.domain?.max)) {
|
|
36076
|
+
this.nice && this._scale.niceMax();
|
|
36077
|
+
}
|
|
36078
|
+
else if (isNil$5(this.domain?.min) && isValid$6(this.domain?.max)) {
|
|
36079
|
+
this.nice && this._scale.niceMin();
|
|
36080
|
+
}
|
|
36081
|
+
}
|
|
36082
|
+
setLinearScaleNice() {
|
|
35772
36083
|
let tickCount = this.forceTickCount ?? this.tickCount ?? 10;
|
|
35773
36084
|
if (this.niceType === 'accurateFirst') {
|
|
35774
36085
|
tickCount = Math.max(10, tickCount);
|
|
@@ -36067,7 +36378,7 @@
|
|
|
36067
36378
|
}
|
|
36068
36379
|
initScale() {
|
|
36069
36380
|
const option = this.option;
|
|
36070
|
-
if (this.type === 'band') {
|
|
36381
|
+
if (this.type === 'band' || this.type === 'point') {
|
|
36071
36382
|
this.scale = new BandAxisScale();
|
|
36072
36383
|
this.scale.bandPadding = option.bandPadding;
|
|
36073
36384
|
this.scale.paddingInner = option.paddingInner;
|
|
@@ -36076,9 +36387,9 @@
|
|
|
36076
36387
|
this.scale.updateScaleDomain(this.data);
|
|
36077
36388
|
this.updateScaleRange();
|
|
36078
36389
|
}
|
|
36079
|
-
else if (this.type === 'linear' || this.type === 'time') {
|
|
36080
|
-
this.scale = new LinearAxisScale();
|
|
36081
|
-
this.scale.setExtraAttrFromSpec(option.nice, option.zero, option.range, option.expand);
|
|
36390
|
+
else if (this.type === 'linear' || this.type === 'time' || this.type === 'log' || this.type === 'symlog') {
|
|
36391
|
+
this.scale = new LinearAxisScale(this.type);
|
|
36392
|
+
this.scale.setExtraAttrFromSpec(option.nice, option.zero, option.range, option.expand, option.base, option.constant);
|
|
36082
36393
|
this.scale.transformScaleDomain();
|
|
36083
36394
|
this.scale.updateScaleDomain();
|
|
36084
36395
|
this.updateScaleRange();
|
|
@@ -39744,7 +40055,24 @@
|
|
|
39744
40055
|
min = Math.min(min, 0);
|
|
39745
40056
|
max = Math.max(max, 0);
|
|
39746
40057
|
}
|
|
39747
|
-
|
|
40058
|
+
if (isNumber$6(axisOption?.min)) {
|
|
40059
|
+
min = axisOption.min;
|
|
40060
|
+
}
|
|
40061
|
+
if (isNumber$6(axisOption?.max)) {
|
|
40062
|
+
max = axisOption.max;
|
|
40063
|
+
}
|
|
40064
|
+
let scale;
|
|
40065
|
+
if (axisOption?.type === 'log') {
|
|
40066
|
+
scale = new LogScale();
|
|
40067
|
+
scale.base(axisOption?.base ?? 10);
|
|
40068
|
+
}
|
|
40069
|
+
else if (axisOption?.type === 'symlog') {
|
|
40070
|
+
scale = new SymlogScale();
|
|
40071
|
+
scale.constant(axisOption?.constant ?? 10);
|
|
40072
|
+
}
|
|
40073
|
+
else {
|
|
40074
|
+
scale = new LinearScale();
|
|
40075
|
+
}
|
|
39748
40076
|
scale.domain([min, max], !!axisOption?.nice);
|
|
39749
40077
|
if (axisOption?.nice && !isZeroAlign) {
|
|
39750
40078
|
let tickCount = axisOption.tick?.forceTickCount ?? axisOption.tick?.tickCount ?? 10;
|
|
@@ -39802,15 +40130,21 @@
|
|
|
39802
40130
|
range.max = !isNaN(niceRange[1]) ? niceRange[1] : 1;
|
|
39803
40131
|
if (isNumber$6(axisOption?.min)) {
|
|
39804
40132
|
range.min = axisOption.min;
|
|
40133
|
+
if (range.min > 0) {
|
|
40134
|
+
axisOption.zero = false;
|
|
40135
|
+
}
|
|
39805
40136
|
}
|
|
39806
40137
|
if (isNumber$6(axisOption?.max)) {
|
|
39807
40138
|
range.max = axisOption.max;
|
|
40139
|
+
if (range.max < 0) {
|
|
40140
|
+
axisOption.zero = false;
|
|
40141
|
+
}
|
|
39808
40142
|
}
|
|
39809
40143
|
return merge$1({
|
|
39810
40144
|
range: range
|
|
39811
40145
|
}, axisOption, {
|
|
39812
40146
|
orient: 'top',
|
|
39813
|
-
type: 'linear',
|
|
40147
|
+
type: axisOption?.type || 'linear',
|
|
39814
40148
|
label: {
|
|
39815
40149
|
flush: true
|
|
39816
40150
|
},
|
|
@@ -39846,9 +40180,15 @@
|
|
|
39846
40180
|
range.max = !isNaN(niceRange[1]) ? niceRange[1] : 1;
|
|
39847
40181
|
if (isNumber$6(axisOption?.min)) {
|
|
39848
40182
|
range.min = axisOption.min;
|
|
40183
|
+
if (range.min > 0) {
|
|
40184
|
+
axisOption.zero = false;
|
|
40185
|
+
}
|
|
39849
40186
|
}
|
|
39850
40187
|
if (isNumber$6(axisOption?.max)) {
|
|
39851
40188
|
range.max = axisOption.max;
|
|
40189
|
+
if (range.max < 0) {
|
|
40190
|
+
axisOption.zero = false;
|
|
40191
|
+
}
|
|
39852
40192
|
}
|
|
39853
40193
|
return merge$1({
|
|
39854
40194
|
title: {
|
|
@@ -39858,7 +40198,7 @@
|
|
|
39858
40198
|
range: range
|
|
39859
40199
|
}, axisOption, {
|
|
39860
40200
|
orient: 'bottom',
|
|
39861
|
-
type: 'linear',
|
|
40201
|
+
type: axisOption?.type || 'linear',
|
|
39862
40202
|
label: {
|
|
39863
40203
|
flush: true
|
|
39864
40204
|
},
|
|
@@ -39920,9 +40260,15 @@
|
|
|
39920
40260
|
range.max = !isNaN(niceRange[1]) ? niceRange[1] : 1;
|
|
39921
40261
|
if (isNumber$6(axisOption?.min)) {
|
|
39922
40262
|
range.min = axisOption.min;
|
|
40263
|
+
if (range.min > 0) {
|
|
40264
|
+
axisOption.zero = false;
|
|
40265
|
+
}
|
|
39923
40266
|
}
|
|
39924
40267
|
if (isNumber$6(axisOption?.max)) {
|
|
39925
40268
|
range.max = axisOption.max;
|
|
40269
|
+
if (range.max < 0) {
|
|
40270
|
+
axisOption.zero = false;
|
|
40271
|
+
}
|
|
39926
40272
|
}
|
|
39927
40273
|
return merge$1({
|
|
39928
40274
|
title: {
|
|
@@ -39933,7 +40279,7 @@
|
|
|
39933
40279
|
range: range
|
|
39934
40280
|
}, axisOption, {
|
|
39935
40281
|
orient: 'left',
|
|
39936
|
-
type: 'linear',
|
|
40282
|
+
type: axisOption?.type || 'linear',
|
|
39937
40283
|
label: {
|
|
39938
40284
|
flush: true
|
|
39939
40285
|
},
|
|
@@ -39962,9 +40308,15 @@
|
|
|
39962
40308
|
range.max = !isNaN(niceRange[1]) ? niceRange[1] : 1;
|
|
39963
40309
|
if (isNumber$6(axisOption?.min)) {
|
|
39964
40310
|
range.min = axisOption.min;
|
|
40311
|
+
if (range.min > 0) {
|
|
40312
|
+
axisOption.zero = false;
|
|
40313
|
+
}
|
|
39965
40314
|
}
|
|
39966
40315
|
if (isNumber$6(axisOption?.max)) {
|
|
39967
40316
|
range.max = axisOption.max;
|
|
40317
|
+
if (range.max < 0) {
|
|
40318
|
+
axisOption.zero = false;
|
|
40319
|
+
}
|
|
39968
40320
|
}
|
|
39969
40321
|
return merge$1({
|
|
39970
40322
|
range: range,
|
|
@@ -39973,7 +40325,7 @@
|
|
|
39973
40325
|
}
|
|
39974
40326
|
}, axisOption, {
|
|
39975
40327
|
orient: 'right',
|
|
39976
|
-
type: 'linear',
|
|
40328
|
+
type: axisOption?.type || 'linear',
|
|
39977
40329
|
label: {
|
|
39978
40330
|
flush: true
|
|
39979
40331
|
},
|
|
@@ -41101,6 +41453,7 @@
|
|
|
41101
41453
|
})(MenuType || (MenuType = {}));
|
|
41102
41454
|
const menuStyle = {
|
|
41103
41455
|
fontSize: 12,
|
|
41456
|
+
fontFamily: 'Arial,sans-serif',
|
|
41104
41457
|
color: '#000',
|
|
41105
41458
|
highlightColor: '#2E68CF',
|
|
41106
41459
|
hoverBgColor: '#EEE',
|
|
@@ -41242,6 +41595,7 @@
|
|
|
41242
41595
|
text,
|
|
41243
41596
|
textBaseline: 'top',
|
|
41244
41597
|
fontSize: menuStyle.fontSize,
|
|
41598
|
+
fontFamily: menuStyle.fontFamily,
|
|
41245
41599
|
pickable: false,
|
|
41246
41600
|
maxLineWidth: menuStyle.maxLineWidth,
|
|
41247
41601
|
ellipsis: '…'
|
|
@@ -42094,7 +42448,8 @@
|
|
|
42094
42448
|
if (!params.chartInstance) {
|
|
42095
42449
|
params.chartInstance = this.chartInstance = new params.ClassType(params.spec, {
|
|
42096
42450
|
renderCanvas: params.canvas,
|
|
42097
|
-
mode: 'desktop-browser',
|
|
42451
|
+
mode: this.attribute.mode === 'node' ? 'node' : 'desktop-browser',
|
|
42452
|
+
modeParams: this.attribute.modeParams,
|
|
42098
42453
|
canvasControled: false,
|
|
42099
42454
|
viewBox: { x1: 0, x2: 0, y1: 0, y2: 0 },
|
|
42100
42455
|
interactive: false,
|
|
@@ -42168,6 +42523,12 @@
|
|
|
42168
42523
|
static temp = 1;
|
|
42169
42524
|
deactivate() {
|
|
42170
42525
|
this.active = false;
|
|
42526
|
+
this.activeChartInstance.updateViewBox({
|
|
42527
|
+
x1: -1000,
|
|
42528
|
+
x2: -800,
|
|
42529
|
+
y1: -1000,
|
|
42530
|
+
y2: -800
|
|
42531
|
+
}, false, false);
|
|
42171
42532
|
this.activeChartInstance.release();
|
|
42172
42533
|
this.activeChartInstance = null;
|
|
42173
42534
|
}
|
|
@@ -43321,6 +43682,8 @@
|
|
|
43321
43682
|
x: padding[3],
|
|
43322
43683
|
y: padding[0],
|
|
43323
43684
|
canvas: table.canvas,
|
|
43685
|
+
mode: table.options.mode,
|
|
43686
|
+
modeParams: table.options.modeParams,
|
|
43324
43687
|
spec: chartSpec,
|
|
43325
43688
|
ClassType,
|
|
43326
43689
|
width: width - padding[3] - padding[1],
|
|
@@ -43505,6 +43868,111 @@
|
|
|
43505
43868
|
});
|
|
43506
43869
|
}
|
|
43507
43870
|
|
|
43871
|
+
function createCheckboxCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, table, cellTheme, define) {
|
|
43872
|
+
if (!cellGroup) {
|
|
43873
|
+
cellGroup = new Group({
|
|
43874
|
+
x: xOrigin,
|
|
43875
|
+
y: yOrigin,
|
|
43876
|
+
width,
|
|
43877
|
+
height,
|
|
43878
|
+
lineWidth: cellTheme?.group?.lineWidth ?? undefined,
|
|
43879
|
+
fill: cellTheme?.group?.fill ?? undefined,
|
|
43880
|
+
stroke: cellTheme?.group?.stroke ?? undefined,
|
|
43881
|
+
strokeArrayWidth: cellTheme?.group?.strokeArrayWidth ?? undefined,
|
|
43882
|
+
strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
|
|
43883
|
+
cursor: cellTheme?.group?.cursor ?? undefined,
|
|
43884
|
+
lineCap: 'square',
|
|
43885
|
+
clip: true
|
|
43886
|
+
});
|
|
43887
|
+
cellGroup.role = 'cell';
|
|
43888
|
+
cellGroup.col = col;
|
|
43889
|
+
cellGroup.row = row;
|
|
43890
|
+
columnGroup?.addChild(cellGroup);
|
|
43891
|
+
}
|
|
43892
|
+
const checkboxComponent = createCheckbox(col, row, colWidth, width, height, padding, cellTheme, define, table);
|
|
43893
|
+
if (checkboxComponent) {
|
|
43894
|
+
cellGroup.appendChild(checkboxComponent);
|
|
43895
|
+
}
|
|
43896
|
+
checkboxComponent.render();
|
|
43897
|
+
width -= padding[1] + padding[3];
|
|
43898
|
+
height -= padding[0] + padding[2];
|
|
43899
|
+
if (textAlign === 'center') {
|
|
43900
|
+
checkboxComponent.setAttribute('x', padding[3] + (width - checkboxComponent.AABBBounds.width()) / 2);
|
|
43901
|
+
}
|
|
43902
|
+
else if (textAlign === 'right') {
|
|
43903
|
+
checkboxComponent.setAttribute('x', padding[3] + width - checkboxComponent.AABBBounds.width());
|
|
43904
|
+
}
|
|
43905
|
+
else {
|
|
43906
|
+
checkboxComponent.setAttribute('x', padding[3]);
|
|
43907
|
+
}
|
|
43908
|
+
if (textBaseline === 'middle') {
|
|
43909
|
+
checkboxComponent.setAttribute('y', padding[0] + (height - checkboxComponent.AABBBounds.height()) / 2);
|
|
43910
|
+
}
|
|
43911
|
+
else if (textBaseline === 'bottom') {
|
|
43912
|
+
checkboxComponent.setAttribute('y', padding[0] + height - checkboxComponent.AABBBounds.height());
|
|
43913
|
+
}
|
|
43914
|
+
else {
|
|
43915
|
+
checkboxComponent.setAttribute('y', padding[0]);
|
|
43916
|
+
}
|
|
43917
|
+
return cellGroup;
|
|
43918
|
+
}
|
|
43919
|
+
function createCheckbox(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, table) {
|
|
43920
|
+
const value = table.getCellValue(col, row);
|
|
43921
|
+
const dataValue = table.getCellOriginValue(col, row);
|
|
43922
|
+
let isChecked;
|
|
43923
|
+
let isDisabled;
|
|
43924
|
+
let text = value;
|
|
43925
|
+
if (isObject$4(value)) {
|
|
43926
|
+
isChecked = value.checked;
|
|
43927
|
+
isDisabled = value.disable;
|
|
43928
|
+
text = value.text;
|
|
43929
|
+
}
|
|
43930
|
+
const hierarchyOffset = getHierarchyOffset(col, row, table);
|
|
43931
|
+
const cellStyle = table._getCellStyle(col, row);
|
|
43932
|
+
const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;
|
|
43933
|
+
const { lineClamp } = cellStyle;
|
|
43934
|
+
const { checked, disable } = define;
|
|
43935
|
+
const globalChecked = getOrApply(checked, {
|
|
43936
|
+
col,
|
|
43937
|
+
row,
|
|
43938
|
+
table,
|
|
43939
|
+
context: null,
|
|
43940
|
+
value,
|
|
43941
|
+
dataValue
|
|
43942
|
+
});
|
|
43943
|
+
const globalDisable = getOrApply(disable, {
|
|
43944
|
+
col,
|
|
43945
|
+
row,
|
|
43946
|
+
table,
|
|
43947
|
+
context: null,
|
|
43948
|
+
value,
|
|
43949
|
+
dataValue
|
|
43950
|
+
});
|
|
43951
|
+
const autoColWidth = colWidth === 'auto';
|
|
43952
|
+
const autoRowHeight = table.heightMode === 'autoHeight';
|
|
43953
|
+
const attribute = {
|
|
43954
|
+
text: text.length === 1 && !autoWrapText ? text[0] : text,
|
|
43955
|
+
maxLineWidth: autoColWidth ? Infinity : cellWidth - (padding[1] + padding[3] + hierarchyOffset),
|
|
43956
|
+
textBaseline: 'top',
|
|
43957
|
+
autoWrapText,
|
|
43958
|
+
lineClamp,
|
|
43959
|
+
wordBreak: 'break-word',
|
|
43960
|
+
heightLimit: autoRowHeight ? -1 : cellHeight - (padding[0] + padding[2]),
|
|
43961
|
+
pickable: false,
|
|
43962
|
+
dx: hierarchyOffset
|
|
43963
|
+
};
|
|
43964
|
+
const testAttribute = cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute;
|
|
43965
|
+
const checkbox = new CheckBox({
|
|
43966
|
+
x: 0,
|
|
43967
|
+
y: 0,
|
|
43968
|
+
text: testAttribute,
|
|
43969
|
+
checked: isChecked ?? globalChecked ?? false,
|
|
43970
|
+
disabled: isDisabled ?? globalDisable ?? false
|
|
43971
|
+
});
|
|
43972
|
+
checkbox.name = 'checkbox';
|
|
43973
|
+
return checkbox;
|
|
43974
|
+
}
|
|
43975
|
+
|
|
43508
43976
|
function createCell(type, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, isMerge, range, cellTheme) {
|
|
43509
43977
|
let bgColorFunc;
|
|
43510
43978
|
if (table.internalProps?.dataConfig?.mappingRules && !table.isHeader(col, row)) {
|
|
@@ -43619,47 +44087,13 @@
|
|
|
43619
44087
|
else if (type === 'sparkline') {
|
|
43620
44088
|
cellGroup = createSparkLineCellGroup(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme);
|
|
43621
44089
|
}
|
|
44090
|
+
else if (type === 'checkbox') {
|
|
44091
|
+
cellGroup = createCheckboxCellGroup(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define);
|
|
44092
|
+
}
|
|
43622
44093
|
return cellGroup;
|
|
43623
44094
|
}
|
|
43624
44095
|
function updateCell$1(col, row, table, addNew) {
|
|
43625
44096
|
const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
|
|
43626
|
-
const cellStyle = table._getCellStyle(col, row);
|
|
43627
|
-
const autoWrapText = cellStyle.autoWrapText ?? table.internalProps.autoWrapText;
|
|
43628
|
-
const cellTheme = getStyleTheme(cellStyle, table, col, row, getProp).theme;
|
|
43629
|
-
if (!addNew && canUseFastUpdate(col, row, oldCellGroup, autoWrapText, table)) {
|
|
43630
|
-
const cellWidth = table.getColWidth(col);
|
|
43631
|
-
const cellHeight = table.getRowHeight(row);
|
|
43632
|
-
oldCellGroup.setAttributes({
|
|
43633
|
-
width: cellWidth,
|
|
43634
|
-
height: cellHeight,
|
|
43635
|
-
lineWidth: cellTheme?.group?.lineWidth ?? undefined,
|
|
43636
|
-
fill: cellTheme?.group?.fill ?? undefined,
|
|
43637
|
-
stroke: cellTheme?.group?.stroke ?? undefined,
|
|
43638
|
-
strokeArrayWidth: cellTheme?.group?.strokeArrayWidth ?? undefined,
|
|
43639
|
-
strokeArrayColor: cellTheme?.group?.strokeArrayColor ?? undefined,
|
|
43640
|
-
cursor: cellTheme?.group?.cursor ?? undefined
|
|
43641
|
-
});
|
|
43642
|
-
const textMark = oldCellGroup.getChildByName('text');
|
|
43643
|
-
if (textMark) {
|
|
43644
|
-
const text = table.getCellValue(col, row);
|
|
43645
|
-
const hierarchyOffset = getHierarchyOffset(col, row, table);
|
|
43646
|
-
const lineClamp = cellStyle.lineClamp;
|
|
43647
|
-
const padding = getQuadProps(getProp('padding', cellStyle, col, row, table)) ?? [0, 0, 0, 0];
|
|
43648
|
-
const attribute = {
|
|
43649
|
-
text: text.length === 1 && !autoWrapText ? text[0] : text,
|
|
43650
|
-
maxLineWidth: cellWidth - (padding[1] + padding[3] + hierarchyOffset),
|
|
43651
|
-
textBaseline: 'top',
|
|
43652
|
-
autoWrapText,
|
|
43653
|
-
lineClamp,
|
|
43654
|
-
wordBreak: 'break-word',
|
|
43655
|
-
heightLimit: cellHeight - (padding[0] + padding[2]),
|
|
43656
|
-
pickable: false,
|
|
43657
|
-
dx: hierarchyOffset
|
|
43658
|
-
};
|
|
43659
|
-
textMark.setAttributes(cellTheme.text ? Object.assign({}, cellTheme.text, attribute) : attribute);
|
|
43660
|
-
}
|
|
43661
|
-
return oldCellGroup;
|
|
43662
|
-
}
|
|
43663
44097
|
if (!addNew && oldCellGroup.role === 'empty') {
|
|
43664
44098
|
return undefined;
|
|
43665
44099
|
}
|
|
@@ -43697,6 +44131,8 @@
|
|
|
43697
44131
|
}
|
|
43698
44132
|
else {
|
|
43699
44133
|
const mayHaveIcon = cellLocation !== 'body' ? true : !!define?.icon || !!define?.tree;
|
|
44134
|
+
const headerStyle = table._getCellStyle(col, row);
|
|
44135
|
+
const cellTheme = getStyleTheme(headerStyle, table, col, row, getProp).theme;
|
|
43700
44136
|
const padding = cellTheme._vtable.padding;
|
|
43701
44137
|
const textAlign = cellTheme._vtable.textAlign;
|
|
43702
44138
|
const textBaseline = cellTheme._vtable.textBaseline;
|
|
@@ -43750,21 +44186,6 @@
|
|
|
43750
44186
|
}
|
|
43751
44187
|
return newCellGroup;
|
|
43752
44188
|
}
|
|
43753
|
-
function canUseFastUpdate(col, row, oldCellGroup, autoWrapText, table) {
|
|
43754
|
-
const define = table.getBodyColumnDefine(col, row);
|
|
43755
|
-
const mayHaveIcon = !!define?.icon || !!define?.tree;
|
|
43756
|
-
const cellType = table.getBodyColumnType(col, row);
|
|
43757
|
-
const autoRowHeight = table.heightMode === 'autoHeight';
|
|
43758
|
-
if (!table.isHeader(col, row) &&
|
|
43759
|
-
oldCellGroup.role === 'cell' &&
|
|
43760
|
-
cellType === 'text' &&
|
|
43761
|
-
!autoWrapText &&
|
|
43762
|
-
!autoRowHeight &&
|
|
43763
|
-
!mayHaveIcon) {
|
|
43764
|
-
return true;
|
|
43765
|
-
}
|
|
43766
|
-
return false;
|
|
43767
|
-
}
|
|
43768
44189
|
|
|
43769
44190
|
function createComplexColumn(columnGroup, col, colWidth, rowStart, rowEnd, mergeMap, defaultRowHeight, table, cellLocation, rowLimit) {
|
|
43770
44191
|
let maxWidth = 0;
|
|
@@ -43948,7 +44369,7 @@
|
|
|
43948
44369
|
createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, 'body', table);
|
|
43949
44370
|
}
|
|
43950
44371
|
createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, Math.min(proxy.firstScreenColLimit, table.colCount - 1 - table.rightFrozenColCount), table.columnHeaderLevelCount, Math.min(proxy.firstScreenRowLimit, table.rowCount - 1 - table.bottomFrozenRowCount), 'body', table);
|
|
43951
|
-
if (!bodyGroup.firstChild) {
|
|
44372
|
+
if (!bodyGroup.firstChild && !colHeaderGroup.firstChild) {
|
|
43952
44373
|
proxy.currentRow = proxy.totalRow;
|
|
43953
44374
|
proxy.rowEnd = proxy.currentRow;
|
|
43954
44375
|
proxy.rowUpdatePos = proxy.rowEnd;
|
|
@@ -43963,7 +44384,8 @@
|
|
|
43963
44384
|
proxy.rowEnd = proxy.currentRow;
|
|
43964
44385
|
proxy.rowUpdatePos = proxy.rowEnd;
|
|
43965
44386
|
proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2);
|
|
43966
|
-
proxy.currentCol =
|
|
44387
|
+
proxy.currentCol =
|
|
44388
|
+
bodyGroup.lastChild?.col ?? colHeaderGroup.lastChild?.col ?? proxy.totalCol;
|
|
43967
44389
|
proxy.colEnd = proxy.currentCol;
|
|
43968
44390
|
proxy.colUpdatePos = proxy.colEnd;
|
|
43969
44391
|
proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2);
|
|
@@ -44179,7 +44601,7 @@
|
|
|
44179
44601
|
updateColContent(syncLeftCol, syncRightCol, proxy);
|
|
44180
44602
|
checkFirstColMerge(distStartCol, proxy);
|
|
44181
44603
|
updateAutoColumn(syncLeftCol, syncRightCol, proxy.table, direction);
|
|
44182
|
-
const colGroup = proxy.table.scenegraph.getColGroup(screenLeftCol);
|
|
44604
|
+
const colGroup = proxy.table.scenegraph.getColGroup(screenLeftCol) || proxy.table.scenegraph.getColGroup(screenLeftCol, true);
|
|
44183
44605
|
const deltaX = screenLeftX - (colGroup.attribute.x + proxy.table.getFrozenColsWidth() + proxy.table.scenegraph.proxy.deltaX);
|
|
44184
44606
|
proxy.table.scenegraph.proxy.deltaX += deltaX;
|
|
44185
44607
|
proxy.currentCol = direction === 'left' ? proxy.currentCol + count : proxy.currentCol - count;
|
|
@@ -44445,27 +44867,18 @@
|
|
|
44445
44867
|
function updatePartRowPosition(startRow, endRow, direction, proxy) {
|
|
44446
44868
|
for (let col = 0; col < proxy.table.frozenColCount; col++) {
|
|
44447
44869
|
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
44448
|
-
if (!colGroup) {
|
|
44449
|
-
continue;
|
|
44450
|
-
}
|
|
44451
44870
|
for (let row = startRow; row <= endRow; row++) {
|
|
44452
44871
|
updateCellGroupPosition(colGroup, direction, proxy);
|
|
44453
44872
|
}
|
|
44454
44873
|
}
|
|
44455
44874
|
for (let col = proxy.table.colCount - proxy.table.rightFrozenColCount; col < proxy.table.colCount; col++) {
|
|
44456
44875
|
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
44457
|
-
if (!colGroup) {
|
|
44458
|
-
continue;
|
|
44459
|
-
}
|
|
44460
44876
|
for (let row = startRow; row <= endRow; row++) {
|
|
44461
44877
|
updateCellGroupPosition(colGroup, direction, proxy);
|
|
44462
44878
|
}
|
|
44463
44879
|
}
|
|
44464
44880
|
for (let col = proxy.bodyLeftCol; col <= proxy.bodyRightCol; col++) {
|
|
44465
44881
|
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
44466
|
-
if (!colGroup) {
|
|
44467
|
-
continue;
|
|
44468
|
-
}
|
|
44469
44882
|
for (let row = startRow; row <= endRow; row++) {
|
|
44470
44883
|
updateCellGroupPosition(colGroup, direction, proxy);
|
|
44471
44884
|
}
|
|
@@ -44583,7 +44996,7 @@
|
|
|
44583
44996
|
isRelease = false;
|
|
44584
44997
|
mode = 'column';
|
|
44585
44998
|
isProgressing;
|
|
44586
|
-
rowLimit =
|
|
44999
|
+
rowLimit = 1000;
|
|
44587
45000
|
currentRow = 0;
|
|
44588
45001
|
totalRow;
|
|
44589
45002
|
yLimitTop;
|
|
@@ -44655,7 +45068,7 @@
|
|
|
44655
45068
|
this.xLimitRight = totalWidth - totalBodyWidth / 2;
|
|
44656
45069
|
const widthLimit = this.table.tableNoFrameWidth * 5;
|
|
44657
45070
|
this.screenColCount = Math.ceil(this.table.tableNoFrameWidth / defaultColWidth);
|
|
44658
|
-
this.firstScreenColLimit = this.bodyLeftCol + Math.ceil(widthLimit / defaultColWidth);
|
|
45071
|
+
this.firstScreenColLimit = this.bodyLeftCol + Math.min(this.colLimit, Math.ceil(widthLimit / defaultColWidth));
|
|
44659
45072
|
this.colUpdatePos = this.bodyRightCol;
|
|
44660
45073
|
}
|
|
44661
45074
|
setParamsForRow() {
|
|
@@ -44672,7 +45085,7 @@
|
|
|
44672
45085
|
this.yLimitBottom = totalHeight - totalBodyHeight / 2;
|
|
44673
45086
|
const heightLimit = this.table.tableNoFrameHeight * 5;
|
|
44674
45087
|
this.screenRowCount = Math.ceil(this.table.tableNoFrameHeight / defaultRowHeight);
|
|
44675
|
-
this.firstScreenRowLimit = this.bodyTopRow + Math.ceil(heightLimit / defaultRowHeight);
|
|
45088
|
+
this.firstScreenRowLimit = this.bodyTopRow + Math.min(this.rowLimit, Math.ceil(heightLimit / defaultRowHeight));
|
|
44676
45089
|
this.rowUpdatePos = this.bodyBottomRow;
|
|
44677
45090
|
}
|
|
44678
45091
|
async createGroupForFirstScreen(cornerHeaderGroup, colHeaderGroup, rowHeaderGroup, rightFrozenGroup, bottomFrozenGroup, bodyGroup, xOrigin, yOrigin) {
|
|
@@ -44787,9 +45200,17 @@
|
|
|
44787
45200
|
const yOrigin = lastColumnGroup.attribute.y;
|
|
44788
45201
|
createColGroup(this.table.scenegraph.bottomFrozenGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, this.table.rowCount - this.table.bottomFrozenRowCount, this.table.rowCount - 1, 'columnHeader', this.table);
|
|
44789
45202
|
}
|
|
44790
|
-
|
|
44791
|
-
|
|
44792
|
-
|
|
45203
|
+
let lastColumnGroup = this.table.scenegraph.bodyGroup.lastChild &&
|
|
45204
|
+
(this.table.scenegraph.bodyGroup.lastChild instanceof Group
|
|
45205
|
+
? this.table.scenegraph.bodyGroup.lastChild
|
|
45206
|
+
: this.table.scenegraph.bodyGroup.lastChild._prev);
|
|
45207
|
+
if (!lastColumnGroup) {
|
|
45208
|
+
lastColumnGroup =
|
|
45209
|
+
this.table.scenegraph.colHeaderGroup.lastChild &&
|
|
45210
|
+
(this.table.scenegraph.colHeaderGroup.lastChild instanceof Group
|
|
45211
|
+
? this.table.scenegraph.colHeaderGroup.lastChild
|
|
45212
|
+
: this.table.scenegraph.colHeaderGroup.lastChild._prev);
|
|
45213
|
+
}
|
|
44793
45214
|
const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;
|
|
44794
45215
|
const yOrigin = lastColumnGroup.attribute.y;
|
|
44795
45216
|
createColGroup(this.table.scenegraph.bodyGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, this.rowStart, this.rowEnd, 'body', this.table);
|
|
@@ -45812,7 +46233,7 @@
|
|
|
45812
46233
|
function updateChartSize(scenegraph, col) {
|
|
45813
46234
|
for (let c = col; c <= scenegraph.proxy.colEnd; c++) {
|
|
45814
46235
|
const columnGroup = scenegraph.getColGroup(c);
|
|
45815
|
-
columnGroup
|
|
46236
|
+
columnGroup?.getChildren()?.forEach((cellNode) => {
|
|
45816
46237
|
const width = scenegraph.table.getColWidth(cellNode.col);
|
|
45817
46238
|
const height = scenegraph.table.getRowHeight(cellNode.row);
|
|
45818
46239
|
cellNode.children.forEach((node) => {
|
|
@@ -45828,7 +46249,7 @@
|
|
|
45828
46249
|
function clearChartCacheImage(scenegraph) {
|
|
45829
46250
|
for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
|
|
45830
46251
|
const columnGroup = scenegraph.getColGroup(c);
|
|
45831
|
-
columnGroup
|
|
46252
|
+
columnGroup?.getChildren()?.forEach((cellNode) => {
|
|
45832
46253
|
cellNode.children.forEach((node) => {
|
|
45833
46254
|
if (node.type === 'chart') {
|
|
45834
46255
|
node.cacheCanvas = null;
|
|
@@ -45842,7 +46263,7 @@
|
|
|
45842
46263
|
const table = scenegraph.table;
|
|
45843
46264
|
for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
|
|
45844
46265
|
const columnGroup = scenegraph.getColGroup(c);
|
|
45845
|
-
columnGroup
|
|
46266
|
+
columnGroup?.getChildren()?.forEach((cellNode) => {
|
|
45846
46267
|
const col = cellNode.col;
|
|
45847
46268
|
const row = cellNode.row;
|
|
45848
46269
|
cellNode.children.forEach((node) => {
|
|
@@ -46057,13 +46478,13 @@
|
|
|
46057
46478
|
}
|
|
46058
46479
|
class FastTextMeasureContribution extends DefaultTextMeasureContribution {
|
|
46059
46480
|
measureTextWidth(text, options) {
|
|
46060
|
-
const { fontSize, fontFamily = 'sans-serif', fontWeight = 'normal', fontStyle = 'normal' } = options;
|
|
46481
|
+
const { fontSize, fontFamily = 'Arial,sans-serif', fontWeight = 'normal', fontStyle = 'normal' } = options;
|
|
46061
46482
|
const fastTextMeasure = getFastTextMeasure(fontSize, fontWeight, fontFamily, fontStyle);
|
|
46062
46483
|
const textMeasure = fastTextMeasure.measure(text);
|
|
46063
46484
|
return textMeasure.width;
|
|
46064
46485
|
}
|
|
46065
46486
|
measureText(text, options) {
|
|
46066
|
-
const { fontSize, fontFamily = 'sans-serif', fontWeight = 'normal', fontStyle = 'normal' } = options;
|
|
46487
|
+
const { fontSize, fontFamily = 'Arial,sans-serif', fontWeight = 'normal', fontStyle = 'normal' } = options;
|
|
46067
46488
|
const fastTextMeasure = getFastTextMeasure(fontSize, fontWeight, fontFamily, fontStyle);
|
|
46068
46489
|
const textMeasure = fastTextMeasure.measure(text);
|
|
46069
46490
|
return textMeasure;
|
|
@@ -46071,13 +46492,13 @@
|
|
|
46071
46492
|
}
|
|
46072
46493
|
class TextMeasureTool {
|
|
46073
46494
|
measureText(text, options) {
|
|
46074
|
-
const { fontSize, fontFamily = 'sans-serif', fontWeight = 'normal', fontStyle = 'normal' } = options;
|
|
46495
|
+
const { fontSize, fontFamily = 'Arial,sans-serif', fontWeight = 'normal', fontStyle = 'normal' } = options;
|
|
46075
46496
|
const fastTextMeasure = getFastTextMeasure(fontSize, fontWeight, fontFamily, fontStyle);
|
|
46076
46497
|
const textMeasure = fastTextMeasure.measure(text);
|
|
46077
46498
|
return textMeasure;
|
|
46078
46499
|
}
|
|
46079
46500
|
measureTextWidth(text, options) {
|
|
46080
|
-
const { fontSize, fontFamily = 'sans-serif', fontWeight = 'normal', fontStyle = 'normal' } = options;
|
|
46501
|
+
const { fontSize, fontFamily = 'Arial,sans-serif', fontWeight = 'normal', fontStyle = 'normal' } = options;
|
|
46081
46502
|
const fastTextMeasure = getFastTextMeasure(fontSize, fontWeight, fontFamily, fontStyle);
|
|
46082
46503
|
const textMeasure = fastTextMeasure.measure(text);
|
|
46083
46504
|
return textMeasure.width;
|
|
@@ -46211,11 +46632,22 @@
|
|
|
46211
46632
|
this.clear = true;
|
|
46212
46633
|
this.mergeMap = new Map();
|
|
46213
46634
|
setPoptipTheme(poptipStyle);
|
|
46214
|
-
|
|
46635
|
+
let width;
|
|
46636
|
+
let height;
|
|
46637
|
+
if (Env.mode === 'node') {
|
|
46638
|
+
vglobal.setEnv('node', table.options.modeParams);
|
|
46639
|
+
width = table.canvasWidth;
|
|
46640
|
+
height = table.canvasHeight;
|
|
46641
|
+
}
|
|
46642
|
+
else {
|
|
46643
|
+
vglobal.setEnv('browser');
|
|
46644
|
+
width = table.canvas.width;
|
|
46645
|
+
height = table.canvas.height;
|
|
46646
|
+
}
|
|
46215
46647
|
this.stage = createStage({
|
|
46216
46648
|
canvas: table.canvas,
|
|
46217
|
-
width
|
|
46218
|
-
height
|
|
46649
|
+
width,
|
|
46650
|
+
height,
|
|
46219
46651
|
disableDirtyBounds: false,
|
|
46220
46652
|
background: table.theme.underlayBackgroundColor,
|
|
46221
46653
|
dpr: table.internalProps.pixelRatio,
|
|
@@ -49380,6 +49812,18 @@
|
|
|
49380
49812
|
table.fireListeners(TABLE_EVENT_TYPE.DBLCLICK_CELL, cellsEvent);
|
|
49381
49813
|
}
|
|
49382
49814
|
});
|
|
49815
|
+
table.scenegraph.tableGroup.addEventListener('checkbox_state_change', (e) => {
|
|
49816
|
+
const eventArgsSet = getCellEventArgsSet(e);
|
|
49817
|
+
const { col, row } = eventArgsSet.eventArgs;
|
|
49818
|
+
const cellInfo = table.getCellInfo(col, row);
|
|
49819
|
+
const cellsEvent = {
|
|
49820
|
+
...cellInfo,
|
|
49821
|
+
event: e.nativeEvent,
|
|
49822
|
+
target: eventArgsSet?.eventArgs?.target,
|
|
49823
|
+
checked: e.detail.checked
|
|
49824
|
+
};
|
|
49825
|
+
table.fireListeners(TABLE_EVENT_TYPE.CHECKBOX_STATE_CHANGE, cellsEvent);
|
|
49826
|
+
});
|
|
49383
49827
|
}
|
|
49384
49828
|
function endResizeCol(table) {
|
|
49385
49829
|
table.stateManeger.endResizeCol();
|
|
@@ -49493,7 +49937,8 @@
|
|
|
49493
49937
|
}
|
|
49494
49938
|
state.resetInteractionState();
|
|
49495
49939
|
if (event.cancelable &&
|
|
49496
|
-
((deltaY
|
|
49940
|
+
((Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable(deltaY, state)) ||
|
|
49941
|
+
(Math.abs(deltaY) <= Math.abs(deltaX) && deltaX !== 0 && isHorizontalScrollable(deltaX, state)))) {
|
|
49497
49942
|
event.preventDefault();
|
|
49498
49943
|
}
|
|
49499
49944
|
}
|
|
@@ -49622,8 +50067,8 @@
|
|
|
49622
50067
|
eventManeger.touchMovePoints[eventManeger.touchMovePoints.length - 2].y;
|
|
49623
50068
|
handleWhell({ deltaX, deltaY }, stateManeger);
|
|
49624
50069
|
if (e.cancelable &&
|
|
49625
|
-
((deltaY !== 0 && isVerticalScrollable(deltaY, stateManeger)) ||
|
|
49626
|
-
(deltaX !== 0 && isHorizontalScrollable(deltaX, stateManeger)))) {
|
|
50070
|
+
((Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable(deltaY, stateManeger)) ||
|
|
50071
|
+
(Math.abs(deltaY) <= Math.abs(deltaX) && deltaX !== 0 && isHorizontalScrollable(deltaX, stateManeger)))) {
|
|
49627
50072
|
e.preventDefault();
|
|
49628
50073
|
}
|
|
49629
50074
|
}, { passive: false });
|
|
@@ -49830,6 +50275,9 @@
|
|
|
49830
50275
|
touchMove;
|
|
49831
50276
|
constructor(table) {
|
|
49832
50277
|
this.table = table;
|
|
50278
|
+
if (Env.mode === 'node') {
|
|
50279
|
+
return;
|
|
50280
|
+
}
|
|
49833
50281
|
this.bindOuterEvent();
|
|
49834
50282
|
setTimeout(() => {
|
|
49835
50283
|
this.bindSelfEvent();
|
|
@@ -49921,6 +50369,9 @@
|
|
|
49921
50369
|
}
|
|
49922
50370
|
const { eventArgs } = eventArgsSet;
|
|
49923
50371
|
if (eventArgs) {
|
|
50372
|
+
if (eventArgs.target.name === 'checkbox') {
|
|
50373
|
+
return false;
|
|
50374
|
+
}
|
|
49924
50375
|
if (this.table.isPivotChart() &&
|
|
49925
50376
|
(eventArgsSet?.eventArgs?.target.name === 'axis-label' || eventArgsSet?.eventArgs?.target.type === 'chart')) {
|
|
49926
50377
|
this.table.stateManeger.updateSelectPos(-1, -1);
|
|
@@ -50009,7 +50460,7 @@
|
|
|
50009
50460
|
}
|
|
50010
50461
|
}
|
|
50011
50462
|
|
|
50012
|
-
let defaultStyle$
|
|
50463
|
+
let defaultStyle$2;
|
|
50013
50464
|
const DEFAULT_BAR_COLOR = (args) => {
|
|
50014
50465
|
const num = args.value;
|
|
50015
50466
|
if (Number(num) > 80) {
|
|
@@ -50040,7 +50491,7 @@
|
|
|
50040
50491
|
_barMarkPosition;
|
|
50041
50492
|
_barRightToLeft;
|
|
50042
50493
|
static get DEFAULT() {
|
|
50043
|
-
return defaultStyle$
|
|
50494
|
+
return defaultStyle$2 ? defaultStyle$2 : (defaultStyle$2 = new ProgressBarStyle());
|
|
50044
50495
|
}
|
|
50045
50496
|
constructor(style = {}, bodyStyle = {}) {
|
|
50046
50497
|
super(style, bodyStyle);
|
|
@@ -50178,6 +50629,19 @@
|
|
|
50178
50629
|
];
|
|
50179
50630
|
const iconPropKeys = ICON_PROP_KEYS;
|
|
50180
50631
|
|
|
50632
|
+
let defaultStyle$1;
|
|
50633
|
+
class CheckboxStyle extends Style$1 {
|
|
50634
|
+
static get DEFAULT() {
|
|
50635
|
+
return defaultStyle$1 ? defaultStyle$1 : (defaultStyle$1 = new CheckboxStyle());
|
|
50636
|
+
}
|
|
50637
|
+
constructor(style = {}, bodyStyle = {}) {
|
|
50638
|
+
super(style, bodyStyle);
|
|
50639
|
+
}
|
|
50640
|
+
clone() {
|
|
50641
|
+
return new CheckboxStyle(this, null);
|
|
50642
|
+
}
|
|
50643
|
+
}
|
|
50644
|
+
|
|
50181
50645
|
class BodyHelper {
|
|
50182
50646
|
expandIcon;
|
|
50183
50647
|
collapseIcon;
|
|
@@ -50256,6 +50720,8 @@
|
|
|
50256
50720
|
return Style$1;
|
|
50257
50721
|
case 'progressbar':
|
|
50258
50722
|
return ProgressBarStyle;
|
|
50723
|
+
case 'checkbox':
|
|
50724
|
+
return CheckboxStyle;
|
|
50259
50725
|
}
|
|
50260
50726
|
}
|
|
50261
50727
|
getCellIconFromRecordValue(icon, col, row) {
|
|
@@ -50301,6 +50767,9 @@
|
|
|
50301
50767
|
}
|
|
50302
50768
|
|
|
50303
50769
|
function importStyle$1() {
|
|
50770
|
+
if (Env.mode === 'node') {
|
|
50771
|
+
return;
|
|
50772
|
+
}
|
|
50304
50773
|
const styleElement = document.createElement('style');
|
|
50305
50774
|
styleElement.id = 'vtable-menu-styleSheet';
|
|
50306
50775
|
styleElement.textContent = `
|
|
@@ -51236,6 +51705,9 @@
|
|
|
51236
51705
|
}
|
|
51237
51706
|
|
|
51238
51707
|
function importStyle() {
|
|
51708
|
+
if (Env.mode === 'node') {
|
|
51709
|
+
return;
|
|
51710
|
+
}
|
|
51239
51711
|
const styleElement = document.createElement('style');
|
|
51240
51712
|
styleElement.id = 'vtable-tooltip-styleSheet';
|
|
51241
51713
|
styleElement.textContent = `
|
|
@@ -51341,7 +51813,10 @@
|
|
|
51341
51813
|
(messageElement.style.backgroundColor = tooltipInstanceInfo?.style?.bgColor);
|
|
51342
51814
|
tooltipInstanceInfo?.style?.bgColor && (triangle.style.backgroundColor = tooltipInstanceInfo?.style?.bgColor);
|
|
51343
51815
|
triangle.style.display = tooltipInstanceInfo?.style?.arrowMark === true ? 'block' : 'none';
|
|
51344
|
-
tooltipInstanceInfo?.style?.
|
|
51816
|
+
tooltipInstanceInfo?.style?.fontSize &&
|
|
51817
|
+
(messageElement.style.fontSize = (tooltipInstanceInfo?.style?.fontSize ?? 12) + 'px');
|
|
51818
|
+
tooltipInstanceInfo?.style?.fontFamily &&
|
|
51819
|
+
(messageElement.style.fontFamily = tooltipInstanceInfo?.style?.fontFamily);
|
|
51345
51820
|
tooltipInstanceInfo?.style?.color && (messageElement.style.color = tooltipInstanceInfo?.style?.color);
|
|
51346
51821
|
tooltipInstanceInfo?.style?.padding &&
|
|
51347
51822
|
(messageElement.style.padding = `${tooltipInstanceInfo?.style?.padding.join('px ')}px`);
|
|
@@ -52793,7 +53268,7 @@
|
|
|
52793
53268
|
return TABLE_EVENT_TYPE;
|
|
52794
53269
|
}
|
|
52795
53270
|
options;
|
|
52796
|
-
version = "0.13.0
|
|
53271
|
+
version = "0.13.0";
|
|
52797
53272
|
pagination;
|
|
52798
53273
|
id = `VTable${Date.now()}`;
|
|
52799
53274
|
headerStyleCache;
|
|
@@ -52802,10 +53277,10 @@
|
|
|
52802
53277
|
isReleased = false;
|
|
52803
53278
|
constructor(container, options = {}) {
|
|
52804
53279
|
super();
|
|
52805
|
-
if (!container) {
|
|
53280
|
+
if (!container && options.mode !== 'node') {
|
|
52806
53281
|
throw new Error("vtable's container is undefined");
|
|
52807
53282
|
}
|
|
52808
|
-
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, autoFillHeight = false, keyboardOptions, columnResizeMode, dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio, renderChartAsync, renderChartAsyncBatchCount } = options;
|
|
53283
|
+
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, autoFillHeight = false, keyboardOptions, columnResizeMode, dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio, renderChartAsync, renderChartAsyncBatchCount, mode, modeParams, canvasWidth, canvasHeight } = options;
|
|
52809
53284
|
this.container = container;
|
|
52810
53285
|
this.options = options;
|
|
52811
53286
|
this.options.container = container;
|
|
@@ -52831,18 +53306,22 @@
|
|
|
52831
53306
|
}
|
|
52832
53307
|
this.tableNoFrameWidth = 0;
|
|
52833
53308
|
this.tableNoFrameHeight = 0;
|
|
53309
|
+
this.canvasWidth = canvasWidth;
|
|
53310
|
+
this.canvasHeight = canvasHeight;
|
|
52834
53311
|
const internalProps = (this.internalProps = {});
|
|
52835
53312
|
showFrozenIcon !== undefined && (this.showFrozenIcon = showFrozenIcon);
|
|
52836
53313
|
if (typeof allowFrozenColCount === 'number' && allowFrozenColCount <= 0) {
|
|
52837
53314
|
this.showFrozenIcon = false;
|
|
52838
53315
|
}
|
|
53316
|
+
if (Env.mode !== 'node') {
|
|
53317
|
+
internalProps.element = createRootElement(this.padding);
|
|
53318
|
+
internalProps.focusControl = new FocusInput(this, internalProps.element);
|
|
53319
|
+
internalProps.canvas = document.createElement('canvas');
|
|
53320
|
+
internalProps.element.appendChild(internalProps.canvas);
|
|
53321
|
+
internalProps.context = internalProps.canvas.getContext('2d');
|
|
53322
|
+
}
|
|
52839
53323
|
internalProps.handler = new EventHandler();
|
|
52840
|
-
internalProps.element = createRootElement(this.padding);
|
|
52841
|
-
internalProps.focusControl = new FocusInput(this, internalProps.element);
|
|
52842
53324
|
internalProps.pixelRatio = pixelRatio;
|
|
52843
|
-
internalProps.canvas = document.createElement('canvas');
|
|
52844
|
-
internalProps.element.appendChild(internalProps.canvas);
|
|
52845
|
-
internalProps.context = internalProps.canvas.getContext('2d');
|
|
52846
53325
|
internalProps.frozenColCount = frozenColCount;
|
|
52847
53326
|
internalProps.defaultRowHeight = defaultRowHeight;
|
|
52848
53327
|
internalProps.defaultHeaderRowHeight = defaultHeaderRowHeight ?? defaultRowHeight;
|
|
@@ -52863,6 +53342,9 @@
|
|
|
52863
53342
|
internalProps.calcWidthContext = {
|
|
52864
53343
|
_: internalProps,
|
|
52865
53344
|
get full() {
|
|
53345
|
+
if (Env.mode === 'node') {
|
|
53346
|
+
return canvasWidth / (pixelRatio ?? 1);
|
|
53347
|
+
}
|
|
52866
53348
|
return this._.canvas.width / (this._.context.pixelRatio ?? window.devicePixelRatio);
|
|
52867
53349
|
}
|
|
52868
53350
|
};
|
|
@@ -54849,6 +55331,29 @@
|
|
|
54849
55331
|
}
|
|
54850
55332
|
return base64Image;
|
|
54851
55333
|
}
|
|
55334
|
+
exportCanvas() {
|
|
55335
|
+
const c = this.scenegraph.stage.toCanvas();
|
|
55336
|
+
return c;
|
|
55337
|
+
}
|
|
55338
|
+
getImageBuffer(type = 'image/png') {
|
|
55339
|
+
if (this.options.mode !== 'node') {
|
|
55340
|
+
return;
|
|
55341
|
+
}
|
|
55342
|
+
const stage = this.scenegraph.stage;
|
|
55343
|
+
if (stage) {
|
|
55344
|
+
const contentWidth = this.tableX + this.getAllColsWidth();
|
|
55345
|
+
const contentHeight = this.tableY + this.getAllRowsHeight();
|
|
55346
|
+
if (contentWidth >= this.canvasWidth && contentHeight >= this.canvasHeight) {
|
|
55347
|
+
stage.render();
|
|
55348
|
+
const buffer = stage.window.getImageBuffer(type);
|
|
55349
|
+
return buffer;
|
|
55350
|
+
}
|
|
55351
|
+
const newCanvas = this.scenegraph.stage.toCanvas(false, new AABBBounds().set(0, 0, Math.min(this.canvasWidth, contentWidth), Math.min(this.canvasHeight, contentHeight)));
|
|
55352
|
+
const buffer = newCanvas.toBuffer(type);
|
|
55353
|
+
return buffer;
|
|
55354
|
+
}
|
|
55355
|
+
return null;
|
|
55356
|
+
}
|
|
54852
55357
|
}
|
|
54853
55358
|
|
|
54854
55359
|
var core = /*#__PURE__*/Object.freeze({
|
|
@@ -55045,7 +55550,7 @@
|
|
|
55045
55550
|
axes.push(merge$1({
|
|
55046
55551
|
range
|
|
55047
55552
|
}, axisOption, {
|
|
55048
|
-
type: 'linear',
|
|
55553
|
+
type: axisOption?.type || 'linear',
|
|
55049
55554
|
orient: index === 0 ? 'bottom' : 'top',
|
|
55050
55555
|
label: { visible: false },
|
|
55051
55556
|
title: { visible: false },
|
|
@@ -55106,7 +55611,7 @@
|
|
|
55106
55611
|
axes.push(merge$1({
|
|
55107
55612
|
range
|
|
55108
55613
|
}, axisOption, {
|
|
55109
|
-
type: 'linear',
|
|
55614
|
+
type: axisOption?.type || 'linear',
|
|
55110
55615
|
orient: index === 0 ? 'left' : 'right',
|
|
55111
55616
|
label: { visible: false },
|
|
55112
55617
|
title: { visible: false },
|
|
@@ -56019,7 +56524,11 @@
|
|
|
56019
56524
|
class ListTable extends BaseTable {
|
|
56020
56525
|
showHeader = true;
|
|
56021
56526
|
constructor(container, options) {
|
|
56022
|
-
if (
|
|
56527
|
+
if (Env.mode === 'node') {
|
|
56528
|
+
options = container;
|
|
56529
|
+
container = null;
|
|
56530
|
+
}
|
|
56531
|
+
else if (!(container instanceof HTMLElement)) {
|
|
56023
56532
|
options = container;
|
|
56024
56533
|
if (container.container) {
|
|
56025
56534
|
container = container.container;
|
|
@@ -57536,7 +58045,13 @@
|
|
|
57536
58045
|
return this.columnDimensionTree.tree.size + this.rowHeaderLevelCount + this.rightFrozenColCount;
|
|
57537
58046
|
}
|
|
57538
58047
|
get rowCount() {
|
|
57539
|
-
return (this.
|
|
58048
|
+
return (((Array.isArray(this._table.records) ? this._table.records.length > 0 : true) &&
|
|
58049
|
+
this._indicators?.length > 0 &&
|
|
58050
|
+
!this._rowHeaderCellIds?.length
|
|
58051
|
+
? 1
|
|
58052
|
+
: this._rowHeaderCellIds?.length ?? 0) +
|
|
58053
|
+
this.columnHeaderLevelCount +
|
|
58054
|
+
this.bottomFrozenRowCount);
|
|
57540
58055
|
}
|
|
57541
58056
|
get bodyRowCount() {
|
|
57542
58057
|
return this.rowDimensionTree.tree.size;
|
|
@@ -59473,9 +59988,7 @@
|
|
|
59473
59988
|
(indicatorsAsCol && this.rows.length === 0), this.rowGrandTotalLabel);
|
|
59474
59989
|
}
|
|
59475
59990
|
else {
|
|
59476
|
-
this.rowHeaderTree = this.ArrToTree(this.rowKeys, this.rows, indicatorsAsCol ? undefined : indicators, this.rowsIsTotal, this?.totals?.row?.showGrandTotals ||
|
|
59477
|
-
(!indicatorsAsCol && this.columns.length === 0) ||
|
|
59478
|
-
(indicatorsAsCol && this.rows.length === 0), this.rowGrandTotalLabel, this.rowSubTotalLabel);
|
|
59991
|
+
this.rowHeaderTree = this.ArrToTree(this.rowKeys, this.rows, indicatorsAsCol ? undefined : indicators, this.rowsIsTotal, this?.totals?.row?.showGrandTotals || (indicatorsAsCol && this.rows.length === 0), this.rowGrandTotalLabel, this.rowSubTotalLabel);
|
|
59479
59992
|
}
|
|
59480
59993
|
}
|
|
59481
59994
|
if (customColTree) {
|
|
@@ -59485,7 +59998,7 @@
|
|
|
59485
59998
|
this.colHeaderTree = customColTree;
|
|
59486
59999
|
}
|
|
59487
60000
|
else {
|
|
59488
|
-
this.colHeaderTree = this.ArrToTree(this.colKeys, this.columns, indicatorsAsCol ? indicators : undefined, this.colsIsTotal, this.totals?.column?.showGrandTotals, this.colGrandTotalLabel, this.colSubTotalLabel);
|
|
60001
|
+
this.colHeaderTree = this.ArrToTree(this.colKeys, this.columns, indicatorsAsCol ? indicators : undefined, this.colsIsTotal, this.totals?.column?.showGrandTotals || (!indicatorsAsCol && this.columns.length === 0), this.colGrandTotalLabel, this.colSubTotalLabel);
|
|
59489
60002
|
}
|
|
59490
60003
|
typeof window !== 'undefined' ? window.performance.now() : 0;
|
|
59491
60004
|
if (this.dataConfig?.isPivotChart) {
|
|
@@ -60363,7 +60876,11 @@
|
|
|
60363
60876
|
dataset;
|
|
60364
60877
|
flatDataToObjects;
|
|
60365
60878
|
constructor(container, options) {
|
|
60366
|
-
if (
|
|
60879
|
+
if (Env.mode === 'node') {
|
|
60880
|
+
options = container;
|
|
60881
|
+
container = null;
|
|
60882
|
+
}
|
|
60883
|
+
else if (!(container instanceof HTMLElement)) {
|
|
60367
60884
|
options = container;
|
|
60368
60885
|
if (container.container) {
|
|
60369
60886
|
container = container.container;
|
|
@@ -60887,7 +61404,11 @@
|
|
|
60887
61404
|
_chartEventMap = {};
|
|
60888
61405
|
_axes;
|
|
60889
61406
|
constructor(container, options) {
|
|
60890
|
-
if (
|
|
61407
|
+
if (Env.mode === 'node') {
|
|
61408
|
+
options = container;
|
|
61409
|
+
container = null;
|
|
61410
|
+
}
|
|
61411
|
+
else if (!(container instanceof HTMLElement)) {
|
|
60891
61412
|
options = container;
|
|
60892
61413
|
if (container.container) {
|
|
60893
61414
|
container = container.container;
|
|
@@ -61552,6 +62073,9 @@
|
|
|
61552
62073
|
updateChartData(this.scenegraph);
|
|
61553
62074
|
this.render();
|
|
61554
62075
|
}
|
|
62076
|
+
getLegendSelected() {
|
|
62077
|
+
return this.internalProps.legends.legendComponent._getSelectedLegends().map((d) => d.label);
|
|
62078
|
+
}
|
|
61555
62079
|
setLegendSelected(selectedData) {
|
|
61556
62080
|
this.internalProps.legends.legendComponent.setSelected(selectedData);
|
|
61557
62081
|
}
|
|
@@ -62177,7 +62701,7 @@
|
|
|
62177
62701
|
super(options);
|
|
62178
62702
|
this.text = options.text;
|
|
62179
62703
|
this.fontSize = options.fontSize || 12;
|
|
62180
|
-
this.fontFamily = options.fontFamily || 'sans-serif';
|
|
62704
|
+
this.fontFamily = options.fontFamily || 'Arial,sans-serif';
|
|
62181
62705
|
this.fill = options.color || options.fill || 'black';
|
|
62182
62706
|
this.textBaseline = options.textBaseline || 'top';
|
|
62183
62707
|
this.textAlign = options.textAlign || 'left';
|
|
@@ -62505,7 +63029,7 @@
|
|
|
62505
63029
|
return new Tag(params ? params.attribute : {});
|
|
62506
63030
|
}
|
|
62507
63031
|
|
|
62508
|
-
const version = "0.13.0
|
|
63032
|
+
const version = "0.13.0";
|
|
62509
63033
|
function getIcons() {
|
|
62510
63034
|
return get$1();
|
|
62511
63035
|
}
|