@wcardinal/wcardinal-ui 0.282.0 → 0.284.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-bar.d.ts +20 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base-options-parser.d.ts +19 -24
- package/dist/types/wcardinal/ui/d-chart-axis-base-tick-container.d.ts +29 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base-tick-major-gridline.d.ts +19 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base-tick-major.d.ts +20 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base-tick-minor.d.ts +17 -0
- package/dist/types/wcardinal/ui/d-chart-axis-base.d.ts +11 -19
- package/dist/types/wcardinal/ui/d-chart-axis-container-impl.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-chart-axis-container.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-chart-axis-tick-container.d.ts +7 -0
- package/dist/types/wcardinal/ui/d-chart-axis-tick-major-gridline.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-axis-tick-major.d.ts +7 -0
- package/dist/types/wcardinal/ui/d-chart-axis-tick-minor.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-axis.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-table-body-cell-input-tree.d.ts +1 -0
- package/dist/types/wcardinal/ui/d-table-data-tree.d.ts +40 -5
- package/dist/wcardinal/ui/d-chart-axis-bar.js +6 -0
- package/dist/wcardinal/ui/d-chart-axis-bar.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-bar.js +105 -0
- package/dist/wcardinal/ui/d-chart-axis-base-bar.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js +3 -7
- package/dist/wcardinal/ui/d-chart-axis-base-options-parser.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +225 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js +83 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js +89 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js +75 -0
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base.js +35 -388
- package/dist/wcardinal/ui/d-chart-axis-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-container-impl.js +5 -3
- package/dist/wcardinal/ui/d-chart-axis-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-tick-container.js +6 -0
- package/dist/wcardinal/ui/d-chart-axis-tick-container.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-tick-major-gridline.js +6 -0
- package/dist/wcardinal/ui/d-chart-axis-tick-major-gridline.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-tick-major.js +6 -0
- package/dist/wcardinal/ui/d-chart-axis-tick-major.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis-tick-minor.js +6 -0
- package/dist/wcardinal/ui/d-chart-axis-tick-minor.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-axis.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-input-tree.js +19 -11
- package/dist/wcardinal/ui/d-table-body-cell-input-tree.js.map +1 -1
- package/dist/wcardinal/ui/d-table-data-tree.js +27 -10
- package/dist/wcardinal/ui/d-table-data-tree.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-body-cell-input-tree-marker.js +2 -2
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-body-cell-input-tree-marker.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-table-body-cell-input-tree-marker.js +2 -2
- package/dist/wcardinal/ui/theme/white/d-theme-white-table-body-cell-input-tree-marker.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +3 -3
- 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 +3 -3
- 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 +538 -311
- package/dist/wcardinal-ui.js +534 -307
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DBase } from "./d-base";
|
|
2
|
+
import { DChartAxisBar } from "./d-chart-axis-bar";
|
|
3
|
+
import { DChartAxisBaseOptionParser } from "./d-chart-axis-base-options-parser";
|
|
4
|
+
import { DChartAxisContainer } from "./d-chart-axis-container";
|
|
5
|
+
import { EShape } from "./shape/e-shape";
|
|
6
|
+
import { EShapeBarPosition } from "./shape/variant/e-shape-bar-position";
|
|
7
|
+
export declare class DChartAxisBaseBar<CHART extends DBase> implements DChartAxisBar<CHART> {
|
|
8
|
+
protected _parser: DChartAxisBaseOptionParser;
|
|
9
|
+
protected _container?: DChartAxisContainer<CHART>;
|
|
10
|
+
protected _index: number;
|
|
11
|
+
protected _shape?: EShape;
|
|
12
|
+
constructor(parser: DChartAxisBaseOptionParser);
|
|
13
|
+
get shape(): EShape;
|
|
14
|
+
protected newShape(): EShape;
|
|
15
|
+
protected newShapePosition(): EShapeBarPosition;
|
|
16
|
+
bind(container: DChartAxisContainer<CHART>, index: number): void;
|
|
17
|
+
unbind(): void;
|
|
18
|
+
update(): boolean;
|
|
19
|
+
destroy(): void;
|
|
20
|
+
}
|
|
@@ -13,17 +13,15 @@ import { EShapeTextAlignLike } from "./shape/e-shape-text-align";
|
|
|
13
13
|
import { EShapeTextDirection } from "./shape/e-shape-text-direction";
|
|
14
14
|
import { EShapeTextOffsetLike } from "./shape/e-shape-text-offset";
|
|
15
15
|
import { EShapeTextOutlineLike } from "./shape/e-shape-text-outline";
|
|
16
|
-
import { EShapeBar } from "./shape/variant/e-shape-bar";
|
|
17
16
|
import { EShapeBarPosition } from "./shape/variant/e-shape-bar-position";
|
|
18
17
|
import { DeepPartial } from "./util/deep-partial";
|
|
19
18
|
import { NumberFormatter } from "./util/number-formatter";
|
|
20
|
-
export interface
|
|
19
|
+
export interface DChartAxisBaseOptionParserGridline {
|
|
21
20
|
enable: boolean;
|
|
22
21
|
style?: EShapePointsStyle;
|
|
23
22
|
stroke?: Partial<EShapeStrokeLike>;
|
|
24
|
-
shapes?: EShapeBar[];
|
|
25
23
|
}
|
|
26
|
-
export interface
|
|
24
|
+
export interface DChartAxisBaseOptionParserTickMajor {
|
|
27
25
|
capacity: number;
|
|
28
26
|
count: number;
|
|
29
27
|
step: number | DChartCoordinateTickMajorStepFunction | undefined;
|
|
@@ -33,49 +31,46 @@ export interface DChartAxisBaseTickMajor {
|
|
|
33
31
|
stroke?: Partial<EShapeStrokeLike>;
|
|
34
32
|
text?: DChartAxisBaseTickMajorTextOptions;
|
|
35
33
|
formatter: NumberFormatter;
|
|
36
|
-
|
|
37
|
-
gridline: DChartAxisBaseGridline;
|
|
34
|
+
gridline: DChartAxisBaseOptionParserGridline;
|
|
38
35
|
}
|
|
39
|
-
export interface
|
|
36
|
+
export interface DChartAxisBaseOptionParserTickMinor {
|
|
40
37
|
count: number;
|
|
41
38
|
step: number | DChartCoordinateTickMinorStepFunction | undefined;
|
|
42
39
|
size: number;
|
|
43
40
|
position: EShapeBarPosition;
|
|
44
41
|
style?: EShapePointsStyle;
|
|
45
42
|
stroke?: Partial<EShapeStrokeLike>;
|
|
46
|
-
shapes?: EShapeBar[];
|
|
47
43
|
}
|
|
48
|
-
export interface
|
|
44
|
+
export interface DChartAxisBaseOptionParserTickContainer {
|
|
45
|
+
enable: boolean;
|
|
46
|
+
major: DChartAxisBaseOptionParserTickMajor;
|
|
47
|
+
minor: DChartAxisBaseOptionParserTickMinor;
|
|
48
|
+
}
|
|
49
|
+
export interface DChartAxisBaseOptionParserBar {
|
|
49
50
|
style?: EShapePointsStyle;
|
|
50
51
|
stroke?: Partial<EShapeStrokeLike>;
|
|
51
|
-
shape?: EShapeBar;
|
|
52
|
-
}
|
|
53
|
-
export interface DChartAxisBaseTickContainer {
|
|
54
|
-
enable: boolean;
|
|
55
|
-
major: DChartAxisBaseTickMajor;
|
|
56
|
-
minor: DChartAxisBaseTickMinor;
|
|
57
52
|
}
|
|
58
53
|
export declare class DChartAxisBaseOptionParser {
|
|
59
54
|
protected _coordinateIndex: number;
|
|
60
55
|
protected _position: DChartAxisPosition;
|
|
61
|
-
protected _tick:
|
|
56
|
+
protected _tick: DChartAxisBaseOptionParserTickContainer;
|
|
62
57
|
protected _label: DeepPartial<EShapeTextLike> | undefined;
|
|
63
58
|
protected _padding: number;
|
|
64
|
-
protected _bar:
|
|
59
|
+
protected _bar: DChartAxisBaseOptionParserBar;
|
|
65
60
|
constructor(theme: DThemeChartAxisBase, options?: DChartAxisBaseOptions);
|
|
66
61
|
get coordinateIndex(): number;
|
|
67
62
|
get padding(): number;
|
|
68
63
|
get position(): DChartAxisPosition;
|
|
69
|
-
get bar():
|
|
70
|
-
get tick():
|
|
64
|
+
get bar(): DChartAxisBaseOptionParserBar;
|
|
65
|
+
get tick(): DChartAxisBaseOptionParserTickContainer;
|
|
71
66
|
get label(): DeepPartial<EShapeTextLike> | undefined;
|
|
72
67
|
protected toPosition(theme: DThemeChartAxisBase, options?: DChartAxisBaseOptions): DChartAxisPosition;
|
|
73
|
-
protected toBar(theme: DThemeChartAxisBase, options?: DChartAxisBaseOptions):
|
|
74
|
-
protected toTickContainer(theme: DThemeChartAxisBase, options?: DChartAxisBaseOptions):
|
|
75
|
-
protected toTickMajor(theme: DThemeChartAxisBase, options?: DChartAxisBaseTickContainerOptions):
|
|
76
|
-
protected toTickMajorGridline(theme: DThemeChartAxisBase, options: DChartAxisBaseTickMajorGridlineOptions | undefined, optionsStyle: EShapePointsStyleOption | undefined, optionsStroke: Partial<EShapeStrokeLike> | undefined):
|
|
68
|
+
protected toBar(theme: DThemeChartAxisBase, options?: DChartAxisBaseOptions): DChartAxisBaseOptionParserBar;
|
|
69
|
+
protected toTickContainer(theme: DThemeChartAxisBase, options?: DChartAxisBaseOptions): DChartAxisBaseOptionParserTickContainer;
|
|
70
|
+
protected toTickMajor(theme: DThemeChartAxisBase, options?: DChartAxisBaseTickContainerOptions): DChartAxisBaseOptionParserTickMajor;
|
|
71
|
+
protected toTickMajorGridline(theme: DThemeChartAxisBase, options: DChartAxisBaseTickMajorGridlineOptions | undefined, optionsStyle: EShapePointsStyleOption | undefined, optionsStroke: Partial<EShapeStrokeLike> | undefined): DChartAxisBaseOptionParserGridline;
|
|
77
72
|
protected toTickPosition(tickPosition: DChartAxisTickPosition | keyof typeof DChartAxisTickPosition): EShapeBarPosition;
|
|
78
|
-
protected toMinorTick(theme: DThemeChartAxisBase, options?: DChartAxisBaseTickContainerOptions):
|
|
73
|
+
protected toMinorTick(theme: DThemeChartAxisBase, options?: DChartAxisBaseTickContainerOptions): DChartAxisBaseOptionParserTickMinor;
|
|
79
74
|
protected toBarStroke(theme: DThemeChartAxisBase, options?: Partial<EShapeStrokeLike>): Partial<EShapeStrokeLike>;
|
|
80
75
|
protected toTickMajorStroke(theme: DThemeChartAxisBase, optionsA?: Partial<EShapeStrokeLike>, optionsB?: Partial<EShapeStrokeLike>): Partial<EShapeStrokeLike>;
|
|
81
76
|
protected toTickMajorGridlineStroke(theme: DThemeChartAxisBase, optionsA?: Partial<EShapeStrokeLike>, optionsB?: Partial<EShapeStrokeLike>): Partial<EShapeStrokeLike>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Matrix } from "pixi.js";
|
|
2
|
+
import { DBase } from "./d-base";
|
|
3
|
+
import { DChartAxisBaseOptionParser } from "./d-chart-axis-base-options-parser";
|
|
4
|
+
import { DChartAxisBaseTickMajor } from "./d-chart-axis-base-tick-major";
|
|
5
|
+
import { DChartAxisBaseTickMinor } from "./d-chart-axis-base-tick-minor";
|
|
6
|
+
import { DChartAxisContainer } from "./d-chart-axis-container";
|
|
7
|
+
import { DChartAxisTickContainer } from "./d-chart-axis-tick-container";
|
|
8
|
+
import { DChartAxisTickMajor } from "./d-chart-axis-tick-major";
|
|
9
|
+
import { DChartAxisTickMinor } from "./d-chart-axis-tick-minor";
|
|
10
|
+
import { DChartCoordinate } from "./d-chart-coordinate";
|
|
11
|
+
import { EShape } from "./shape/e-shape";
|
|
12
|
+
export declare class DChartAxisBaseTickContainer<CHART extends DBase> implements DChartAxisTickContainer<CHART> {
|
|
13
|
+
protected _parser: DChartAxisBaseOptionParser;
|
|
14
|
+
protected _container?: DChartAxisContainer<CHART>;
|
|
15
|
+
protected _index: number;
|
|
16
|
+
protected _major: DChartAxisBaseTickMajor<CHART>;
|
|
17
|
+
protected _minor: DChartAxisBaseTickMinor<CHART>;
|
|
18
|
+
protected _majorTicks: number[];
|
|
19
|
+
protected _minorTicks: number[];
|
|
20
|
+
constructor(parser: DChartAxisBaseOptionParser);
|
|
21
|
+
get major(): DChartAxisTickMajor<CHART>;
|
|
22
|
+
get minor(): DChartAxisTickMinor<CHART>;
|
|
23
|
+
bind(container: DChartAxisContainer<CHART>, index: number): void;
|
|
24
|
+
unbind(): void;
|
|
25
|
+
update(): boolean;
|
|
26
|
+
protected updateX(domainMin: number, domainMax: number, coordinate: DChartCoordinate<CHART>, majorShapes: EShape[], minorShapes: EShape[], gridlineShapes: EShape[] | null, shapePositionY: number, transform: Matrix, plotAreaHeight: number): boolean;
|
|
27
|
+
protected updateY(domainMin: number, domainMax: number, coordinate: DChartCoordinate<CHART>, majorShapes: EShape[], minorShapes: EShape[], gridlineShapes: EShape[] | null, shapePositionX: number, transform: Matrix, plotAreaWidth: number): boolean;
|
|
28
|
+
destroy(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DBase } from "./d-base";
|
|
2
|
+
import { DChartAxisBaseOptionParser } from "./d-chart-axis-base-options-parser";
|
|
3
|
+
import { DChartAxisContainer } from "./d-chart-axis-container";
|
|
4
|
+
import { DChartAxisTickMajorGridline } from "./d-chart-axis-tick-major-gridline";
|
|
5
|
+
import { EShape } from "./shape/e-shape";
|
|
6
|
+
import { EShapeBarPosition } from "./shape/variant/e-shape-bar-position";
|
|
7
|
+
export declare class DChartAxisBaseTickMajorGridline<CHART extends DBase> implements DChartAxisTickMajorGridline<CHART> {
|
|
8
|
+
protected _parser: DChartAxisBaseOptionParser;
|
|
9
|
+
protected _container?: DChartAxisContainer<CHART>;
|
|
10
|
+
protected _index: number;
|
|
11
|
+
protected _shapes?: EShape[];
|
|
12
|
+
constructor(parser: DChartAxisBaseOptionParser);
|
|
13
|
+
get shapes(): EShape[];
|
|
14
|
+
protected newShapes(): EShape[];
|
|
15
|
+
protected newShapePosition(): EShapeBarPosition;
|
|
16
|
+
bind(container: DChartAxisContainer<CHART>, index: number): void;
|
|
17
|
+
unbind(): void;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DBase } from "./d-base";
|
|
2
|
+
import { DChartAxisBaseOptionParser } from "./d-chart-axis-base-options-parser";
|
|
3
|
+
import { DChartAxisBaseTickMajorGridline } from "./d-chart-axis-base-tick-major-gridline";
|
|
4
|
+
import { DChartAxisContainer } from "./d-chart-axis-container";
|
|
5
|
+
import { DChartAxisTickMajor } from "./d-chart-axis-tick-major";
|
|
6
|
+
import { EShape } from "./shape/e-shape";
|
|
7
|
+
export declare class DChartAxisBaseTickMajor<CHART extends DBase> implements DChartAxisTickMajor<CHART> {
|
|
8
|
+
protected _parser: DChartAxisBaseOptionParser;
|
|
9
|
+
protected _container?: DChartAxisContainer<CHART>;
|
|
10
|
+
protected _index: number;
|
|
11
|
+
protected _shapes?: EShape[];
|
|
12
|
+
protected _gridline: DChartAxisBaseTickMajorGridline<CHART>;
|
|
13
|
+
constructor(parser: DChartAxisBaseOptionParser);
|
|
14
|
+
get shapes(): EShape[];
|
|
15
|
+
protected newShapes(): EShape[];
|
|
16
|
+
get gridline(): DChartAxisBaseTickMajorGridline<CHART>;
|
|
17
|
+
bind(container: DChartAxisContainer<CHART>, index: number): void;
|
|
18
|
+
unbind(): void;
|
|
19
|
+
destroy(): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DBase } from "./d-base";
|
|
2
|
+
import { DChartAxisBaseOptionParser } from "./d-chart-axis-base-options-parser";
|
|
3
|
+
import { DChartAxisContainer } from "./d-chart-axis-container";
|
|
4
|
+
import { DChartAxisTickMinor } from "./d-chart-axis-tick-minor";
|
|
5
|
+
import { EShape } from "./shape/e-shape";
|
|
6
|
+
export declare class DChartAxisBaseTickMinor<CHART extends DBase> implements DChartAxisTickMinor<CHART> {
|
|
7
|
+
protected _parser: DChartAxisBaseOptionParser;
|
|
8
|
+
protected _container?: DChartAxisContainer<CHART>;
|
|
9
|
+
protected _index: number;
|
|
10
|
+
protected _shapes?: EShape[];
|
|
11
|
+
constructor(parser: DChartAxisBaseOptionParser);
|
|
12
|
+
get shapes(): EShape[];
|
|
13
|
+
protected newShapes(): EShape[];
|
|
14
|
+
bind(container: DChartAxisContainer<CHART>, index: number): void;
|
|
15
|
+
unbind(): void;
|
|
16
|
+
destroy(): void;
|
|
17
|
+
}
|
|
@@ -1,32 +1,24 @@
|
|
|
1
|
-
import { Matrix } from "pixi.js";
|
|
2
1
|
import { DBase } from "./d-base";
|
|
3
2
|
import { DChartAxis } from "./d-chart-axis";
|
|
3
|
+
import { DChartAxisBar } from "./d-chart-axis-bar";
|
|
4
|
+
import { DChartAxisBaseBar } from "./d-chart-axis-base-bar";
|
|
4
5
|
import { DChartAxisBaseOptions, DThemeChartAxisBase } from "./d-chart-axis-base-options";
|
|
5
|
-
import {
|
|
6
|
+
import { DChartAxisBaseOptionParser } from "./d-chart-axis-base-options-parser";
|
|
7
|
+
import { DChartAxisBaseTickContainer } from "./d-chart-axis-base-tick-container";
|
|
6
8
|
import { DChartAxisContainer } from "./d-chart-axis-container";
|
|
7
9
|
import { DChartAxisPosition } from "./d-chart-axis-position";
|
|
8
|
-
import {
|
|
9
|
-
import { EShapeTextLike } from "./shape/e-shape-text";
|
|
10
|
-
import { EShapeBar } from "./shape/variant/e-shape-bar";
|
|
11
|
-
import { DeepPartial } from "./util/deep-partial";
|
|
10
|
+
import { DChartAxisTickContainer } from "./d-chart-axis-tick-container";
|
|
12
11
|
export declare class DChartAxisBase<CHART extends DBase = DBase, OPTIONS extends DChartAxisBaseOptions = DChartAxisBaseOptions> implements DChartAxis<CHART> {
|
|
13
|
-
protected
|
|
14
|
-
protected
|
|
15
|
-
protected _position: DChartAxisPosition;
|
|
12
|
+
protected _theme: DThemeChartAxisBase;
|
|
13
|
+
protected _parser: DChartAxisBaseOptionParser;
|
|
16
14
|
protected _container?: DChartAxisContainer<CHART>;
|
|
17
|
-
protected _bar: DChartAxisBaseBar;
|
|
18
15
|
protected _index: number;
|
|
19
|
-
protected
|
|
20
|
-
protected
|
|
21
|
-
protected _minorTicks: number[];
|
|
22
|
-
protected _label?: DeepPartial<EShapeTextLike>;
|
|
23
|
-
protected _theme: DThemeChartAxisBase;
|
|
16
|
+
protected _bar: DChartAxisBaseBar<CHART>;
|
|
17
|
+
protected _tick: DChartAxisBaseTickContainer<CHART>;
|
|
24
18
|
constructor(options?: OPTIONS);
|
|
25
19
|
get position(): DChartAxisPosition;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
protected updateTicksY(domainMin: number, domainMax: number, coordinate: DChartCoordinate<CHART>, majorShapes: EShapeBar[], minorShapes: EShapeBar[], gridlineShapes: EShapeBar[] | undefined, shapePositionX: number, transform: Matrix, plotAreaWidth: number): boolean;
|
|
29
|
-
protected updateTicks(container: DChartAxisContainer<CHART>): boolean;
|
|
20
|
+
get bar(): DChartAxisBar<CHART>;
|
|
21
|
+
get tick(): DChartAxisTickContainer<CHART>;
|
|
30
22
|
bind(container: DChartAxisContainer<CHART>, index: number): void;
|
|
31
23
|
unbind(): void;
|
|
32
24
|
update(): void;
|
|
@@ -12,10 +12,10 @@ export declare class DChartAxisContainerImpl<CHART extends DBase = DBase> implem
|
|
|
12
12
|
get container(): EShapeContainer;
|
|
13
13
|
get plotArea(): DChartPlotArea<CHART>;
|
|
14
14
|
add(axis: DChartAxis<CHART>): void;
|
|
15
|
-
get(position: DChartAxisPosition, index: number): DChartAxis<CHART> | null;
|
|
15
|
+
get(position: DChartAxisPosition | keyof typeof DChartAxisPosition, index: number): DChartAxis<CHART> | null;
|
|
16
16
|
indexOf(axis: DChartAxis<CHART>): number;
|
|
17
|
-
clear(position: DChartAxisPosition): this;
|
|
18
|
-
size(position: DChartAxisPosition): number;
|
|
17
|
+
clear(position: DChartAxisPosition | keyof typeof DChartAxisPosition): this;
|
|
18
|
+
size(position: DChartAxisPosition | keyof typeof DChartAxisPosition): number;
|
|
19
19
|
update(): void;
|
|
20
20
|
onRender(): void;
|
|
21
21
|
destroy(): void;
|
|
@@ -10,10 +10,10 @@ export interface DChartAxisContainer<CHART extends DBase = DBase> {
|
|
|
10
10
|
readonly container: EShapeContainer;
|
|
11
11
|
readonly plotArea: DChartPlotArea<CHART>;
|
|
12
12
|
add(axis: DChartAxis<CHART>): void;
|
|
13
|
-
get(position: DChartAxisPosition, index: number): DChartAxis<CHART> | null;
|
|
13
|
+
get(position: DChartAxisPosition | keyof typeof DChartAxisPosition, index: number): DChartAxis<CHART> | null;
|
|
14
14
|
indexOf(axis: DChartAxis<CHART>): number;
|
|
15
|
-
clear(position: DChartAxisPosition): this;
|
|
16
|
-
size(position: DChartAxisPosition): number;
|
|
15
|
+
clear(position: DChartAxisPosition | keyof typeof DChartAxisPosition): this;
|
|
16
|
+
size(position: DChartAxisPosition | keyof typeof DChartAxisPosition): number;
|
|
17
17
|
update(): void;
|
|
18
18
|
onRender(): void;
|
|
19
19
|
destroy(): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DBase } from "./d-base";
|
|
2
|
+
import { DChartAxisTickMajor } from "./d-chart-axis-tick-major";
|
|
3
|
+
import { DChartAxisTickMinor } from "./d-chart-axis-tick-minor";
|
|
4
|
+
export interface DChartAxisTickContainer<CHART extends DBase> {
|
|
5
|
+
readonly major: DChartAxisTickMajor<CHART>;
|
|
6
|
+
readonly minor: DChartAxisTickMinor<CHART>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DBase } from "./d-base";
|
|
2
|
+
import { DChartAxisTickMajorGridline } from "./d-chart-axis-tick-major-gridline";
|
|
3
|
+
import { EShape } from "./shape/e-shape";
|
|
4
|
+
export interface DChartAxisTickMajor<CHART extends DBase> {
|
|
5
|
+
readonly shapes: EShape[];
|
|
6
|
+
readonly gridline: DChartAxisTickMajorGridline<CHART>;
|
|
7
|
+
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { DBase } from "./d-base";
|
|
2
|
+
import { DChartAxisBar } from "./d-chart-axis-bar";
|
|
2
3
|
import { DChartAxisContainer } from "./d-chart-axis-container";
|
|
3
4
|
import { DChartAxisPosition } from "./d-chart-axis-position";
|
|
5
|
+
import { DChartAxisTickContainer } from "./d-chart-axis-tick-container";
|
|
4
6
|
export interface DChartAxisOptions {
|
|
5
7
|
position?: DChartAxisPosition | keyof typeof DChartAxisPosition;
|
|
6
8
|
}
|
|
7
9
|
export interface DChartAxis<CHART extends DBase = DBase> {
|
|
8
10
|
readonly position: DChartAxisPosition;
|
|
11
|
+
readonly bar: DChartAxisBar<CHART>;
|
|
12
|
+
readonly tick: DChartAxisTickContainer<CHART>;
|
|
9
13
|
bind(container: DChartAxisContainer<CHART>, index: number): void;
|
|
10
14
|
unbind(): void;
|
|
11
15
|
update(): void;
|
|
@@ -25,6 +25,7 @@ export declare class DTableBodyCellInputTree<ROW = unknown, THEME extends DTheme
|
|
|
25
25
|
get rowIndex(): number;
|
|
26
26
|
get columnIndex(): number;
|
|
27
27
|
get column(): DTableColumn<ROW, string>;
|
|
28
|
+
protected toggle(): void;
|
|
28
29
|
onRowSelect(e: interaction.InteractionEvent, local: Point): boolean;
|
|
29
30
|
set(value: unknown, row: ROW, supplimental: unknown, rowIndex: number, columnIndex: number, forcibly?: boolean): void;
|
|
30
31
|
unset(): void;
|
|
@@ -8,7 +8,35 @@ import { DTableDataTreeSorter } from "./d-table-data-tree-sorter";
|
|
|
8
8
|
import { DTableDataTreeNode } from "./d-table-data-tree-item";
|
|
9
9
|
import { DTableDataTreeItemAccessor, DTableDataTreeItemAccessorOptions } from "./d-table-data-tree-item-accessor";
|
|
10
10
|
import { DTableDataTreeSelection, DTableDataTreeSelectionCreator, DTableDataTreeSelectionOptions } from "./d-table-data-tree-selection";
|
|
11
|
-
import {
|
|
11
|
+
import { DBaseEvents } from "./d-base";
|
|
12
|
+
import { DOnOptions } from "./d-on-options";
|
|
13
|
+
/**
|
|
14
|
+
* {@link DTableDataTree} events.
|
|
15
|
+
*/
|
|
16
|
+
export interface DTableDataTreeEvents<NODE, EMITTER> extends DBaseEvents<EMITTER> {
|
|
17
|
+
/**
|
|
18
|
+
* Triggered when a node is expanded.
|
|
19
|
+
*
|
|
20
|
+
* @param node a node
|
|
21
|
+
* @param emitter an emitter
|
|
22
|
+
*/
|
|
23
|
+
expand(node: NODE, emitter: EMITTER): void;
|
|
24
|
+
/**
|
|
25
|
+
* Triggered when a node is collapsed.
|
|
26
|
+
*
|
|
27
|
+
* @param node a node
|
|
28
|
+
* @param emitter an emitter
|
|
29
|
+
*/
|
|
30
|
+
collapse(node: NODE, emitter: EMITTER): void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* {@link DTableDataTree} "on" options.
|
|
34
|
+
*/
|
|
35
|
+
export interface DTableDataTreeOnOptions<NODE, EMITTER> extends Partial<DTableDataTreeEvents<NODE, EMITTER>>, DOnOptions {
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* {@link DTableDataTree} options.
|
|
39
|
+
*/
|
|
12
40
|
export interface DTableDataTreeOptions<NODE, EMITTER = any> extends DTableDataTreeItemAccessorOptions<NODE> {
|
|
13
41
|
nodes?: NODE[];
|
|
14
42
|
/**
|
|
@@ -30,7 +58,7 @@ export interface DTableDataTreeOptions<NODE, EMITTER = any> extends DTableDataTr
|
|
|
30
58
|
/**
|
|
31
59
|
* Mappings of event names and event handlers.
|
|
32
60
|
*/
|
|
33
|
-
on?:
|
|
61
|
+
on?: DTableDataTreeOnOptions<NODE, EMITTER>;
|
|
34
62
|
}
|
|
35
63
|
/**
|
|
36
64
|
* Please note that this data class does not support the sorter.
|
|
@@ -64,10 +92,17 @@ export declare class DTableDataTree<NODE extends DTableDataTreeNode<NODE, NODE>>
|
|
|
64
92
|
update(forcibly?: boolean): void;
|
|
65
93
|
size(): number;
|
|
66
94
|
get(index: number): NODE | null;
|
|
67
|
-
|
|
68
|
-
|
|
95
|
+
expand(node: NODE): boolean;
|
|
96
|
+
collapse(node: NODE): boolean;
|
|
97
|
+
isCollapsed(node: NODE): boolean;
|
|
98
|
+
isExpanded(node: NODE): boolean;
|
|
99
|
+
toggle(node: NODE): boolean;
|
|
100
|
+
/** @deprecated in favor of {@link expand}. */
|
|
101
|
+
open(node: NODE): boolean;
|
|
102
|
+
/** @deprecated in favor of {@link collapse}. */
|
|
103
|
+
close(node: NODE): boolean;
|
|
104
|
+
/** @deprecated in favor of {@link isExpanded}. */
|
|
69
105
|
isOpened(node: NODE): boolean;
|
|
70
|
-
toggle(node: NODE): void;
|
|
71
106
|
each(iteratee: (node: NODE, index: number) => boolean | void, ifrom?: number, ito?: number): void;
|
|
72
107
|
get selection(): DTableDataSelection<NODE>;
|
|
73
108
|
get filter(): DTableDataFilter<NODE>;
|
|
@@ -0,0 +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"]}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { DChartAxisPosition } from "./d-chart-axis-position";
|
|
6
|
+
import { EShapePointsStyle } from "./shape/e-shape-points-style";
|
|
7
|
+
import { EShapeBar } from "./shape/variant/e-shape-bar";
|
|
8
|
+
import { EShapeBarPosition } from "./shape/variant/e-shape-bar-position";
|
|
9
|
+
var DChartAxisBaseBar = /** @class */ (function () {
|
|
10
|
+
function DChartAxisBaseBar(parser) {
|
|
11
|
+
this._parser = parser;
|
|
12
|
+
this._index = 0;
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(DChartAxisBaseBar.prototype, "shape", {
|
|
15
|
+
get: function () {
|
|
16
|
+
var result = this._shape;
|
|
17
|
+
if (result == null) {
|
|
18
|
+
result = this.newShape();
|
|
19
|
+
this._shape = result;
|
|
20
|
+
}
|
|
21
|
+
return result;
|
|
22
|
+
},
|
|
23
|
+
enumerable: false,
|
|
24
|
+
configurable: true
|
|
25
|
+
});
|
|
26
|
+
DChartAxisBaseBar.prototype.newShape = function () {
|
|
27
|
+
var _a;
|
|
28
|
+
var parser = this._parser;
|
|
29
|
+
var bar = parser.bar;
|
|
30
|
+
var result = new EShapeBar();
|
|
31
|
+
result.points.position = this.newShapePosition();
|
|
32
|
+
result.points.style = (_a = bar.style) !== null && _a !== void 0 ? _a : EShapePointsStyle.NONE;
|
|
33
|
+
result.stroke.copy(bar.stroke);
|
|
34
|
+
result.text.copy(parser.label);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
DChartAxisBaseBar.prototype.newShapePosition = function () {
|
|
38
|
+
switch (this._parser.position) {
|
|
39
|
+
case DChartAxisPosition.LEFT:
|
|
40
|
+
case DChartAxisPosition.RIGHT:
|
|
41
|
+
return EShapeBarPosition.TOP;
|
|
42
|
+
default:
|
|
43
|
+
return EShapeBarPosition.LEFT;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
DChartAxisBaseBar.prototype.bind = function (container, index) {
|
|
47
|
+
this._container = container;
|
|
48
|
+
this._index = index;
|
|
49
|
+
this.shape.attach(container.container);
|
|
50
|
+
};
|
|
51
|
+
DChartAxisBaseBar.prototype.unbind = function () {
|
|
52
|
+
var shape = this._shape;
|
|
53
|
+
if (shape != null) {
|
|
54
|
+
shape.detach();
|
|
55
|
+
}
|
|
56
|
+
this._index = 0;
|
|
57
|
+
this._container = undefined;
|
|
58
|
+
};
|
|
59
|
+
DChartAxisBaseBar.prototype.update = function () {
|
|
60
|
+
var container = this._container;
|
|
61
|
+
var index = this._index;
|
|
62
|
+
var shape = this._shape;
|
|
63
|
+
if (shape != null && container != null) {
|
|
64
|
+
var plotArea = container.plotArea;
|
|
65
|
+
var plotAreaWidth = plotArea.width;
|
|
66
|
+
var plotAreaHeight = plotArea.height;
|
|
67
|
+
var offset = this._parser.padding * index;
|
|
68
|
+
shape.disallowUploadedUpdate();
|
|
69
|
+
var position = shape.transform.position;
|
|
70
|
+
var size = shape.size;
|
|
71
|
+
switch (this._parser.position) {
|
|
72
|
+
case DChartAxisPosition.TOP:
|
|
73
|
+
position.set(plotAreaWidth * 0.5, 0 - offset);
|
|
74
|
+
size.set(plotAreaWidth, 0);
|
|
75
|
+
break;
|
|
76
|
+
case DChartAxisPosition.BOTTOM:
|
|
77
|
+
position.set(plotAreaWidth * 0.5, plotAreaHeight + offset);
|
|
78
|
+
size.set(plotAreaWidth, 0);
|
|
79
|
+
break;
|
|
80
|
+
case DChartAxisPosition.LEFT:
|
|
81
|
+
position.set(0 - offset, plotAreaHeight * 0.5);
|
|
82
|
+
size.set(0, plotAreaHeight);
|
|
83
|
+
break;
|
|
84
|
+
case DChartAxisPosition.RIGHT:
|
|
85
|
+
position.set(plotAreaWidth + offset, plotAreaHeight * 0.5);
|
|
86
|
+
size.set(0, plotAreaHeight);
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
shape.allowUploadedUpdate();
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
return false;
|
|
93
|
+
};
|
|
94
|
+
DChartAxisBaseBar.prototype.destroy = function () {
|
|
95
|
+
var shape = this._shape;
|
|
96
|
+
if (shape != null) {
|
|
97
|
+
shape.destroy();
|
|
98
|
+
}
|
|
99
|
+
this._index = 0;
|
|
100
|
+
this._container = undefined;
|
|
101
|
+
};
|
|
102
|
+
return DChartAxisBaseBar;
|
|
103
|
+
}());
|
|
104
|
+
export { DChartAxisBaseBar };
|
|
105
|
+
//# sourceMappingURL=d-chart-axis-base-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-chart-axis-base-bar.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-base-bar.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { DChartAxisBar } from \"./d-chart-axis-bar\";\nimport { DChartAxisBaseOptionParser } from \"./d-chart-axis-base-options-parser\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\nimport { EShape } from \"./shape/e-shape\";\nimport { EShapePointsStyle } from \"./shape/e-shape-points-style\";\nimport { EShapeBar } from \"./shape/variant/e-shape-bar\";\nimport { EShapeBarPosition } from \"./shape/variant/e-shape-bar-position\";\n\nexport class DChartAxisBaseBar<CHART extends DBase> implements DChartAxisBar<CHART> {\n\tprotected _parser: DChartAxisBaseOptionParser;\n\tprotected _container?: DChartAxisContainer<CHART>;\n\tprotected _index: number;\n\tprotected _shape?: EShape;\n\n\tconstructor(parser: DChartAxisBaseOptionParser) {\n\t\tthis._parser = parser;\n\t\tthis._index = 0;\n\t}\n\n\tget shape(): EShape {\n\t\tlet result = this._shape;\n\t\tif (result == null) {\n\t\t\tresult = this.newShape();\n\t\t\tthis._shape = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newShape(): EShape {\n\t\tconst parser = this._parser;\n\t\tconst bar = parser.bar;\n\t\tconst result = new EShapeBar();\n\t\tresult.points.position = this.newShapePosition();\n\t\tresult.points.style = bar.style ?? EShapePointsStyle.NONE;\n\t\tresult.stroke.copy(bar.stroke);\n\t\tresult.text.copy(parser.label);\n\t\treturn result;\n\t}\n\n\tprotected newShapePosition(): EShapeBarPosition {\n\t\tswitch (this._parser.position) {\n\t\t\tcase DChartAxisPosition.LEFT:\n\t\t\tcase DChartAxisPosition.RIGHT:\n\t\t\t\treturn EShapeBarPosition.TOP;\n\t\t\tdefault:\n\t\t\t\treturn EShapeBarPosition.LEFT;\n\t\t}\n\t}\n\n\tbind(container: DChartAxisContainer<CHART>, index: number): void {\n\t\tthis._container = container;\n\t\tthis._index = index;\n\t\tthis.shape.attach(container.container);\n\t}\n\n\tunbind(): void {\n\t\tconst shape = this._shape;\n\t\tif (shape != null) {\n\t\t\tshape.detach();\n\t\t}\n\t\tthis._index = 0;\n\t\tthis._container = undefined;\n\t}\n\n\tupdate(): boolean {\n\t\tconst container = this._container;\n\t\tconst index = this._index;\n\t\tconst shape = this._shape;\n\t\tif (shape != null && container != null) {\n\t\t\tconst plotArea = container.plotArea;\n\t\t\tconst plotAreaWidth = plotArea.width;\n\t\t\tconst plotAreaHeight = plotArea.height;\n\t\t\tconst offset = this._parser.padding * index;\n\t\t\tshape.disallowUploadedUpdate();\n\t\t\tconst position = shape.transform.position;\n\t\t\tconst size = shape.size;\n\t\t\tswitch (this._parser.position) {\n\t\t\t\tcase DChartAxisPosition.TOP:\n\t\t\t\t\tposition.set(plotAreaWidth * 0.5, 0 - offset);\n\t\t\t\t\tsize.set(plotAreaWidth, 0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DChartAxisPosition.BOTTOM:\n\t\t\t\t\tposition.set(plotAreaWidth * 0.5, plotAreaHeight + offset);\n\t\t\t\t\tsize.set(plotAreaWidth, 0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DChartAxisPosition.LEFT:\n\t\t\t\t\tposition.set(0 - offset, plotAreaHeight * 0.5);\n\t\t\t\t\tsize.set(0, plotAreaHeight);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DChartAxisPosition.RIGHT:\n\t\t\t\t\tposition.set(plotAreaWidth + offset, plotAreaHeight * 0.5);\n\t\t\t\t\tsize.set(0, plotAreaHeight);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tshape.allowUploadedUpdate();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tdestroy(): void {\n\t\tconst shape = this._shape;\n\t\tif (shape != null) {\n\t\t\tshape.destroy();\n\t\t}\n\t\tthis._index = 0;\n\t\tthis._container = undefined;\n\t}\n}\n"]}
|
|
@@ -74,8 +74,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
74
74
|
var _a;
|
|
75
75
|
return {
|
|
76
76
|
style: (_a = options === null || options === void 0 ? void 0 : options.style) !== null && _a !== void 0 ? _a : theme.getStyle(),
|
|
77
|
-
stroke: this.toBarStroke(theme, options === null || options === void 0 ? void 0 : options.stroke)
|
|
78
|
-
shape: undefined
|
|
77
|
+
stroke: this.toBarStroke(theme, options === null || options === void 0 ? void 0 : options.stroke)
|
|
79
78
|
};
|
|
80
79
|
};
|
|
81
80
|
DChartAxisBaseOptionParser.prototype.toTickContainer = function (theme, options) {
|
|
@@ -107,7 +106,6 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
107
106
|
stroke: stroke,
|
|
108
107
|
text: this.toMajorTickText(theme, major === null || major === void 0 ? void 0 : major.text),
|
|
109
108
|
formatter: this.toMajorTickFormatter(theme, major),
|
|
110
|
-
shapes: undefined,
|
|
111
109
|
gridline: this.toTickMajorGridline(theme, major === null || major === void 0 ? void 0 : major.gridline, optionsStyle, optionsStroke)
|
|
112
110
|
};
|
|
113
111
|
};
|
|
@@ -117,8 +115,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
117
115
|
return {
|
|
118
116
|
enable: (_c = options === null || options === void 0 ? void 0 : options.enable) !== null && _c !== void 0 ? _c : theme.getMajorTickGridlineEnable(),
|
|
119
117
|
style: style,
|
|
120
|
-
stroke: this.toTickMajorGridlineStroke(theme, options === null || options === void 0 ? void 0 : options.stroke, optionsStroke)
|
|
121
|
-
shapes: undefined
|
|
118
|
+
stroke: this.toTickMajorGridlineStroke(theme, options === null || options === void 0 ? void 0 : options.stroke, optionsStroke)
|
|
122
119
|
};
|
|
123
120
|
};
|
|
124
121
|
DChartAxisBaseOptionParser.prototype.toTickPosition = function (tickPosition) {
|
|
@@ -163,8 +160,7 @@ var DChartAxisBaseOptionParser = /** @class */ (function () {
|
|
|
163
160
|
size: (_g = minor === null || minor === void 0 ? void 0 : minor.size) !== null && _g !== void 0 ? _g : theme.getMinorTickSize(),
|
|
164
161
|
position: this.toTickPosition(position),
|
|
165
162
|
style: style,
|
|
166
|
-
stroke: this.toTickMinorStroke(theme, minor === null || minor === void 0 ? void 0 : minor.stroke, options === null || options === void 0 ? void 0 : options.stroke)
|
|
167
|
-
shapes: undefined
|
|
163
|
+
stroke: this.toTickMinorStroke(theme, minor === null || minor === void 0 ? void 0 : minor.stroke, options === null || options === void 0 ? void 0 : options.stroke)
|
|
168
164
|
};
|
|
169
165
|
};
|
|
170
166
|
DChartAxisBaseOptionParser.prototype.toBarStroke = function (theme, options) {
|