@wcardinal/wcardinal-ui 0.290.0 → 0.292.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/dist/types/wcardinal/ui/d-chart-axis-bar.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base-options-parser.d.ts +69 -37
- package/dist/types/wcardinal/ui/d-chart-axis-base-options.d.ts +54 -20
- package/dist/types/wcardinal/ui/d-chart-axis-base-tick-container.d.ts +17 -6
- package/dist/types/wcardinal/ui/d-chart-axis-base.d.ts +10 -8
- package/dist/types/wcardinal/ui/d-chart-axis-tick-container.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-axis-tick-major.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-chart-axis-tick-minor.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-chart-axis-x-datetime.d.ts +3 -2
- package/dist/types/wcardinal/ui/d-chart-axis-x.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-chart-axis-y.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-chart-coordinate-base.d.ts +52 -0
- package/dist/types/wcardinal/ui/d-chart-coordinate-linear.d.ts +4 -46
- package/dist/types/wcardinal/ui/d-chart-coordinate-log.d.ts +4 -42
- package/dist/types/wcardinal/ui/d-table-body.d.ts +7 -0
- package/dist/types/wcardinal/ui/index.d.ts +11 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.d.ts +7 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.d.ts +7 -0
- package/dist/wcardinal/ui/d-chart-axis-bar.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js +152 -34
- package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-options.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +64 -43
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base.js +21 -4
- package/dist/wcardinal/ui/d-chart-axis-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-tick-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-tick-major.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-tick-minor.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-x-datetime.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-x.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-y.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-base.js +186 -0
- package/dist/wcardinal/ui/d-chart-coordinate-base.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-coordinate-linear-tick.js +2 -1
- package/dist/wcardinal/ui/d-chart-coordinate-linear-tick.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-linear.js +9 -165
- package/dist/wcardinal/ui/d-chart-coordinate-linear.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-log-tick.js +2 -1
- package/dist/wcardinal/ui/d-chart-coordinate-log-tick.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-log.js +9 -153
- package/dist/wcardinal/ui/d-chart-coordinate-log.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-line-of-any.js +4 -2
- package/dist/wcardinal/ui/d-chart-series-line-of-any.js.map +1 -1
- package/dist/wcardinal/ui/d-scroll-bar-vertical.js +1 -0
- package/dist/wcardinal/ui/d-scroll-bar-vertical.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body.js +39 -0
- package/dist/wcardinal/ui/d-table-body.js.map +1 -1
- package/dist/wcardinal/ui/d-table.js +3 -3
- package/dist/wcardinal/ui/d-table.js.map +1 -1
- package/dist/wcardinal/ui/index.js +11 -0
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.js +21 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-axis-base.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.js +21 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-axis-base.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +22 -1
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +22 -1
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
- package/dist/wcardinal-ui.cjs.js +781 -652
- package/dist/wcardinal-ui.js +739 -652
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,48 +1,10 @@
|
|
|
1
1
|
import { DBase } from "./d-base";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { DChartCoordinateTickMajorStepFunction } from "./d-chart-coordinate-tick-major-step-function";
|
|
7
|
-
import { DChartCoordinateTickMinorStepFunction } from "./d-chart-coordinate-tick-minor-step-function";
|
|
8
|
-
import { DChartCoordinateTransform } from "./d-chart-coordinate-transform";
|
|
9
|
-
import { DChartCoordinateTransformMark, DChartCoordinateTransformMarkImpl } from "./d-chart-coordinate-transform-mark";
|
|
10
|
-
import { DChartPlotArea } from "./d-chart-plot-area";
|
|
11
|
-
import { DChartRegion } from "./d-chart-region";
|
|
12
|
-
import { DChartRegionImpl } from "./d-chart-region-impl";
|
|
13
|
-
export declare class DChartCoordinateLog<CHART extends DBase = DBase> implements DChartCoordinate<CHART> {
|
|
14
|
-
protected _id: number;
|
|
15
|
-
protected _transform: DChartCoordinateTransform<CHART>;
|
|
16
|
-
protected _container?: DChartCoordinateContainerSub<CHART>;
|
|
17
|
-
protected _direction: DChartCoordinateDirection;
|
|
18
|
-
protected _theme: DThemeChartCoordinate;
|
|
19
|
-
protected _work: DChartRegionImpl;
|
|
20
|
-
protected _tick: DChartCoordinateTick<CHART>;
|
|
21
|
-
protected _mark: DChartCoordinateTransformMarkImpl;
|
|
22
|
-
protected _from?: number;
|
|
23
|
-
protected _to?: number;
|
|
24
|
-
constructor(options?: DChartCoordinateOptions);
|
|
25
|
-
get from(): number | undefined;
|
|
26
|
-
set from(from: number | undefined);
|
|
27
|
-
get to(): number | undefined;
|
|
28
|
-
set to(to: number | undefined);
|
|
29
|
-
bind(container: DChartCoordinateContainerSub<CHART>, direction: DChartCoordinateDirection): void;
|
|
30
|
-
unbind(): void;
|
|
31
|
-
fit(from?: number, to?: number): void;
|
|
32
|
-
mark(from?: number, to?: number): void;
|
|
33
|
-
blend(ratio: number): void;
|
|
34
|
-
protected doFit(from: number | undefined, to: number | undefined, result: DChartCoordinateTransformMark | DChartCoordinateTransform<CHART>): void;
|
|
35
|
-
protected toFitDomain(from: number | undefined, to: number | undefined, plotArea: DChartPlotArea<CHART>, result: DChartRegion): DChartRegion;
|
|
36
|
-
protected toFitRange(from: number | undefined, to: number | undefined, plotArea: DChartPlotArea<CHART>, result: DChartRegion): DChartRegion;
|
|
37
|
-
protected doFit_(pixelFrom: number, pixelTo: number, region: DChartRegion, result: DChartCoordinateTransformMark | DChartCoordinateTransform<CHART>): void;
|
|
38
|
-
get id(): number;
|
|
39
|
-
get transform(): DChartCoordinateTransform<CHART>;
|
|
2
|
+
import { DChartCoordinateBase } from "./d-chart-coordinate-base";
|
|
3
|
+
import { DChartCoordinateTick, DChartCoordinateTickOptions } from "./d-chart-coordinate-tick";
|
|
4
|
+
export declare class DChartCoordinateLog<CHART extends DBase = DBase> extends DChartCoordinateBase<CHART> {
|
|
5
|
+
protected newTick(options?: DChartCoordinateTickOptions): DChartCoordinateTick<CHART>;
|
|
40
6
|
map(value: number): number;
|
|
41
7
|
mapAll(values: number[], ifrom: number, iend: number, stride: number, offset: number): void;
|
|
42
8
|
unmap(value: number): number;
|
|
43
9
|
unmapAll(values: number[], ifrom: number, iend: number, stride: number, offset: number): void;
|
|
44
|
-
ticks(domainFrom: number, domainTo: number, majorCount: number, majorCapacity: number, majorStep: number | DChartCoordinateTickMajorStepFunction | undefined, minorCountPerMajor: number, minorCount: number, minorStep: number | DChartCoordinateTickMinorStepFunction | undefined, majorResult: number[], minorResult: number[]): void;
|
|
45
|
-
protected toTheme(options?: DChartCoordinateOptions): DThemeChartCoordinate;
|
|
46
|
-
protected getThemeDefault(): DThemeChartCoordinate;
|
|
47
|
-
protected getType(): string;
|
|
48
10
|
}
|
|
@@ -78,6 +78,13 @@ export declare class DTableBody<ROW, DATA extends DTableData<ROW> = DTableDataLi
|
|
|
78
78
|
protected onParentMove(newX: number, newY: number, oldX: number, oldY: number): void;
|
|
79
79
|
protected updateFrozenCellPosition(x: number): void;
|
|
80
80
|
getClippingRect(target: unknown, result: Rectangle): void;
|
|
81
|
+
/**
|
|
82
|
+
* Scroll to the given row or row index.
|
|
83
|
+
*
|
|
84
|
+
* @param target a row or an row index to which the body scrolls to.
|
|
85
|
+
* @returns true if succeeded
|
|
86
|
+
*/
|
|
87
|
+
scrollTo(target: ROW | number): boolean;
|
|
81
88
|
protected toRowIndexMapped(local: Point): number;
|
|
82
89
|
protected toRow(rowIndexMapped: number): DTableBodyRow<ROW> | null;
|
|
83
90
|
protected toCell(row: DTableBodyRow<ROW>, local: Point): DTableBodyCell<ROW, unknown> | null;
|
|
@@ -78,18 +78,29 @@ export * from "./d-button-undo";
|
|
|
78
78
|
export * from "./d-button";
|
|
79
79
|
export * from "./d-canvas-container";
|
|
80
80
|
export * from "./d-canvas";
|
|
81
|
+
export * from "./d-chart-axis-bar";
|
|
82
|
+
export * from "./d-chart-axis-base-bar";
|
|
81
83
|
export * from "./d-chart-axis-base-options-parser";
|
|
82
84
|
export * from "./d-chart-axis-base-options";
|
|
85
|
+
export * from "./d-chart-axis-base-tick-container";
|
|
86
|
+
export * from "./d-chart-axis-base-tick-major-gridline";
|
|
87
|
+
export * from "./d-chart-axis-base-tick-major";
|
|
88
|
+
export * from "./d-chart-axis-base-tick-minor";
|
|
83
89
|
export * from "./d-chart-axis-base";
|
|
84
90
|
export * from "./d-chart-axis-container-impl";
|
|
85
91
|
export * from "./d-chart-axis-container";
|
|
86
92
|
export * from "./d-chart-axis-position";
|
|
93
|
+
export * from "./d-chart-axis-tick-container";
|
|
94
|
+
export * from "./d-chart-axis-tick-major-gridline";
|
|
95
|
+
export * from "./d-chart-axis-tick-major";
|
|
96
|
+
export * from "./d-chart-axis-tick-minor";
|
|
87
97
|
export * from "./d-chart-axis-tick-position";
|
|
88
98
|
export * from "./d-chart-axis-x-datetime";
|
|
89
99
|
export * from "./d-chart-axis-x";
|
|
90
100
|
export * from "./d-chart-axis-y";
|
|
91
101
|
export * from "./d-chart-axis";
|
|
92
102
|
export * from "./d-chart-color-set";
|
|
103
|
+
export * from "./d-chart-coordinate-base";
|
|
93
104
|
export * from "./d-chart-coordinate-container-impl";
|
|
94
105
|
export * from "./d-chart-coordinate-container-sub-impl";
|
|
95
106
|
export * from "./d-chart-coordinate-container-sub";
|
|
@@ -61,6 +61,13 @@ export declare class DThemeDarkChartAxisBase implements DThemeChartAxisBase {
|
|
|
61
61
|
getMinorTickSize(): number;
|
|
62
62
|
getMinorTickPosition(): DChartAxisTickPosition;
|
|
63
63
|
getMinorTickStyle(): EShapePointsStyle | undefined;
|
|
64
|
+
getMinorTickTextAlignHorizontal(position: DChartAxisPosition): EShapeTextAlignHorizontal;
|
|
65
|
+
getMinorTickTextAlignVertical(position: DChartAxisPosition): EShapeTextAlignVertical;
|
|
66
|
+
getMinorTickTextDirection(): EShapeTextDirection;
|
|
67
|
+
getMinorTickTextColor(): number | undefined;
|
|
68
|
+
getMinorTickTextFormat(): string | undefined;
|
|
69
|
+
getMinorTickTextPaddingHorizontal(): number;
|
|
70
|
+
getMinorTickTextPaddingVertical(): number;
|
|
64
71
|
getMinorTickStrokeEnable(): boolean | undefined;
|
|
65
72
|
getMinorTickStrokeColor(): number | undefined;
|
|
66
73
|
getMinorTickStrokeAlpha(): number | undefined;
|
|
@@ -61,6 +61,13 @@ export declare class DThemeWhiteChartAxisBase implements DThemeChartAxisBase {
|
|
|
61
61
|
getMinorTickSize(): number;
|
|
62
62
|
getMinorTickPosition(): DChartAxisTickPosition;
|
|
63
63
|
getMinorTickStyle(): EShapePointsStyle | undefined;
|
|
64
|
+
getMinorTickTextAlignHorizontal(position: DChartAxisPosition): EShapeTextAlignHorizontal;
|
|
65
|
+
getMinorTickTextAlignVertical(position: DChartAxisPosition): EShapeTextAlignVertical;
|
|
66
|
+
getMinorTickTextDirection(): EShapeTextDirection;
|
|
67
|
+
getMinorTickTextColor(): number | undefined;
|
|
68
|
+
getMinorTickTextFormat(): string | undefined;
|
|
69
|
+
getMinorTickTextPaddingHorizontal(): number;
|
|
70
|
+
getMinorTickTextPaddingVertical(): number;
|
|
64
71
|
getMinorTickStrokeEnable(): boolean | undefined;
|
|
65
72
|
getMinorTickStrokeColor(): number | undefined;
|
|
66
73
|
getMinorTickStrokeAlpha(): number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-chart-axis-bar.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-bar.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { EShape } from \"./shape/e-shape\";\n\nexport interface DChartAxisBar<CHART extends DBase> {\n\treadonly shape: EShape;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"d-chart-axis-bar.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-bar.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { EShape } from \"./shape/e-shape\";\n\nexport interface DChartAxisBar<CHART extends DBase> {\n\treadonly shape: EShape;\n\n\tbind(container: DChartAxisContainer<CHART>, index: number): void;\n\tunbind(): void;\n\tupdate(): boolean;\n\tdestroy(): void;\n}\n"]}
|
|
@@ -5,15 +5,20 @@
|
|
|
5
5
|
import { DChartAxisPosition } from "./d-chart-axis-position";
|
|
6
6
|
import { DChartAxisTickPosition } from "./d-chart-axis-tick-position";
|
|
7
7
|
import { EShapePointsStyles } from "./shape/e-shape-points-styles";
|
|
8
|
+
import { EShapeStrokeStyle } from "./shape/e-shape-stroke-style";
|
|
9
|
+
import { EShapeTextStyle, EShapeTextWeight } from "./shape/e-shape-text";
|
|
10
|
+
import { EShapeTextDirection } from "./shape/e-shape-text-direction";
|
|
8
11
|
import { EShapeBarPosition } from "./shape/variant/e-shape-bar-position";
|
|
12
|
+
import { isArray } from "./util/is-array";
|
|
9
13
|
import { isString } from "./util/is-string";
|
|
10
14
|
import { NumberFormatters } from "./util/number-formatters";
|
|
15
|
+
import { toEnum } from "./util/to-enum";
|
|
11
16
|
var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
12
17
|
function DChartAxisBaseOptionParser(theme, options) {
|
|
13
18
|
var _a, _b;
|
|
14
19
|
this._coordinateIndex = (_a = options === null || options === void 0 ? void 0 : options.coordinate) !== null && _a !== void 0 ? _a : 0;
|
|
15
20
|
this._position = this.toPosition(theme, options);
|
|
16
|
-
this._tick = this.
|
|
21
|
+
this._tick = this.toTick(theme, options);
|
|
17
22
|
this._label = this.toLabel(theme, options);
|
|
18
23
|
this._padding = (_b = options === null || options === void 0 ? void 0 : options.padding) !== null && _b !== void 0 ? _b : theme.getPadding();
|
|
19
24
|
this._bar = this.toBar(theme, options);
|
|
@@ -77,13 +82,13 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
77
82
|
stroke: this.toBarStroke(theme, options === null || options === void 0 ? void 0 : options.stroke)
|
|
78
83
|
};
|
|
79
84
|
};
|
|
80
|
-
DChartAxisBaseOptionParser.prototype.
|
|
85
|
+
DChartAxisBaseOptionParser.prototype.toTick = function (theme, options) {
|
|
81
86
|
var _a;
|
|
82
87
|
var tick = options === null || options === void 0 ? void 0 : options.tick;
|
|
83
88
|
return {
|
|
84
89
|
enable: (_a = tick === null || tick === void 0 ? void 0 : tick.enable) !== null && _a !== void 0 ? _a : theme.getTickEnable(),
|
|
85
90
|
major: this.toTickMajor(theme, tick),
|
|
86
|
-
minor: this.
|
|
91
|
+
minor: this.toTickMinor(theme, tick)
|
|
87
92
|
};
|
|
88
93
|
};
|
|
89
94
|
DChartAxisBaseOptionParser.prototype.toTickMajor = function (theme, options) {
|
|
@@ -104,8 +109,8 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
104
109
|
position: this.toTickPosition(position),
|
|
105
110
|
style: style,
|
|
106
111
|
stroke: stroke,
|
|
107
|
-
text: this.
|
|
108
|
-
formatter: this.
|
|
112
|
+
text: this.toTickMajorText(theme, major === null || major === void 0 ? void 0 : major.text),
|
|
113
|
+
formatter: this.toTickMajorFormatter(theme, major),
|
|
109
114
|
gridline: this.toTickMajorGridline(theme, major === null || major === void 0 ? void 0 : major.gridline, optionsStyle, optionsStroke)
|
|
110
115
|
};
|
|
111
116
|
};
|
|
@@ -149,7 +154,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
149
154
|
}
|
|
150
155
|
}
|
|
151
156
|
};
|
|
152
|
-
DChartAxisBaseOptionParser.prototype.
|
|
157
|
+
DChartAxisBaseOptionParser.prototype.toTickMinor = function (theme, options) {
|
|
153
158
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
154
159
|
var minor = options === null || options === void 0 ? void 0 : options.minor;
|
|
155
160
|
var position = (_b = (_a = minor === null || minor === void 0 ? void 0 : minor.position) !== null && _a !== void 0 ? _a : options === null || options === void 0 ? void 0 : options.position) !== null && _b !== void 0 ? _b : theme.getMinorTickPosition();
|
|
@@ -160,7 +165,9 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
160
165
|
size: (_g = minor === null || minor === void 0 ? void 0 : minor.size) !== null && _g !== void 0 ? _g : theme.getMinorTickSize(),
|
|
161
166
|
position: this.toTickPosition(position),
|
|
162
167
|
style: style,
|
|
163
|
-
stroke: this.toTickMinorStroke(theme, minor === null || minor === void 0 ? void 0 : minor.stroke, options === null || options === void 0 ? void 0 : options.stroke)
|
|
168
|
+
stroke: this.toTickMinorStroke(theme, minor === null || minor === void 0 ? void 0 : minor.stroke, options === null || options === void 0 ? void 0 : options.stroke),
|
|
169
|
+
text: this.toTickMinorText(theme, minor === null || minor === void 0 ? void 0 : minor.text),
|
|
170
|
+
formatter: this.toTickMinorFormatter(theme, minor)
|
|
164
171
|
};
|
|
165
172
|
};
|
|
166
173
|
DChartAxisBaseOptionParser.prototype.toBarStroke = function (theme, options) {
|
|
@@ -186,7 +193,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
186
193
|
width: (_h = (_g = optionsA.width) !== null && _g !== void 0 ? _g : optionsB.width) !== null && _h !== void 0 ? _h : width,
|
|
187
194
|
align: (_k = (_j = optionsA.align) !== null && _j !== void 0 ? _j : optionsB.align) !== null && _k !== void 0 ? _k : align,
|
|
188
195
|
side: (_m = (_l = optionsA.side) !== null && _l !== void 0 ? _l : optionsB.side) !== null && _m !== void 0 ? _m : side,
|
|
189
|
-
style: (_p = (_o = optionsA.style) !== null && _o !== void 0 ? _o : optionsB.style) !== null && _p !== void 0 ? _p : style
|
|
196
|
+
style: this.toStrokeStyle((_p = (_o = optionsA.style) !== null && _o !== void 0 ? _o : optionsB.style) !== null && _p !== void 0 ? _p : style)
|
|
190
197
|
};
|
|
191
198
|
}
|
|
192
199
|
else {
|
|
@@ -197,7 +204,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
197
204
|
width: (_t = optionsA.width) !== null && _t !== void 0 ? _t : width,
|
|
198
205
|
align: (_u = optionsA.align) !== null && _u !== void 0 ? _u : align,
|
|
199
206
|
side: (_v = optionsA.side) !== null && _v !== void 0 ? _v : side,
|
|
200
|
-
style: (_w = optionsA.style) !== null && _w !== void 0 ? _w : style
|
|
207
|
+
style: this.toStrokeStyle((_w = optionsA.style) !== null && _w !== void 0 ? _w : style)
|
|
201
208
|
};
|
|
202
209
|
}
|
|
203
210
|
}
|
|
@@ -209,7 +216,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
209
216
|
width: (_0 = optionsB.width) !== null && _0 !== void 0 ? _0 : width,
|
|
210
217
|
align: (_1 = optionsB.align) !== null && _1 !== void 0 ? _1 : align,
|
|
211
218
|
side: (_2 = optionsB.side) !== null && _2 !== void 0 ? _2 : side,
|
|
212
|
-
style: (_3 = optionsB.style) !== null && _3 !== void 0 ? _3 : style
|
|
219
|
+
style: this.toStrokeStyle((_3 = optionsB.style) !== null && _3 !== void 0 ? _3 : style)
|
|
213
220
|
};
|
|
214
221
|
}
|
|
215
222
|
else {
|
|
@@ -224,12 +231,28 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
224
231
|
};
|
|
225
232
|
}
|
|
226
233
|
};
|
|
227
|
-
DChartAxisBaseOptionParser.prototype.
|
|
234
|
+
DChartAxisBaseOptionParser.prototype.toStrokeStyle = function (target) {
|
|
235
|
+
if (isString(target)) {
|
|
236
|
+
return EShapeStrokeStyle[target];
|
|
237
|
+
}
|
|
238
|
+
else if (isArray(target)) {
|
|
239
|
+
var result = EShapeStrokeStyle.NONE;
|
|
240
|
+
for (var i = 0, imax = target.length; i < imax; ++i) {
|
|
241
|
+
result |= EShapeStrokeStyle[target[i]];
|
|
242
|
+
}
|
|
243
|
+
return result;
|
|
244
|
+
}
|
|
245
|
+
return target;
|
|
246
|
+
};
|
|
247
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorFormatter = function (theme, options) {
|
|
228
248
|
var text = options === null || options === void 0 ? void 0 : options.text;
|
|
229
249
|
if (text) {
|
|
230
|
-
var
|
|
231
|
-
if (
|
|
232
|
-
return
|
|
250
|
+
var format_1 = text.format;
|
|
251
|
+
if (format_1 === null) {
|
|
252
|
+
return undefined;
|
|
253
|
+
}
|
|
254
|
+
else if (format_1 != null) {
|
|
255
|
+
return NumberFormatters.create(format_1);
|
|
233
256
|
}
|
|
234
257
|
else {
|
|
235
258
|
var formatter = text.formatter;
|
|
@@ -240,28 +263,32 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
240
263
|
}
|
|
241
264
|
}
|
|
242
265
|
}
|
|
243
|
-
|
|
266
|
+
var format = theme.getMajorTickTextFormat();
|
|
267
|
+
if (format != null) {
|
|
268
|
+
return NumberFormatters.create(format);
|
|
269
|
+
}
|
|
270
|
+
return undefined;
|
|
244
271
|
};
|
|
245
|
-
DChartAxisBaseOptionParser.prototype.
|
|
272
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorText = function (theme, options) {
|
|
246
273
|
options = options || {};
|
|
247
274
|
return {
|
|
248
275
|
format: options.format,
|
|
249
|
-
color: this.
|
|
276
|
+
color: this.toTickMajorTextColor(theme, options.color),
|
|
250
277
|
alpha: options.alpha,
|
|
251
278
|
family: options.family,
|
|
252
279
|
size: options.size,
|
|
253
|
-
weight: options.weight,
|
|
254
|
-
align: this.
|
|
255
|
-
offset: this.
|
|
256
|
-
style: options.style,
|
|
257
|
-
outline: this.
|
|
258
|
-
spacing: this.
|
|
280
|
+
weight: toEnum(options.weight, EShapeTextWeight),
|
|
281
|
+
align: this.toTickMajorTextAlign(theme, options.align),
|
|
282
|
+
offset: this.toTickMajorTextOffset(theme, options.offset),
|
|
283
|
+
style: toEnum(options.style, EShapeTextStyle),
|
|
284
|
+
outline: this.toTickMajorTextOutline(theme, options.outline),
|
|
285
|
+
spacing: this.toTickMajorTextSpacing(theme, options.spacing),
|
|
259
286
|
direction: this.toTickMajorTextDirection(theme, options.direction),
|
|
260
|
-
padding: this.
|
|
287
|
+
padding: this.toTickMajorTextPadding(theme, options.padding),
|
|
261
288
|
clipping: options.clipping
|
|
262
289
|
};
|
|
263
290
|
};
|
|
264
|
-
DChartAxisBaseOptionParser.prototype.
|
|
291
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextOutline = function (theme, options) {
|
|
265
292
|
if (options) {
|
|
266
293
|
return {
|
|
267
294
|
enable: options.enable,
|
|
@@ -271,7 +298,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
271
298
|
};
|
|
272
299
|
}
|
|
273
300
|
};
|
|
274
|
-
DChartAxisBaseOptionParser.prototype.
|
|
301
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextAlign = function (theme, options) {
|
|
275
302
|
var _a, _b;
|
|
276
303
|
var position = this._position;
|
|
277
304
|
return {
|
|
@@ -279,7 +306,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
279
306
|
vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMajorTickTextAlignVertical(position)
|
|
280
307
|
};
|
|
281
308
|
};
|
|
282
|
-
DChartAxisBaseOptionParser.prototype.
|
|
309
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextOffset = function (theme, options) {
|
|
283
310
|
if (options) {
|
|
284
311
|
return {
|
|
285
312
|
horizontal: options.horizontal,
|
|
@@ -287,7 +314,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
287
314
|
};
|
|
288
315
|
}
|
|
289
316
|
};
|
|
290
|
-
DChartAxisBaseOptionParser.prototype.
|
|
317
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextSpacing = function (theme, options) {
|
|
291
318
|
if (options) {
|
|
292
319
|
return {
|
|
293
320
|
horizontal: options.horizontal,
|
|
@@ -295,7 +322,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
295
322
|
};
|
|
296
323
|
}
|
|
297
324
|
};
|
|
298
|
-
DChartAxisBaseOptionParser.prototype.
|
|
325
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextPadding = function (theme, options) {
|
|
299
326
|
var _a, _b;
|
|
300
327
|
return {
|
|
301
328
|
horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMajorTickTextPaddingHorizontal(),
|
|
@@ -303,11 +330,102 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
303
330
|
};
|
|
304
331
|
};
|
|
305
332
|
DChartAxisBaseOptionParser.prototype.toTickMajorTextDirection = function (theme, options) {
|
|
306
|
-
return options !== null && options !== void 0 ? options : theme.getMajorTickTextDirection();
|
|
333
|
+
return toEnum(options !== null && options !== void 0 ? options : theme.getMajorTickTextDirection(), EShapeTextDirection);
|
|
307
334
|
};
|
|
308
|
-
DChartAxisBaseOptionParser.prototype.
|
|
335
|
+
DChartAxisBaseOptionParser.prototype.toTickMajorTextColor = function (theme, options) {
|
|
309
336
|
return options !== null && options !== void 0 ? options : theme.getMajorTickTextColor();
|
|
310
337
|
};
|
|
338
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorFormatter = function (theme, options) {
|
|
339
|
+
var text = options === null || options === void 0 ? void 0 : options.text;
|
|
340
|
+
if (text) {
|
|
341
|
+
var format_2 = text.format;
|
|
342
|
+
if (format_2 === null) {
|
|
343
|
+
return undefined;
|
|
344
|
+
}
|
|
345
|
+
else if (format_2 != null) {
|
|
346
|
+
return NumberFormatters.create(format_2);
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
var formatter = text.formatter;
|
|
350
|
+
if (formatter) {
|
|
351
|
+
return {
|
|
352
|
+
format: formatter
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
var format = theme.getMinorTickTextFormat();
|
|
358
|
+
if (format != null) {
|
|
359
|
+
return NumberFormatters.create(format);
|
|
360
|
+
}
|
|
361
|
+
return undefined;
|
|
362
|
+
};
|
|
363
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorText = function (theme, options) {
|
|
364
|
+
options = options || {};
|
|
365
|
+
return {
|
|
366
|
+
format: options.format,
|
|
367
|
+
color: this.toTickMinorTextColor(theme, options.color),
|
|
368
|
+
alpha: options.alpha,
|
|
369
|
+
family: options.family,
|
|
370
|
+
size: options.size,
|
|
371
|
+
weight: toEnum(options.weight, EShapeTextWeight),
|
|
372
|
+
align: this.toTickMinorTextAlign(theme, options.align),
|
|
373
|
+
offset: this.toTickMinorTextOffset(theme, options.offset),
|
|
374
|
+
style: toEnum(options.style, EShapeTextStyle),
|
|
375
|
+
outline: this.toTickMinorTextOutline(theme, options.outline),
|
|
376
|
+
spacing: this.toTickMinorTextSpacing(theme, options.spacing),
|
|
377
|
+
direction: this.toTickMinorTextDirection(theme, options.direction),
|
|
378
|
+
padding: this.toTickMinorTextPadding(theme, options.padding),
|
|
379
|
+
clipping: options.clipping
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextOutline = function (theme, options) {
|
|
383
|
+
if (options) {
|
|
384
|
+
return {
|
|
385
|
+
enable: options.enable,
|
|
386
|
+
color: options.color,
|
|
387
|
+
alpha: options.alpha,
|
|
388
|
+
width: options.width
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextAlign = function (theme, options) {
|
|
393
|
+
var _a, _b;
|
|
394
|
+
var position = this._position;
|
|
395
|
+
return {
|
|
396
|
+
horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMinorTickTextAlignHorizontal(position),
|
|
397
|
+
vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMinorTickTextAlignVertical(position)
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextOffset = function (theme, options) {
|
|
401
|
+
if (options) {
|
|
402
|
+
return {
|
|
403
|
+
horizontal: options.horizontal,
|
|
404
|
+
vertical: options.vertical
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextSpacing = function (theme, options) {
|
|
409
|
+
if (options) {
|
|
410
|
+
return {
|
|
411
|
+
horizontal: options.horizontal,
|
|
412
|
+
vertical: options.vertical
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextPadding = function (theme, options) {
|
|
417
|
+
var _a, _b;
|
|
418
|
+
return {
|
|
419
|
+
horizontal: (_a = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _a !== void 0 ? _a : theme.getMinorTickTextPaddingHorizontal(),
|
|
420
|
+
vertical: (_b = options === null || options === void 0 ? void 0 : options.vertical) !== null && _b !== void 0 ? _b : theme.getMinorTickTextPaddingVertical()
|
|
421
|
+
};
|
|
422
|
+
};
|
|
423
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextDirection = function (theme, options) {
|
|
424
|
+
return toEnum(options !== null && options !== void 0 ? options : theme.getMinorTickTextDirection(), EShapeTextDirection);
|
|
425
|
+
};
|
|
426
|
+
DChartAxisBaseOptionParser.prototype.toTickMinorTextColor = function (theme, options) {
|
|
427
|
+
return options !== null && options !== void 0 ? options : theme.getMinorTickTextColor();
|
|
428
|
+
};
|
|
311
429
|
DChartAxisBaseOptionParser.prototype.toLabel = function (theme, options) {
|
|
312
430
|
var label = options === null || options === void 0 ? void 0 : options.label;
|
|
313
431
|
if (label) {
|
|
@@ -317,10 +435,10 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
317
435
|
alpha: label.alpha,
|
|
318
436
|
family: label.family,
|
|
319
437
|
size: label.size,
|
|
320
|
-
weight: label.weight,
|
|
438
|
+
weight: toEnum(label.weight, EShapeTextWeight),
|
|
321
439
|
align: this.toLabelAlign(theme, label.align),
|
|
322
440
|
offset: this.toLabelOffset(theme, label.offset),
|
|
323
|
-
style: label.style,
|
|
441
|
+
style: toEnum(label.style, EShapeTextStyle),
|
|
324
442
|
outline: this.toLabelOutline(theme, label.outline),
|
|
325
443
|
spacing: this.toLabelSpacing(theme, label.spacing),
|
|
326
444
|
direction: this.toLabelDirection(theme, label.direction),
|
|
@@ -371,7 +489,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
371
489
|
};
|
|
372
490
|
};
|
|
373
491
|
DChartAxisBaseOptionParser.prototype.toLabelDirection = function (theme, options) {
|
|
374
|
-
return options !== null && options !== void 0 ? options : theme.getLabelDirection();
|
|
492
|
+
return toEnum(options !== null && options !== void 0 ? options : theme.getLabelDirection(), EShapeTextDirection);
|
|
375
493
|
};
|
|
376
494
|
DChartAxisBaseOptionParser.prototype.toLabelColor = function (theme, options) {
|
|
377
495
|
return options !== null && options !== void 0 ? options : theme.getLabelColor();
|