@wcardinal/wcardinal-ui 0.418.0 → 0.420.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-base-tick-container.d.ts +7 -7
- package/dist/types/wcardinal/ui/d-chart-axis-container-impl.d.ts +4 -4
- package/dist/types/wcardinal/ui/d-chart-axis-container.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-chart-coordinate-base.d.ts +5 -5
- package/dist/types/wcardinal/ui/d-chart-coordinate-container-impl.d.ts +4 -4
- package/dist/types/wcardinal/ui/d-chart-coordinate-container.d.ts +2 -2
- package/dist/types/wcardinal/ui/{d-chart-plot-area-impl.d.ts → d-chart-plot-area-base.d.ts} +23 -20
- package/dist/types/wcardinal/ui/d-chart-plot-area-onefold.d.ts +41 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-axis-container.d.ts +24 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.d.ts +22 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.d.ts +18 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-series-container.d.ts +43 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-base.d.ts +46 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.d.ts +11 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.d.ts +11 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub.d.ts +22 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-view-target.d.ts +30 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold.d.ts +46 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area.d.ts +31 -7
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-x.d.ts +0 -1
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-y.d.ts +0 -1
- package/dist/types/wcardinal/ui/d-chart-series-container-impl.d.ts +5 -4
- package/dist/types/wcardinal/ui/d-chart-series-container.d.ts +2 -3
- package/dist/types/wcardinal/ui/d-chart.d.ts +5 -3
- package/dist/types/wcardinal/ui/index.d.ts +14 -1
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.d.ts +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-bar.js +13 -8
- package/dist/wcardinal/ui/d-chart-axis-base-bar.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-guide-container.js +1 -0
- package/dist/wcardinal/ui/d-chart-axis-base-guide-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +15 -14
- package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js +4 -6
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major-gridline.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js +4 -6
- package/dist/wcardinal/ui/d-chart-axis-base-tick-major.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js +4 -6
- package/dist/wcardinal/ui/d-chart-axis-base-tick-minor.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-axis-container-impl.js +2 -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-guide-simple.js +9 -6
- package/dist/wcardinal/ui/d-chart-axis-guide-simple.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-base.js +2 -4
- package/dist/wcardinal/ui/d-chart-coordinate-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-coordinate-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area-base.js +117 -0
- package/dist/wcardinal/ui/d-chart-plot-area-base.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-onefold.js +166 -0
- package/dist/wcardinal/ui/d-chart-plot-area-onefold.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-axis-container.js +129 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-axis-container.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.js +118 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.js +53 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.js +28 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-primary.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.js +28 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-overflow-mask-secondary.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-series-container.js +186 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-series-container.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js +109 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.js +49 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.js +50 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub.js +6 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-view-target.js +81 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-view-target.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold.js +204 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold.js.map +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-x.js +4 -8
- package/dist/wcardinal/ui/d-chart-selection-gridline-x.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-y.js +4 -8
- package/dist/wcardinal/ui/d-chart-selection-gridline-y.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-marker.js +5 -2
- package/dist/wcardinal/ui/d-chart-selection-marker.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-container-impl.js +4 -2
- package/dist/wcardinal/ui/d-chart-series-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-series-linear.js +1 -1
- package/dist/wcardinal/ui/d-chart-series-linear.js.map +1 -1
- package/dist/wcardinal/ui/d-chart.js +19 -14
- package/dist/wcardinal/ui/d-chart.js.map +1 -1
- package/dist/wcardinal/ui/index.js +14 -1
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.js +3 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-plot-area.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.js +3 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-chart-plot-area.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +4 -1
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +4 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +4 -1
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +4 -1
- package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +4 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +4 -1
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +1276 -222
- package/dist/wcardinal-ui.js +1270 -222
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area-impl.js +0 -237
- package/dist/wcardinal/ui/d-chart-plot-area-impl.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-chart-axis-base-tick-major.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-base-tick-major.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAI1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD;IASC,iCAAY,MAAkC;QAC7C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,IAAI,+BAA+B,CAAC,MAAM,CAAC,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GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE;gBACpD,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACnB;SACD;QACD,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,yCAAO,GAAP;QACC,IAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,MAAM,IAAI,IAAI,EAAE;YACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE;gBACpD,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;aACpB;YACD,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;YAClB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;SACzB;QACD,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC7B,CAAC;IACF,8BAAC;AAAD,CAAC,AAtFD,IAsFC","sourcesContent":["import { DBase } from \"./d-base\";\nimport { DChartAxisBaseOptionParser } from \"./d-chart-axis-base-options-parser\";\nimport { DChartAxisBaseTickMajorGridline } from \"./d-chart-axis-base-tick-major-gridline\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartAxisTickMajor } from \"./d-chart-axis-tick-major\";\nimport { EShape } from \"./shape/e-shape\";\nimport { EShapePointsStyle } from \"./shape/e-shape-points-style\";\nimport { EShapeBar } from \"./shape/variant/e-shape-bar\";\n\nexport class DChartAxisBaseTickMajor<CHART extends DBase = DBase>\n\timplements DChartAxisTickMajor<CHART>\n{\n\tprotected _parser: DChartAxisBaseOptionParser;\n\tprotected _container?: DChartAxisContainer<CHART>;\n\tprotected _index: number;\n\tprotected _shapes?: EShape[];\n\tprotected _gridline: DChartAxisBaseTickMajorGridline<CHART>;\n\n\tconstructor(parser: DChartAxisBaseOptionParser) {\n\t\tthis._parser = parser;\n\t\tthis._index = 0;\n\t\tthis._gridline = new DChartAxisBaseTickMajorGridline(parser);\n\t}\n\n\tget shapes(): EShape[] {\n\t\treturn (this._shapes ??= this.newShapes());\n\t}\n\n\tprotected newShapes(): EShape[] {\n\t\tconst result: EShape[] = [];\n\t\tconst tick = this._parser.tick;\n\t\tif (tick.enable) {\n\t\t\tconst major = tick.major;\n\t\t\tconst capacity = major.capacity;\n\t\t\tconst size = major.size;\n\t\t\tconst position = major.position;\n\t\t\tconst style = major.style ?? EShapePointsStyle.NONE;\n\t\t\tfor (let i = 0; i < capacity; ++i) {\n\t\t\t\tconst shape = new EShapeBar();\n\t\t\t\tshape.points.position = position;\n\t\t\t\tshape.points.size = size;\n\t\t\t\tshape.points.style = style;\n\t\t\t\tshape.stroke.copy(major.stroke);\n\t\t\t\tshape.text.copy(major.text);\n\t\t\t\tshape.size.set(0, 0);\n\t\t\t\tresult.push(shape);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tget gridline(): DChartAxisBaseTickMajorGridline<CHART> {\n\t\treturn this._gridline;\n\t}\n\n\tbind(container: DChartAxisContainer<CHART>, index: number): void {\n\t\tthis._container = container;\n\t\tthis._index = index;\n\n\t\t// Gridline\n\t\tthis._gridline.bind(container, index);\n\n\t\t// Ticks\n\t\tconst shapes = this.shapes;\n\t\tconst containerContainer = container.container;\n\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\tshapes[i].attach(containerContainer);\n\t\t}\n\t}\n\n\tunbind(): void {\n\t\tconst shapes = this._shapes;\n\t\tif (shapes != null) {\n\t\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\t\tshapes[i].detach();\n\t\t\t}\n\t\t}\n\t\tthis._gridline.unbind();\n\t\tthis._index = 0;\n\t\tthis._container = undefined;\n\t}\n\n\tdestroy(): void {\n\t\tconst shapes = this._shapes;\n\t\tif (shapes != null) {\n\t\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\t\tshapes[i].destroy();\n\t\t\t}\n\t\t\tshapes.length = 0;\n\t\t\tthis._shapes = undefined;\n\t\t}\n\t\tthis._gridline.destroy();\n\t\tthis._index = 0;\n\t\tthis._container = undefined;\n\t}\n}\n"]}
|
|
@@ -7,12 +7,8 @@ var DChartAxisBaseTickMinor = /** @class */ (function () {
|
|
|
7
7
|
}
|
|
8
8
|
Object.defineProperty(DChartAxisBaseTickMinor.prototype, "shapes", {
|
|
9
9
|
get: function () {
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
result = this.newShapes();
|
|
13
|
-
this._shapes = result;
|
|
14
|
-
}
|
|
15
|
-
return result;
|
|
10
|
+
var _a;
|
|
11
|
+
return ((_a = this._shapes) !== null && _a !== void 0 ? _a : (this._shapes = this.newShapes()));
|
|
16
12
|
},
|
|
17
13
|
enumerable: false,
|
|
18
14
|
configurable: true
|
|
@@ -66,6 +62,8 @@ var DChartAxisBaseTickMinor = /** @class */ (function () {
|
|
|
66
62
|
for (var i = 0, imax = shapes.length; i < imax; ++i) {
|
|
67
63
|
shapes[i].destroy();
|
|
68
64
|
}
|
|
65
|
+
shapes.length = 0;
|
|
66
|
+
this._shapes = undefined;
|
|
69
67
|
}
|
|
70
68
|
this._index = 0;
|
|
71
69
|
this._container = undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-chart-axis-base-tick-minor.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-base-tick-minor.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD;IAQC,iCAAY,MAAkC;QAC7C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACjB,CAAC;IAED,sBAAI,2CAAM;aAAV
|
|
1
|
+
{"version":3,"file":"d-chart-axis-base-tick-minor.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-base-tick-minor.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD;IAQC,iCAAY,MAAkC;QAC7C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACjB,CAAC;IAED,sBAAI,2CAAM;aAAV;;YACC,OAAO,OAAC,IAAI,CAAC,OAAO,oCAAZ,IAAI,CAAC,OAAO,GAAK,IAAI,CAAC,SAAS,EAAE,EAAC,CAAC;QAC5C,CAAC;;;OAAA;IAES,2CAAS,GAAnB;;QACC,IAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,IAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;QAC/B,IAAI,IAAI,CAAC,MAAM,EAAE;YAChB,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YACzB,IAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;YAC1B,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,IAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;YAChC,IAAM,KAAK,GAAG,MAAA,KAAK,CAAC,KAAK,mCAAI,iBAAiB,CAAC,IAAI,CAAC;YACpD,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,KAAK,CAAC,QAAQ,GA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C,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE;gBACpD,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACnB;SACD;QACD,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,yCAAO,GAAP;QACC,IAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,MAAM,IAAI,IAAI,EAAE;YACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE;gBACpD,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;aACpB;YACD,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;YAClB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;SACzB;QACD,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC7B,CAAC;IACF,8BAAC;AAAD,CAAC,AA1ED,IA0EC","sourcesContent":["import { DBase } from \"./d-base\";\nimport { DChartAxisBaseOptionParser } from \"./d-chart-axis-base-options-parser\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartAxisTickMinor } from \"./d-chart-axis-tick-minor\";\nimport { EShape } from \"./shape/e-shape\";\nimport { EShapePointsStyle } from \"./shape/e-shape-points-style\";\nimport { EShapeBar } from \"./shape/variant/e-shape-bar\";\n\nexport class DChartAxisBaseTickMinor<CHART extends DBase = DBase>\n\timplements DChartAxisTickMinor<CHART>\n{\n\tprotected _parser: DChartAxisBaseOptionParser;\n\tprotected _container?: DChartAxisContainer<CHART>;\n\tprotected _index: number;\n\tprotected _shapes?: EShape[];\n\n\tconstructor(parser: DChartAxisBaseOptionParser) {\n\t\tthis._parser = parser;\n\t\tthis._index = 0;\n\t}\n\n\tget shapes(): EShape[] {\n\t\treturn (this._shapes ??= this.newShapes());\n\t}\n\n\tprotected newShapes(): EShape[] {\n\t\tconst result: EShape[] = [];\n\t\tconst tick = this._parser.tick;\n\t\tif (tick.enable) {\n\t\t\tconst minor = tick.minor;\n\t\t\tconst count = minor.count;\n\t\t\tconst size = minor.size;\n\t\t\tconst position = minor.position;\n\t\t\tconst style = minor.style ?? EShapePointsStyle.NONE;\n\t\t\tconst major = tick.major;\n\t\t\tfor (let i = 0, imax = (major.capacity + 1) * count; i < imax; ++i) {\n\t\t\t\tconst shape = new EShapeBar();\n\t\t\t\tshape.points.position = position;\n\t\t\t\tshape.points.size = size;\n\t\t\t\tshape.points.style = style;\n\t\t\t\tshape.stroke.copy(minor.stroke);\n\t\t\t\tshape.text.copy(minor.text);\n\t\t\t\tshape.size.set(0, 0);\n\t\t\t\tresult.push(shape);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tbind(container: DChartAxisContainer<CHART>, index: number): void {\n\t\tthis._container = container;\n\t\tthis._index = index;\n\t\tconst shapes = this.shapes;\n\t\tconst containerContainer = container.container;\n\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\tshapes[i].attach(containerContainer);\n\t\t}\n\t}\n\n\tunbind(): void {\n\t\tconst shapes = this._shapes;\n\t\tif (shapes != null) {\n\t\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\t\tshapes[i].detach();\n\t\t\t}\n\t\t}\n\t\tthis._index = 0;\n\t\tthis._container = undefined;\n\t}\n\n\tdestroy(): void {\n\t\tconst shapes = this._shapes;\n\t\tif (shapes != null) {\n\t\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\t\tshapes[i].destroy();\n\t\t\t}\n\t\t\tshapes.length = 0;\n\t\t\tthis._shapes = undefined;\n\t\t}\n\t\tthis._index = 0;\n\t\tthis._container = undefined;\n\t}\n}\n"]}
|
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { DChartAxisPosition } from "./d-chart-axis-position";
|
|
6
|
-
import { EShapeContainer } from "./shape/e-shape-container";
|
|
7
6
|
import { toEnum } from "./util/to-enum";
|
|
8
7
|
var DChartAxisContainerImpl = /** @class */ (function () {
|
|
9
|
-
function DChartAxisContainerImpl(plotArea, options) {
|
|
8
|
+
function DChartAxisContainerImpl(plotArea, container, options) {
|
|
10
9
|
this._plotArea = plotArea;
|
|
11
|
-
this._container =
|
|
10
|
+
this._container = container;
|
|
12
11
|
this._list = new Map();
|
|
13
12
|
}
|
|
14
13
|
Object.defineProperty(DChartAxisContainerImpl.prototype, "container", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-chart-axis-container-impl.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-container-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"d-chart-axis-container-impl.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-container-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;IAOC,iCACC,QAA2D,EAC3D,SAA0B,EAC1B,OAA2C;QAE3C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAA2C,CAAC;IACjE,CAAC;IAED,sBAAI,8CAAS;aAAb;YACC,OAAO,IAAI,CAAC,UAAU,CAAC;QACxB,CAAC;;;OAAA;IAED,sBAAI,6CAAQ;aAAZ;YACC,OAAO,IAAI,CAAC,SAAS,CAAC;QACvB,CAAC;;;O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,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAC,IAAyB;YAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE;gBAClD,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;aAClB;YACD,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QACjB,CAAC,CAAC,CAAC;IACJ,CAAC;IACF,8BAAC;AAAD,CAAC,AAxGD,IAwGC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { DChartAxis } from \"./d-chart-axis\";\nimport { DChartAxisContainer, DChartAxisContainerOptions } from \"./d-chart-axis-container\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\nimport { DChartPlotArea, DChartPlotAreaLike } from \"./d-chart-plot-area\";\nimport { EShapeContainer } from \"./shape/e-shape-container\";\nimport { toEnum } from \"./util/to-enum\";\n\nexport class DChartAxisContainerImpl<CHART extends DBase = DBase>\n\timplements DChartAxisContainer<CHART>\n{\n\tprotected _plotArea: DChartPlotArea<CHART> | DChartPlotAreaLike<CHART>;\n\tprotected _container: EShapeContainer;\n\tprotected _list: Map<DChartAxisPosition, DChartAxis<CHART>[]>;\n\n\tconstructor(\n\t\tplotArea: DChartPlotArea<CHART> | DChartPlotAreaLike<CHART>,\n\t\tcontainer: EShapeContainer,\n\t\toptions?: DChartAxisContainerOptions<CHART>\n\t) {\n\t\tthis._plotArea = plotArea;\n\t\tthis._container = container;\n\t\tthis._list = new Map<DChartAxisPosition, DChartAxis<CHART>[]>();\n\t}\n\n\tget container(): EShapeContainer {\n\t\treturn this._container;\n\t}\n\n\tget plotArea(): DChartPlotArea<CHART> | DChartPlotAreaLike<CHART> {\n\t\treturn this._plotArea;\n\t}\n\n\tadd(axis: DChartAxis<CHART>): void {\n\t\tconst list = this._list;\n\t\tlet axes = list.get(axis.position);\n\t\tif (axes == null) {\n\t\t\taxes = [];\n\t\t\tlist.set(axis.position, axes);\n\t\t}\n\t\taxes.push(axis);\n\t\taxis.bind(this, axes.length - 1);\n\t}\n\n\tget(\n\t\tposition: DChartAxisPosition | keyof typeof DChartAxisPosition,\n\t\tindex: number\n\t): DChartAxis<CHART> | null {\n\t\tconst list = this._list;\n\t\tconst axes = list.get(toEnum(position, DChartAxisPosition));\n\t\tif (axes) {\n\t\t\tif (0 <= index && index < axes.length) {\n\t\t\t\treturn axes[index];\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tindexOf(axis: DChartAxis<CHART>): number {\n\t\tconst list = this._list;\n\t\tconst axes = list.get(axis.position);\n\t\tif (axes) {\n\t\t\treturn axes.indexOf(axis);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tclear(position: DChartAxisPosition | keyof typeof DChartAxisPosition): this {\n\t\tconst list = this._list;\n\t\tconst axes = list.get(toEnum(position, DChartAxisPosition));\n\t\tif (axes) {\n\t\t\tfor (let i = 0, imax = axes.length; i < imax; ++i) {\n\t\t\t\taxes[i].destroy();\n\t\t\t}\n\t\t\taxes.length = 0;\n\t\t}\n\t\treturn this;\n\t}\n\n\tsize(position: DChartAxisPosition | keyof typeof DChartAxisPosition): number {\n\t\tconst list = this._list;\n\t\tconst axes = list.get(toEnum(position, DChartAxisPosition));\n\t\tif (axes) {\n\t\t\treturn axes.length;\n\t\t}\n\t\treturn 0;\n\t}\n\n\tupdate(): void {\n\t\tthis._list.forEach((axes: DChartAxis<CHART>[]): void => {\n\t\t\tfor (let i = 0, imax = axes.length; i < imax; ++i) {\n\t\t\t\taxes[i].update();\n\t\t\t}\n\t\t});\n\t}\n\n\tonRender(): void {\n\t\tthis._list.forEach((axes: DChartAxis<CHART>[]): void => {\n\t\t\tfor (let i = 0, imax = axes.length; i < imax; ++i) {\n\t\t\t\taxes[i].onRender();\n\t\t\t}\n\t\t});\n\t}\n\n\tdestroy(): void {\n\t\tthis._list.forEach((axes: DChartAxis<CHART>[]): void => {\n\t\t\tfor (let i = 0, imax = axes.length; i < imax; ++i) {\n\t\t\t\taxes[i].destroy();\n\t\t\t}\n\t\t\taxes.length = 0;\n\t\t});\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-chart-axis-container.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-container.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 { DChartAxis } from \"./d-chart-axis\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\nimport { DChartPlotArea } from \"./d-chart-plot-area\";\nimport { EShapeContainer } from \"./shape/e-shape-container\";\n\nexport interface DChartAxisContainerOptions<CHART extends DBase = DBase> {\n\tlist?: DChartAxis<CHART>[];\n}\n\nexport interface DChartAxisContainer<CHART extends DBase = DBase> {\n\treadonly container: EShapeContainer;\n\treadonly plotArea: DChartPlotArea<CHART>;\n\n\tadd(axis: DChartAxis<CHART>): void;\n\tget(\n\t\tposition: DChartAxisPosition | keyof typeof DChartAxisPosition,\n\t\tindex: number\n\t): DChartAxis<CHART> | null;\n\tindexOf(axis: DChartAxis<CHART>): number;\n\tclear(position: DChartAxisPosition | keyof typeof DChartAxisPosition): this;\n\tsize(position: DChartAxisPosition | keyof typeof DChartAxisPosition): number;\n\tupdate(): void;\n\tonRender(): void;\n\tdestroy(): void;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"d-chart-axis-container.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-container.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 { DChartAxis } from \"./d-chart-axis\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\nimport { DChartPlotArea, DChartPlotAreaLike } from \"./d-chart-plot-area\";\nimport { EShapeContainer } from \"./shape/e-shape-container\";\n\nexport interface DChartAxisContainerOptions<CHART extends DBase = DBase> {\n\tlist?: DChartAxis<CHART>[];\n}\n\nexport interface DChartAxisContainer<CHART extends DBase = DBase> {\n\treadonly container: EShapeContainer;\n\treadonly plotArea: DChartPlotArea<CHART> | DChartPlotAreaLike<CHART>;\n\n\tadd(axis: DChartAxis<CHART>): void;\n\tget(\n\t\tposition: DChartAxisPosition | keyof typeof DChartAxisPosition,\n\t\tindex: number\n\t): DChartAxis<CHART> | null;\n\tindexOf(axis: DChartAxis<CHART>): number;\n\tclear(position: DChartAxisPosition | keyof typeof DChartAxisPosition): this;\n\tsize(position: DChartAxisPosition | keyof typeof DChartAxisPosition): number;\n\tupdate(): void;\n\tonRender(): void;\n\tdestroy(): void;\n}\n"]}
|
|
@@ -71,9 +71,12 @@ var DChartAxisGuideSimple = /** @class */ (function () {
|
|
|
71
71
|
var axis = this._axis;
|
|
72
72
|
if (shape != null && container != null && axis != null) {
|
|
73
73
|
var plotArea = container.plotArea;
|
|
74
|
+
var plotAreaBounds = plotArea.getAxisBounds(axis.position);
|
|
75
|
+
var plotAreaX = plotAreaBounds.x;
|
|
76
|
+
var plotAreaY = plotAreaBounds.y;
|
|
77
|
+
var plotAreaWidth = plotAreaBounds.width;
|
|
78
|
+
var plotAreaHeight = plotAreaBounds.height;
|
|
74
79
|
var transform = plotArea.container.transform.localTransform;
|
|
75
|
-
var plotAreaWidth = plotArea.width;
|
|
76
|
-
var plotAreaHeight = plotArea.height;
|
|
77
80
|
var offset = axis.padding * index;
|
|
78
81
|
switch (axis.position) {
|
|
79
82
|
case DChartAxisPosition.TOP:
|
|
@@ -84,10 +87,10 @@ var DChartAxisGuideSimple = /** @class */ (function () {
|
|
|
84
87
|
work.set(coordinateX.transform.map(coordinateX.map(this._position)), 0);
|
|
85
88
|
transform.apply(work, work);
|
|
86
89
|
var x = work.x;
|
|
87
|
-
shape.update(axis.position, x, plotAreaHeight * 0.5, this._isShown &&
|
|
90
|
+
shape.update(axis.position, x, plotAreaY + plotAreaHeight * 0.5, this._isShown && plotAreaX <= x && x <= plotAreaX + plotAreaWidth, plotAreaWidth, plotAreaHeight, offset);
|
|
88
91
|
}
|
|
89
92
|
else {
|
|
90
|
-
shape.update(axis.position,
|
|
93
|
+
shape.update(axis.position, plotAreaX, plotAreaY + plotAreaHeight * 0.5, false, plotAreaWidth, plotAreaHeight, offset);
|
|
91
94
|
}
|
|
92
95
|
break;
|
|
93
96
|
case DChartAxisPosition.LEFT:
|
|
@@ -98,10 +101,10 @@ var DChartAxisGuideSimple = /** @class */ (function () {
|
|
|
98
101
|
work.set(0, coordinateY.transform.map(coordinateY.map(this._position)));
|
|
99
102
|
transform.apply(work, work);
|
|
100
103
|
var y = work.y;
|
|
101
|
-
shape.update(axis.position, plotAreaWidth * 0.5, y, this._isShown &&
|
|
104
|
+
shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, y, this._isShown && plotAreaY <= y && y <= plotAreaY + plotAreaHeight, plotAreaWidth, plotAreaHeight, offset);
|
|
102
105
|
}
|
|
103
106
|
else {
|
|
104
|
-
shape.update(axis.position, plotAreaWidth * 0.5,
|
|
107
|
+
shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, plotAreaY, false, plotAreaWidth, plotAreaHeight, offset);
|
|
105
108
|
}
|
|
106
109
|
break;
|
|
107
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-chart-axis-guide-simple.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-guide-simple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAIhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAM7D,OAAO,EAAE,8BAA8B,EAAE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E,IAAuB;QACjF,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,sCAAM,GAAN;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,KAAK,IAAI,IAAI,EAAE;YAClB,KAAK,CAAC,MAAM,EAAE,CAAC;SACf;QACD,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,sCAAM,GAAN;QACC,IAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;QAClC,IAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,KAAK,IAAI,IAAI,IAAI,SAAS,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;YACvD,IAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;YACpC,IAAM,
|
|
1
|
+
{"version":3,"file":"d-chart-axis-guide-simple.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-guide-simple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAIhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAM7D,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AAMxF;IAUC,+BAAY,OAAsC;;QACjD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI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W,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;wBACxE,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;wBAC5B,IAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;wBACjB,KAAK,CAAC,MAAM,CACX,IAAI,CAAC,QAAQ,EACb,SAAS,GAAG,aAAa,GAAG,GAAG,EAC/B,CAAC,EACD,IAAI,CAAC,QAAQ,IAAI,SAAS,IAAI,CAAC,IAAI,CAAC,IAAI,SAAS,GAAG,cAAc,EAClE,aAAa,EACb,cAAc,EACd,MAAM,CACN,CAAC;qBACF;yBAAM;wBACN,KAAK,CAAC,MAAM,CACX,IAAI,CAAC,QAAQ,EACb,SAAS,GAAG,aAAa,GAAG,GAAG,EAC/B,SAAS,EACT,KAAK,EACL,aAAa,EACb,cAAc,EACd,MAAM,CACN,CAAC;qBACF;oBACD,MAAM;aACP;YACD,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAED,uCAAO,GAAP;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,KAAK,IAAI,IAAI,EAAE;YAClB,KAAK,CAAC,OAAO,EAAE,CAAC;SAChB;QACD,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC7B,CAAC;IACF,4BAAC;AAAD,CAAC,AAjKD,IAiKC","sourcesContent":["import { Point } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartAxisGuide } from \"./d-chart-axis-guide\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\nimport { DChartAxis } from \"./d-chart-axis\";\nimport {\n\tDChartAxisGuideSimpleShape,\n\tDChartAxisGuideSimpleShapeOptions\n} from \"./d-chart-axis-guide-simple-shape\";\nimport { DChartAxisGuideSimpleShapeImpl } from \"./d-chart-axis-guide-simple-shape-impl\";\n\nexport interface DChartAxisGuideSimpleOptions extends DChartAxisGuideSimpleShapeOptions {\n\tposition?: number;\n}\n\nexport class DChartAxisGuideSimple<CHART extends DBase = DBase> implements DChartAxisGuide<CHART> {\n\tprotected _axis?: DChartAxis<CHART>;\n\tprotected _options?: DChartAxisGuideSimpleOptions;\n\tprotected _container?: DChartAxisContainer<CHART>;\n\tprotected _index: number;\n\tprotected _shape?: DChartAxisGuideSimpleShape;\n\tprotected _position: number;\n\tprotected _work: Point;\n\tprotected _isShown: boolean;\n\n\tconstructor(options?: DChartAxisGuideSimpleOptions) {\n\t\tthis._options = options;\n\t\tthis._index = 0;\n\t\tthis._position = options?.position ?? 0;\n\t\tthis._work = new Point();\n\t\tthis._isShown = true;\n\t}\n\n\tget shape(): DChartAxisGuideSimpleShape {\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(): DChartAxisGuideSimpleShape {\n\t\treturn new DChartAxisGuideSimpleShapeImpl(this._options);\n\t}\n\n\tget position(): number {\n\t\treturn this._position;\n\t}\n\n\tset position(position: number) {\n\t\tthis._position = position;\n\t}\n\n\tshow(): this {\n\t\tthis._isShown = true;\n\t\treturn this;\n\t}\n\n\tisShown(): boolean {\n\t\treturn this._isShown;\n\t}\n\n\thide(): this {\n\t\tthis._isShown = false;\n\t\treturn this;\n\t}\n\n\tisHidden(): boolean {\n\t\treturn !this._isShown;\n\t}\n\n\tbind(container: DChartAxisContainer<CHART>, index: number, axis: DChartAxis<CHART>): void {\n\t\tthis._container = container;\n\t\tthis._index = index;\n\t\tthis._axis = axis;\n\t\tthis.shape.bind(container, index, axis);\n\t}\n\n\tunbind(): void {\n\t\tconst shape = this._shape;\n\t\tif (shape != null) {\n\t\t\tshape.unbind();\n\t\t}\n\t\tthis._axis = undefined;\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\tconst axis = this._axis;\n\t\tif (shape != null && container != null && axis != null) {\n\t\t\tconst plotArea = container.plotArea;\n\t\t\tconst plotAreaBounds = plotArea.getAxisBounds(axis.position);\n\t\t\tconst plotAreaX = plotAreaBounds.x;\n\t\t\tconst plotAreaY = plotAreaBounds.y;\n\t\t\tconst plotAreaWidth = plotAreaBounds.width;\n\t\t\tconst plotAreaHeight = plotAreaBounds.height;\n\t\t\tconst transform = plotArea.container.transform.localTransform;\n\t\t\tconst offset = axis.padding * index;\n\t\t\tswitch (axis.position) {\n\t\t\t\tcase DChartAxisPosition.TOP:\n\t\t\t\tcase DChartAxisPosition.BOTTOM:\n\t\t\t\t\tconst coordinateX = plotArea.coordinate.x.get(axis.coordinate);\n\t\t\t\t\tif (coordinateX) {\n\t\t\t\t\t\tconst work = this._work;\n\t\t\t\t\t\twork.set(coordinateX.transform.map(coordinateX.map(this._position)), 0);\n\t\t\t\t\t\ttransform.apply(work, work);\n\t\t\t\t\t\tconst x = work.x;\n\t\t\t\t\t\tshape.update(\n\t\t\t\t\t\t\taxis.position,\n\t\t\t\t\t\t\tx,\n\t\t\t\t\t\t\tplotAreaY + plotAreaHeight * 0.5,\n\t\t\t\t\t\t\tthis._isShown && plotAreaX <= x && x <= plotAreaX + plotAreaWidth,\n\t\t\t\t\t\t\tplotAreaWidth,\n\t\t\t\t\t\t\tplotAreaHeight,\n\t\t\t\t\t\t\toffset\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshape.update(\n\t\t\t\t\t\t\taxis.position,\n\t\t\t\t\t\t\tplotAreaX,\n\t\t\t\t\t\t\tplotAreaY + plotAreaHeight * 0.5,\n\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\tplotAreaWidth,\n\t\t\t\t\t\t\tplotAreaHeight,\n\t\t\t\t\t\t\toffset\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DChartAxisPosition.LEFT:\n\t\t\t\tcase DChartAxisPosition.RIGHT:\n\t\t\t\t\tconst coordinateY = plotArea.coordinate.y.get(axis.coordinate);\n\t\t\t\t\tif (coordinateY) {\n\t\t\t\t\t\tconst work = this._work;\n\t\t\t\t\t\twork.set(0, coordinateY.transform.map(coordinateY.map(this._position)));\n\t\t\t\t\t\ttransform.apply(work, work);\n\t\t\t\t\t\tconst y = work.y;\n\t\t\t\t\t\tshape.update(\n\t\t\t\t\t\t\taxis.position,\n\t\t\t\t\t\t\tplotAreaX + plotAreaWidth * 0.5,\n\t\t\t\t\t\t\ty,\n\t\t\t\t\t\t\tthis._isShown && plotAreaY <= y && y <= plotAreaY + plotAreaHeight,\n\t\t\t\t\t\t\tplotAreaWidth,\n\t\t\t\t\t\t\tplotAreaHeight,\n\t\t\t\t\t\t\toffset\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshape.update(\n\t\t\t\t\t\t\taxis.position,\n\t\t\t\t\t\t\tplotAreaX + plotAreaWidth * 0.5,\n\t\t\t\t\t\t\tplotAreaY,\n\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\tplotAreaWidth,\n\t\t\t\t\t\t\tplotAreaHeight,\n\t\t\t\t\t\t\toffset\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\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"]}
|
|
@@ -89,12 +89,10 @@ var DChartCoordinateBase = /** @class */ (function () {
|
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
91
|
DChartCoordinateBase.prototype.getPixelDomain = function (plotArea, result) {
|
|
92
|
-
|
|
93
|
-
return result.set(padding.getLeft(), plotArea.width - padding.getRight());
|
|
92
|
+
return plotArea.getPixelDomain(result);
|
|
94
93
|
};
|
|
95
94
|
DChartCoordinateBase.prototype.getPixelRange = function (plotArea, result) {
|
|
96
|
-
|
|
97
|
-
return result.set(plotArea.height - padding.getBottom(), padding.getTop());
|
|
95
|
+
return plotArea.getPixelRange(result);
|
|
98
96
|
};
|
|
99
97
|
DChartCoordinateBase.prototype.toFitDomain = function (from, to, plotArea, result) {
|
|
100
98
|
if (from == null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-chart-coordinate-base.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-coordinate-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAQ3E,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAEN,iCAAiC,EACjC,MAAM,qCAAqC,CAAC;AAG7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC;IAcC,8BAAY,OAAiC;QAC5C,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QACb,IAAI,CAAC,UAAU,GAAG,yBAAyB,CAAC,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACpC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAC,CAAC;QACxD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,KAAK,GAAG,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AE,CAAC;IACjD,CAAC;IAES,8CAAe,GAAzB;QACC,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAClD,CAAC;IAES,sCAAO,GAAjB;QACC,OAAO,kBAAkB,CAAC;IAC3B,CAAC;IACF,2BAAC;AAAD,CAAC,AA3QD,IA2QC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport {\n\tDChartCoordinate,\n\tDChartCoordinateOptions,\n\tDThemeChartCoordinate\n} from \"./d-chart-coordinate\";\nimport { DChartCoordinateContainerSub } from \"./d-chart-coordinate-container-sub\";\nimport { DChartCoordinateDirection } from \"./d-chart-coordinate-direction\";\nimport { DChartCoordinateTick, DChartCoordinateTickOptions } from \"./d-chart-coordinate-tick\";\nimport { DChartCoordinateTickMajorStepFunction } from \"./d-chart-coordinate-tick-major-step-function\";\nimport { DChartCoordinateTickMinorStepFunction } from \"./d-chart-coordinate-tick-minor-step-function\";\nimport {\n\tDChartCoordinateTransform,\n\tDChartCoordinateTransformOptions\n} from \"./d-chart-coordinate-transform\";\nimport { DChartCoordinateTransformImpl } from \"./d-chart-coordinate-transform-impl\";\nimport {\n\tDChartCoordinateTransformMark,\n\tDChartCoordinateTransformMarkImpl\n} from \"./d-chart-coordinate-transform-mark\";\nimport { DChartPlotArea } from \"./d-chart-plot-area\";\nimport { DChartRegion } from \"./d-chart-region\";\nimport { DChartRegionImpl } from \"./d-chart-region-impl\";\nimport { DThemes } from \"./theme/d-themes\";\nimport { isNaN } from \"./util/is-nan\";\n\nexport abstract class DChartCoordinateBase<CHART extends DBase = DBase>\n\timplements DChartCoordinate<CHART>\n{\n\tprotected _id: number;\n\tprotected _transform: DChartCoordinateTransform<CHART>;\n\tprotected _container?: DChartCoordinateContainerSub<CHART>;\n\tprotected _direction: DChartCoordinateDirection;\n\tprotected _theme: DThemeChartCoordinate;\n\tprotected _work: DChartRegionImpl;\n\tprotected _tick: DChartCoordinateTick<CHART>;\n\tprotected _mark: DChartCoordinateTransformMark;\n\tprotected _from?: number;\n\tprotected _to?: number;\n\n\tconstructor(options?: DChartCoordinateOptions) {\n\t\tthis._id = 0;\n\t\tthis._direction = DChartCoordinateDirection.X;\n\t\tthis._theme = this.toTheme(options);\n\t\tthis._transform = this.newTransform(options?.transform);\n\t\tthis._tick = this.newTick(options?.tick);\n\t\tthis._work = this.newRegion();\n\t\tthis._mark = this.newMark();\n\t\tthis._from = options?.from;\n\t\tthis._to = options?.to;\n\t}\n\n\tprotected newTransform(\n\t\toptions?: DChartCoordinateTransformOptions\n\t): DChartCoordinateTransform<CHART> {\n\t\treturn new DChartCoordinateTransformImpl(options);\n\t}\n\n\tprotected abstract newTick(options?: DChartCoordinateTickOptions): DChartCoordinateTick<CHART>;\n\n\tprotected newRegion(): DChartRegion {\n\t\treturn new DChartRegionImpl(NaN, NaN);\n\t}\n\n\tprotected newMark(): DChartCoordinateTransformMark {\n\t\treturn new DChartCoordinateTransformMarkImpl();\n\t}\n\n\tget from(): number | undefined {\n\t\treturn this._from;\n\t}\n\n\tset from(from: number | undefined) {\n\t\tthis._from = from;\n\t}\n\n\tget to(): number | undefined {\n\t\treturn this._to;\n\t}\n\n\tset to(to: number | undefined) {\n\t\tthis._to = to;\n\t}\n\n\tbind(\n\t\tcontainer: DChartCoordinateContainerSub<CHART>,\n\t\tdirection: DChartCoordinateDirection\n\t): void {\n\t\tthis._container = container;\n\t\tthis._direction = direction;\n\t\tthis._transform.bind(container, direction);\n\t}\n\n\tunbind(): void {\n\t\tthis._container = undefined;\n\t\tthis._transform.unbind();\n\t}\n\n\tfit(from?: number, to?: number): void {\n\t\tthis.doFit(from, to, this._transform);\n\t}\n\n\tmark(from?: number, to?: number): void {\n\t\tconst mark = this._mark;\n\t\tconst transform = this._transform;\n\t\tmark.oldTranslate = transform.translate;\n\t\tmark.oldScale = transform.scale;\n\t\tthis.doFit(from, to, mark);\n\t}\n\n\tblend(ratio: number): void {\n\t\tthis._transform.blend(ratio, this._mark);\n\t}\n\n\tprotected doFit(\n\t\tfrom: number | undefined,\n\t\tto: number | undefined,\n\t\tresult: DChartCoordinateTransformMark | DChartCoordinateTransform<CHART>\n\t): void {\n\t\tconst container = this._container;\n\t\tif (container) {\n\t\t\tconst plotArea = container.container.plotArea;\n\t\t\tconst work = this._work;\n\t\t\tswitch (this._direction) {\n\t\t\t\tcase DChartCoordinateDirection.X:\n\t\t\t\t\tthis.getPixelDomain(plotArea, work);\n\t\t\t\t\tthis.doFit_(\n\t\t\t\t\t\twork.from,\n\t\t\t\t\t\twork.to,\n\t\t\t\t\t\tthis.toFitDomain(from, to, plotArea, work),\n\t\t\t\t\t\tresult\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DChartCoordinateDirection.Y:\n\t\t\t\t\tthis.getPixelRange(plotArea, work);\n\t\t\t\t\tthis.doFit_(\n\t\t\t\t\t\twork.from,\n\t\t\t\t\t\twork.to,\n\t\t\t\t\t\tthis.toFitRange(from, to, plotArea, work),\n\t\t\t\t\t\tresult\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected getPixelDomain(plotArea: DChartPlotArea<CHART>, result: DChartRegion): DChartRegion {\n\t\tconst padding = plotArea.padding;\n\t\treturn result.set(padding.getLeft(), plotArea.width - padding.getRight());\n\t}\n\n\tprotected getPixelRange(plotArea: DChartPlotArea<CHART>, result: DChartRegion): DChartRegion {\n\t\tconst padding = plotArea.padding;\n\t\treturn result.set(plotArea.height - padding.getBottom(), padding.getTop());\n\t}\n\n\tprotected toFitDomain(\n\t\tfrom: number | undefined,\n\t\tto: number | undefined,\n\t\tplotArea: DChartPlotArea<CHART>,\n\t\tresult: DChartRegion\n\t): DChartRegion {\n\t\tif (from == null) {\n\t\t\tfrom = this._from;\n\t\t}\n\t\tif (to == null) {\n\t\t\tto = this._to;\n\t\t}\n\t\tif (from != null && to != null) {\n\t\t\tresult.set(from, to);\n\t\t} else {\n\t\t\tplotArea.series.getDomain(this, result);\n\t\t\tresult.set(from, to);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected toFitRange(\n\t\tfrom: number | undefined,\n\t\tto: number | undefined,\n\t\tplotArea: DChartPlotArea<CHART>,\n\t\tresult: DChartRegion\n\t): DChartRegion {\n\t\tif (from == null) {\n\t\t\tfrom = this._from;\n\t\t}\n\t\tif (to == null) {\n\t\t\tto = this._to;\n\t\t}\n\t\tif (from != null && to != null) {\n\t\t\tresult.set(from, to);\n\t\t} else {\n\t\t\tplotArea.series.getRange(this, result);\n\t\t\tresult.set(from, to);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected doFit_(\n\t\tpixelFrom: number,\n\t\tpixelTo: number,\n\t\tregion: DChartRegion,\n\t\tresult: DChartCoordinateTransformMark | DChartCoordinateTransform<CHART>\n\t): void {\n\t\tconst regionFrom = region.from;\n\t\tconst regionTo = region.to;\n\t\tif (!(isNaN(regionFrom) || isNaN(regionTo))) {\n\t\t\t// Scale\n\t\t\tlet newScale = 1;\n\t\t\tconst regionFromMapped = this.map(regionFrom);\n\t\t\tconst regionToMapped = this.map(regionTo);\n\t\t\tconst regionSizeMapped = regionToMapped - regionFromMapped;\n\t\t\tif (!this._theme.isZero(regionSizeMapped)) {\n\t\t\t\tconst pixelSize = pixelTo - pixelFrom;\n\t\t\t\tnewScale = pixelSize / regionSizeMapped;\n\t\t\t} else {\n\t\t\t\tnewScale = pixelTo < pixelFrom ? -1 : 1;\n\t\t\t}\n\n\t\t\t// Translation\n\t\t\tconst newTranslation = pixelFrom - regionFromMapped * newScale;\n\n\t\t\t// Done\n\t\t\tresult.set(newTranslation, newScale);\n\t\t}\n\t}\n\n\tget id(): number {\n\t\treturn this._id;\n\t}\n\n\tget transform(): DChartCoordinateTransform<CHART> {\n\t\treturn this._transform;\n\t}\n\n\tmap(value: number): number {\n\t\treturn value;\n\t}\n\n\tmapAll(values: number[], ifrom: number, iend: number, stride: number, offset: number): void {\n\t\t// DO NOTHING\n\t}\n\n\tunmap(value: number): number {\n\t\treturn value;\n\t}\n\n\tunmapAll(values: number[], ifrom: number, iend: number, stride: number, offset: number): void {\n\t\t// DO NOTHING\n\t}\n\n\tticks(\n\t\tdomainFrom: number,\n\t\tdomainTo: number,\n\t\tdomainVisibleFrom: number,\n\t\tdomainVisibleTo: number,\n\t\tmajorCount: number,\n\t\tmajorCapacity: number,\n\t\tmajorStep: number | DChartCoordinateTickMajorStepFunction | undefined,\n\t\tminorCountPerMajor: number,\n\t\tminorCount: number,\n\t\tminorStep: number | DChartCoordinateTickMinorStepFunction | undefined,\n\t\tmajorResult: number[],\n\t\tminorResult: number[]\n\t): void {\n\t\tthis._tick.calculate(\n\t\t\tdomainFrom,\n\t\t\tdomainTo,\n\t\t\tdomainVisibleFrom,\n\t\t\tdomainVisibleTo,\n\t\t\tmajorCount,\n\t\t\tmajorCapacity,\n\t\t\tmajorStep,\n\t\t\tminorCountPerMajor,\n\t\t\tminorCount,\n\t\t\tminorStep,\n\t\t\tmajorResult,\n\t\t\tminorResult,\n\t\t\tthis\n\t\t);\n\t}\n\n\tprotected toTheme(options?: DChartCoordinateOptions): DThemeChartCoordinate {\n\t\treturn options?.theme ?? this.getThemeDefault();\n\t}\n\n\tprotected getThemeDefault(): DThemeChartCoordinate {\n\t\treturn DThemes.getInstance().get(this.getType());\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DChartCoordinate\";\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"d-chart-coordinate-base.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-coordinate-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAQ3E,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AACpF,OAAO,EAEN,iCAAiC,EACjC,MAAM,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,SAAqE,EACrE,WAAqB,EACrB,WAAqB;QAErB,IAAI,CAAC,KAAK,CAAC,SAAS,CACnB,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,IAAI,CACJ,CAAC;IACH,CAAC;IAES,sCAAO,GAAjB,UAAkB,OAAiC;;QAClD,OAAO,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK,mCAAI,IAAI,CAAC,eAAe,EAAE,CAAC;IACjD,CAAC;IAES,8CAAe,GAAzB;QACC,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAClD,CAAC;IAES,sCAAO,GAAjB;QACC,OAAO,kBAAkB,CAAC;IAC3B,CAAC;IACF,2BAAC;AAAD,CAAC,AA/QD,IA+QC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport {\n\tDChartCoordinate,\n\tDChartCoordinateOptions,\n\tDThemeChartCoordinate\n} from \"./d-chart-coordinate\";\nimport { DChartCoordinateContainerSub } from \"./d-chart-coordinate-container-sub\";\nimport { DChartCoordinateDirection } from \"./d-chart-coordinate-direction\";\nimport { DChartCoordinateTick, DChartCoordinateTickOptions } from \"./d-chart-coordinate-tick\";\nimport { DChartCoordinateTickMajorStepFunction } from \"./d-chart-coordinate-tick-major-step-function\";\nimport { DChartCoordinateTickMinorStepFunction } from \"./d-chart-coordinate-tick-minor-step-function\";\nimport {\n\tDChartCoordinateTransform,\n\tDChartCoordinateTransformOptions\n} from \"./d-chart-coordinate-transform\";\nimport { DChartCoordinateTransformImpl } from \"./d-chart-coordinate-transform-impl\";\nimport {\n\tDChartCoordinateTransformMark,\n\tDChartCoordinateTransformMarkImpl\n} from \"./d-chart-coordinate-transform-mark\";\nimport { DChartPlotArea, DChartPlotAreaLike } from \"./d-chart-plot-area\";\nimport { DChartRegion } from \"./d-chart-region\";\nimport { DChartRegionImpl } from \"./d-chart-region-impl\";\nimport { DThemes } from \"./theme/d-themes\";\nimport { isNaN } from \"./util/is-nan\";\n\nexport abstract class DChartCoordinateBase<CHART extends DBase = DBase>\n\timplements DChartCoordinate<CHART>\n{\n\tprotected _id: number;\n\tprotected _transform: DChartCoordinateTransform<CHART>;\n\tprotected _container?: DChartCoordinateContainerSub<CHART>;\n\tprotected _direction: DChartCoordinateDirection;\n\tprotected _theme: DThemeChartCoordinate;\n\tprotected _work: DChartRegionImpl;\n\tprotected _tick: DChartCoordinateTick<CHART>;\n\tprotected _mark: DChartCoordinateTransformMark;\n\tprotected _from?: number;\n\tprotected _to?: number;\n\n\tconstructor(options?: DChartCoordinateOptions) {\n\t\tthis._id = 0;\n\t\tthis._direction = DChartCoordinateDirection.X;\n\t\tthis._theme = this.toTheme(options);\n\t\tthis._transform = this.newTransform(options?.transform);\n\t\tthis._tick = this.newTick(options?.tick);\n\t\tthis._work = this.newRegion();\n\t\tthis._mark = this.newMark();\n\t\tthis._from = options?.from;\n\t\tthis._to = options?.to;\n\t}\n\n\tprotected newTransform(\n\t\toptions?: DChartCoordinateTransformOptions\n\t): DChartCoordinateTransform<CHART> {\n\t\treturn new DChartCoordinateTransformImpl(options);\n\t}\n\n\tprotected abstract newTick(options?: DChartCoordinateTickOptions): DChartCoordinateTick<CHART>;\n\n\tprotected newRegion(): DChartRegion {\n\t\treturn new DChartRegionImpl(NaN, NaN);\n\t}\n\n\tprotected newMark(): DChartCoordinateTransformMark {\n\t\treturn new DChartCoordinateTransformMarkImpl();\n\t}\n\n\tget from(): number | undefined {\n\t\treturn this._from;\n\t}\n\n\tset from(from: number | undefined) {\n\t\tthis._from = from;\n\t}\n\n\tget to(): number | undefined {\n\t\treturn this._to;\n\t}\n\n\tset to(to: number | undefined) {\n\t\tthis._to = to;\n\t}\n\n\tbind(\n\t\tcontainer: DChartCoordinateContainerSub<CHART>,\n\t\tdirection: DChartCoordinateDirection\n\t): void {\n\t\tthis._container = container;\n\t\tthis._direction = direction;\n\t\tthis._transform.bind(container, direction);\n\t}\n\n\tunbind(): void {\n\t\tthis._container = undefined;\n\t\tthis._transform.unbind();\n\t}\n\n\tfit(from?: number, to?: number): void {\n\t\tthis.doFit(from, to, this._transform);\n\t}\n\n\tmark(from?: number, to?: number): void {\n\t\tconst mark = this._mark;\n\t\tconst transform = this._transform;\n\t\tmark.oldTranslate = transform.translate;\n\t\tmark.oldScale = transform.scale;\n\t\tthis.doFit(from, to, mark);\n\t}\n\n\tblend(ratio: number): void {\n\t\tthis._transform.blend(ratio, this._mark);\n\t}\n\n\tprotected doFit(\n\t\tfrom: number | undefined,\n\t\tto: number | undefined,\n\t\tresult: DChartCoordinateTransformMark | DChartCoordinateTransform<CHART>\n\t): void {\n\t\tconst container = this._container;\n\t\tif (container) {\n\t\t\tconst plotArea = container.container.plotArea;\n\t\t\tconst work = this._work;\n\t\t\tswitch (this._direction) {\n\t\t\t\tcase DChartCoordinateDirection.X:\n\t\t\t\t\tthis.getPixelDomain(plotArea, work);\n\t\t\t\t\tthis.doFit_(\n\t\t\t\t\t\twork.from,\n\t\t\t\t\t\twork.to,\n\t\t\t\t\t\tthis.toFitDomain(from, to, plotArea, work),\n\t\t\t\t\t\tresult\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DChartCoordinateDirection.Y:\n\t\t\t\t\tthis.getPixelRange(plotArea, work);\n\t\t\t\t\tthis.doFit_(\n\t\t\t\t\t\twork.from,\n\t\t\t\t\t\twork.to,\n\t\t\t\t\t\tthis.toFitRange(from, to, plotArea, work),\n\t\t\t\t\t\tresult\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected getPixelDomain(\n\t\tplotArea: DChartPlotArea<CHART> | DChartPlotAreaLike<CHART>,\n\t\tresult: DChartRegion\n\t): DChartRegion {\n\t\treturn plotArea.getPixelDomain(result);\n\t}\n\n\tprotected getPixelRange(\n\t\tplotArea: DChartPlotArea<CHART> | DChartPlotAreaLike<CHART>,\n\t\tresult: DChartRegion\n\t): DChartRegion {\n\t\treturn plotArea.getPixelRange(result);\n\t}\n\n\tprotected toFitDomain(\n\t\tfrom: number | undefined,\n\t\tto: number | undefined,\n\t\tplotArea: DChartPlotArea<CHART> | DChartPlotAreaLike<CHART>,\n\t\tresult: DChartRegion\n\t): DChartRegion {\n\t\tif (from == null) {\n\t\t\tfrom = this._from;\n\t\t}\n\t\tif (to == null) {\n\t\t\tto = this._to;\n\t\t}\n\t\tif (from != null && to != null) {\n\t\t\tresult.set(from, to);\n\t\t} else {\n\t\t\tplotArea.series.getDomain(this, result);\n\t\t\tresult.set(from, to);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected toFitRange(\n\t\tfrom: number | undefined,\n\t\tto: number | undefined,\n\t\tplotArea: DChartPlotArea<CHART> | DChartPlotAreaLike<CHART>,\n\t\tresult: DChartRegion\n\t): DChartRegion {\n\t\tif (from == null) {\n\t\t\tfrom = this._from;\n\t\t}\n\t\tif (to == null) {\n\t\t\tto = this._to;\n\t\t}\n\t\tif (from != null && to != null) {\n\t\t\tresult.set(from, to);\n\t\t} else {\n\t\t\tplotArea.series.getRange(this, result);\n\t\t\tresult.set(from, to);\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected doFit_(\n\t\tpixelFrom: number,\n\t\tpixelTo: number,\n\t\tregion: DChartRegion,\n\t\tresult: DChartCoordinateTransformMark | DChartCoordinateTransform<CHART>\n\t): void {\n\t\tconst regionFrom = region.from;\n\t\tconst regionTo = region.to;\n\t\tif (!(isNaN(regionFrom) || isNaN(regionTo))) {\n\t\t\t// Scale\n\t\t\tlet newScale = 1;\n\t\t\tconst regionFromMapped = this.map(regionFrom);\n\t\t\tconst regionToMapped = this.map(regionTo);\n\t\t\tconst regionSizeMapped = regionToMapped - regionFromMapped;\n\t\t\tif (!this._theme.isZero(regionSizeMapped)) {\n\t\t\t\tconst pixelSize = pixelTo - pixelFrom;\n\t\t\t\tnewScale = pixelSize / regionSizeMapped;\n\t\t\t} else {\n\t\t\t\tnewScale = pixelTo < pixelFrom ? -1 : 1;\n\t\t\t}\n\n\t\t\t// Translation\n\t\t\tconst newTranslation = pixelFrom - regionFromMapped * newScale;\n\n\t\t\t// Done\n\t\t\tresult.set(newTranslation, newScale);\n\t\t}\n\t}\n\n\tget id(): number {\n\t\treturn this._id;\n\t}\n\n\tget transform(): DChartCoordinateTransform<CHART> {\n\t\treturn this._transform;\n\t}\n\n\tmap(value: number): number {\n\t\treturn value;\n\t}\n\n\tmapAll(values: number[], ifrom: number, iend: number, stride: number, offset: number): void {\n\t\t// DO NOTHING\n\t}\n\n\tunmap(value: number): number {\n\t\treturn value;\n\t}\n\n\tunmapAll(values: number[], ifrom: number, iend: number, stride: number, offset: number): void {\n\t\t// DO NOTHING\n\t}\n\n\tticks(\n\t\tdomainFrom: number,\n\t\tdomainTo: number,\n\t\tdomainVisibleFrom: number,\n\t\tdomainVisibleTo: number,\n\t\tmajorCount: number,\n\t\tmajorCapacity: number,\n\t\tmajorStep: number | DChartCoordinateTickMajorStepFunction | undefined,\n\t\tminorCountPerMajor: number,\n\t\tminorCount: number,\n\t\tminorStep: number | DChartCoordinateTickMinorStepFunction | undefined,\n\t\tmajorResult: number[],\n\t\tminorResult: number[]\n\t): void {\n\t\tthis._tick.calculate(\n\t\t\tdomainFrom,\n\t\t\tdomainTo,\n\t\t\tdomainVisibleFrom,\n\t\t\tdomainVisibleTo,\n\t\t\tmajorCount,\n\t\t\tmajorCapacity,\n\t\t\tmajorStep,\n\t\t\tminorCountPerMajor,\n\t\t\tminorCount,\n\t\t\tminorStep,\n\t\t\tmajorResult,\n\t\t\tminorResult,\n\t\t\tthis\n\t\t);\n\t}\n\n\tprotected toTheme(options?: DChartCoordinateOptions): DThemeChartCoordinate {\n\t\treturn options?.theme ?? this.getThemeDefault();\n\t}\n\n\tprotected getThemeDefault(): DThemeChartCoordinate {\n\t\treturn DThemes.getInstance().get(this.getType());\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DChartCoordinate\";\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-chart-coordinate-container-impl.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-coordinate-container-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAM3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAE3F,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C;IAOC,uCACC,
|
|
1
|
+
{"version":3,"file":"d-chart-coordinate-container-impl.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-coordinate-container-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAM3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAE3F,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C;IAOC,uCACC,QAA2D,EAC3D,OAAiD;QAEjD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAM,CAAC,GAAG,IAAI,gCAAgC,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC,CAAC,CAAC;QAClF,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACZ,IAAM,CAAC,GAAG,IAAI,gCAAgC,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC,CAAC,CAAC;QAClF,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;QACZ,IAAI,OAAO,EAAE;YACZ,IAAM,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC;YACtB,IAAI,GAAG,EAAE;g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,EAAE,QAAiB,EAAE,SAAkB,EAAE,OAAgB;QAChF,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;QACnC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,6CAAK,GAAL,UAAM,KAAa;QAClB,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IACF,oCAAC;AAAD,CAAC,AArED,IAqEC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { DChartCoordinateDirection } from \"./d-chart-coordinate-direction\";\nimport {\n\tDChartCoordinateContainer,\n\tDChartCoordinateContainerOptions\n} from \"./d-chart-coordinate-container\";\nimport { DChartCoordinateContainerSub } from \"./d-chart-coordinate-container-sub\";\nimport { DChartCoordinateContainerSubImpl } from \"./d-chart-coordinate-container-sub-impl\";\nimport { DChartPlotArea, DChartPlotAreaLike } from \"./d-chart-plot-area\";\nimport { isArray } from \"./util/is-array\";\n\nexport class DChartCoordinateContainerImpl<CHART extends DBase = DBase>\n\timplements DChartCoordinateContainer<CHART>\n{\n\tprotected _x: DChartCoordinateContainerSub<CHART>;\n\tprotected _y: DChartCoordinateContainerSub<CHART>;\n\tprotected _plotArea: DChartPlotArea<CHART> | DChartPlotAreaLike<CHART>;\n\n\tconstructor(\n\t\tplotArea: DChartPlotArea<CHART> | DChartPlotAreaLike<CHART>,\n\t\toptions?: DChartCoordinateContainerOptions<CHART>\n\t) {\n\t\tthis._plotArea = plotArea;\n\t\tconst x = new DChartCoordinateContainerSubImpl(this, DChartCoordinateDirection.X);\n\t\tthis._x = x;\n\t\tconst y = new DChartCoordinateContainerSubImpl(this, DChartCoordinateDirection.Y);\n\t\tthis._y = y;\n\t\tif (options) {\n\t\t\tconst cxs = options.x;\n\t\t\tif (cxs) {\n\t\t\t\tif (isArray(cxs)) {\n\t\t\t\t\tfor (let i = 0, imax = cxs.length; i < imax; ++i) {\n\t\t\t\t\t\tx.add(cxs[i]);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tx.add(cxs);\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst cys = options.y;\n\t\t\tif (cys) {\n\t\t\t\tif (isArray(cys)) {\n\t\t\t\t\tfor (let i = 0, imax = cys.length; i < imax; ++i) {\n\t\t\t\t\t\ty.add(cys[i]);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ty.add(cys);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tget x(): DChartCoordinateContainerSub<CHART> {\n\t\treturn this._x;\n\t}\n\n\tget y(): DChartCoordinateContainerSub<CHART> {\n\t\treturn this._y;\n\t}\n\n\tget plotArea(): DChartPlotArea<CHART> | DChartPlotAreaLike<CHART> {\n\t\treturn this._plotArea;\n\t}\n\n\tfit(domainFrom?: number, domainTo?: number, rangeFrom?: number, rangeTo?: number): this {\n\t\tthis._x.fit(domainFrom, domainTo);\n\t\tthis._y.fit(rangeFrom, rangeTo);\n\t\treturn this;\n\t}\n\n\tmark(domainFrom?: number, domainTo?: number, rangeFrom?: number, rangeTo?: number): this {\n\t\tthis._x.mark(domainFrom, domainTo);\n\t\tthis._y.mark(rangeFrom, rangeTo);\n\t\treturn this;\n\t}\n\n\tblend(ratio: number): this {\n\t\tthis._x.blend(ratio);\n\t\tthis._y.blend(ratio);\n\t\treturn this;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-chart-coordinate-container.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-coordinate-container.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 { DChartCoordinate } from \"./d-chart-coordinate\";\nimport { DChartCoordinateContainerSub } from \"./d-chart-coordinate-container-sub\";\nimport { DChartPlotArea } from \"./d-chart-plot-area\";\n\nexport interface DChartCoordinateContainerOptions<CHART extends DBase = DBase> {\n\tx?: DChartCoordinate<CHART> | DChartCoordinate<CHART>[];\n\ty?: DChartCoordinate<CHART> | DChartCoordinate<CHART>[];\n}\n\nexport interface DChartCoordinateContainer<CHART extends DBase = DBase> {\n\tx: DChartCoordinateContainerSub<CHART>;\n\ty: DChartCoordinateContainerSub<CHART>;\n\tplotArea: DChartPlotArea<CHART>;\n\n\tfit(domainFrom?: number, domainTo?: number, rangeFrom?: number, rangeTo?: number): this;\n\tmark(domainFrom?: number, domainTo?: number, rangeFrom?: number, rangeTo?: number): this;\n\tblend(ratio: number): this;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"d-chart-coordinate-container.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-coordinate-container.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 { DChartCoordinate } from \"./d-chart-coordinate\";\nimport { DChartCoordinateContainerSub } from \"./d-chart-coordinate-container-sub\";\nimport { DChartPlotArea, DChartPlotAreaLike } from \"./d-chart-plot-area\";\n\nexport interface DChartCoordinateContainerOptions<CHART extends DBase = DBase> {\n\tx?: DChartCoordinate<CHART> | DChartCoordinate<CHART>[];\n\ty?: DChartCoordinate<CHART> | DChartCoordinate<CHART>[];\n}\n\nexport interface DChartCoordinateContainer<CHART extends DBase = DBase> {\n\tx: DChartCoordinateContainerSub<CHART>;\n\ty: DChartCoordinateContainerSub<CHART>;\n\tplotArea: DChartPlotArea<CHART> | DChartPlotAreaLike<CHART>;\n\n\tfit(domainFrom?: number, domainTo?: number, rangeFrom?: number, rangeTo?: number): this;\n\tmark(domainFrom?: number, domainTo?: number, rangeFrom?: number, rangeTo?: number): this;\n\tblend(ratio: number): this;\n}\n"]}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { __extends } from "tslib";
|
|
6
|
+
import { Point, Rectangle } from "pixi.js";
|
|
7
|
+
import { DBase } from "./d-base";
|
|
8
|
+
var DChartPlotAreaBase = /** @class */ (function (_super) {
|
|
9
|
+
__extends(DChartPlotAreaBase, _super);
|
|
10
|
+
function DChartPlotAreaBase(chart, options) {
|
|
11
|
+
var _this = _super.call(this, options) || this;
|
|
12
|
+
_this._isContainerBoundsDirty = true;
|
|
13
|
+
_this._containerBounds = new Rectangle();
|
|
14
|
+
_this._workPoint = new Point();
|
|
15
|
+
_this._pixelBounds = new Rectangle();
|
|
16
|
+
_this._chart = chart;
|
|
17
|
+
_this._blendStartTime = 0;
|
|
18
|
+
_this._blendDuration = 1000;
|
|
19
|
+
_this._blendTimeout = null;
|
|
20
|
+
_this._onBlendBound = function () {
|
|
21
|
+
_this.onBlend();
|
|
22
|
+
};
|
|
23
|
+
_this._isViewDirty = true;
|
|
24
|
+
_this._view = _this.newView(options);
|
|
25
|
+
return _this;
|
|
26
|
+
}
|
|
27
|
+
DChartPlotAreaBase.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
|
|
28
|
+
this._isViewDirty = true;
|
|
29
|
+
this._isContainerBoundsDirty = true;
|
|
30
|
+
_super.prototype.onResize.call(this, newWidth, newHeight, oldWidth, oldHeight);
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(DChartPlotAreaBase.prototype, "chart", {
|
|
33
|
+
get: function () {
|
|
34
|
+
return this._chart;
|
|
35
|
+
},
|
|
36
|
+
enumerable: false,
|
|
37
|
+
configurable: true
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(DChartPlotAreaBase.prototype, "view", {
|
|
40
|
+
get: function () {
|
|
41
|
+
return this._view;
|
|
42
|
+
},
|
|
43
|
+
enumerable: false,
|
|
44
|
+
configurable: true
|
|
45
|
+
});
|
|
46
|
+
DChartPlotAreaBase.prototype.onWheel = function (e, deltas, global) {
|
|
47
|
+
var vresult = this._view.onWheel(e, deltas, global);
|
|
48
|
+
var sresult = _super.prototype.onWheel.call(this, e, deltas, global);
|
|
49
|
+
return vresult || sresult;
|
|
50
|
+
};
|
|
51
|
+
DChartPlotAreaBase.prototype.onDblClick = function (e, interactionManager) {
|
|
52
|
+
var vresult = this._view.onDblClick(e, interactionManager);
|
|
53
|
+
var sresult = _super.prototype.onDblClick.call(this, e, interactionManager);
|
|
54
|
+
return vresult || sresult;
|
|
55
|
+
};
|
|
56
|
+
DChartPlotAreaBase.prototype.onDown = function (e) {
|
|
57
|
+
this._view.onDown(e);
|
|
58
|
+
_super.prototype.onDown.call(this, e);
|
|
59
|
+
};
|
|
60
|
+
DChartPlotAreaBase.prototype.render = function (renderer) {
|
|
61
|
+
if (this._isViewDirty) {
|
|
62
|
+
this._isViewDirty = false;
|
|
63
|
+
this.onViewDirty();
|
|
64
|
+
}
|
|
65
|
+
_super.prototype.render.call(this, renderer);
|
|
66
|
+
};
|
|
67
|
+
DChartPlotAreaBase.prototype.getPixelDomain = function (result) {
|
|
68
|
+
var padding = this.padding;
|
|
69
|
+
return result.set(padding.getLeft(), this.width - padding.getRight());
|
|
70
|
+
};
|
|
71
|
+
DChartPlotAreaBase.prototype.getPixelRange = function (result) {
|
|
72
|
+
var padding = this.padding;
|
|
73
|
+
return result.set(this.height - padding.getBottom(), padding.getTop());
|
|
74
|
+
};
|
|
75
|
+
DChartPlotAreaBase.prototype.getPixelBounds = function () {
|
|
76
|
+
var result = this._pixelBounds;
|
|
77
|
+
result.x = 0;
|
|
78
|
+
result.y = 0;
|
|
79
|
+
result.width = this.width;
|
|
80
|
+
result.height = this.height;
|
|
81
|
+
return result;
|
|
82
|
+
};
|
|
83
|
+
DChartPlotAreaBase.prototype.getAxisBounds = function (position) {
|
|
84
|
+
return this.getPixelBounds();
|
|
85
|
+
};
|
|
86
|
+
DChartPlotAreaBase.prototype.getSelectionBoundsX = function () {
|
|
87
|
+
return this.getPixelBounds();
|
|
88
|
+
};
|
|
89
|
+
DChartPlotAreaBase.prototype.getSelectionBoundsY = function () {
|
|
90
|
+
return this.getPixelBounds();
|
|
91
|
+
};
|
|
92
|
+
DChartPlotAreaBase.prototype.getContainerBounds = function () {
|
|
93
|
+
var result = this._containerBounds;
|
|
94
|
+
if (this._isContainerBoundsDirty) {
|
|
95
|
+
this._isContainerBoundsDirty = false;
|
|
96
|
+
var container = this.container;
|
|
97
|
+
container.updateTransform();
|
|
98
|
+
var transform = container.transform.localTransform;
|
|
99
|
+
var work = this._workPoint;
|
|
100
|
+
work.set(0, 0);
|
|
101
|
+
transform.applyInverse(work, work);
|
|
102
|
+
result.x = work.x;
|
|
103
|
+
result.y = work.y;
|
|
104
|
+
work.set(this.width, this.height);
|
|
105
|
+
transform.applyInverse(work, work);
|
|
106
|
+
result.width = work.x - result.x;
|
|
107
|
+
result.height = work.y - result.y;
|
|
108
|
+
}
|
|
109
|
+
return result;
|
|
110
|
+
};
|
|
111
|
+
DChartPlotAreaBase.prototype.getType = function () {
|
|
112
|
+
return "DChartPlotArea";
|
|
113
|
+
};
|
|
114
|
+
return DChartPlotAreaBase;
|
|
115
|
+
}(DBase));
|
|
116
|
+
export { DChartPlotAreaBase };
|
|
117
|
+
//# sourceMappingURL=d-chart-plot-area-base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-chart-plot-area-base.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAwC,KAAK,EAA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KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAClC,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACnC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;YACjC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;SAClC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAYS,oCAAO,GAAjB;QACC,OAAO,gBAAgB,CAAC;IACzB,CAAC;IACF,yBAAC;AAAD,CAAC,AA3KD,CAKS,KAAK,GAsKb","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { InteractionEvent, InteractionManager, Point, Rectangle, Renderer } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DBaseOverflowMask } from \"./d-base-overflow-mask\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartPlotArea, DThemeChartPlotArea, DChartPlotAreaOptions } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\nimport { DChartSeriesContainer } from \"./d-chart-series-container\";\nimport { DView } from \"./d-view\";\nimport { DViewImpl } from \"./d-view-impl\";\nimport { UtilWheelEventDeltas } from \"./util/util-wheel-event\";\nimport { DChartRegion } from \"./d-chart-region\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\n\nexport abstract class DChartPlotAreaBase<\n\t\tCHART extends DBase = DBase,\n\t\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea,\n\t\tOPTIONS extends DChartPlotAreaOptions<CHART, THEME> = DChartPlotAreaOptions<CHART, THEME>\n\t>\n\textends DBase<THEME, OPTIONS>\n\timplements DChartPlotArea<CHART>\n{\n\tprotected _isContainerBoundsDirty: boolean;\n\tprotected _containerBounds: Rectangle;\n\tprotected _workPoint: Point;\n\n\tprotected _pixelBounds: Rectangle;\n\n\tprotected _chart: CHART;\n\n\tprotected _view: DViewImpl;\n\tprotected _isViewDirty: boolean;\n\tprotected _overflowMask?: DBaseOverflowMask | null;\n\n\tprotected _blendStartTime: number;\n\tprotected _blendDuration: number;\n\tprotected _blendTimeout: number | null;\n\tprotected _onBlendBound: () => void;\n\n\tconstructor(chart: CHART, options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\tthis._isContainerBoundsDirty = true;\n\t\tthis._containerBounds = new Rectangle();\n\t\tthis._workPoint = new Point();\n\n\t\tthis._pixelBounds = new Rectangle();\n\n\t\tthis._chart = chart;\n\n\t\tthis._blendStartTime = 0;\n\t\tthis._blendDuration = 1000;\n\t\tthis._blendTimeout = null;\n\t\tthis._onBlendBound = () => {\n\t\t\tthis.onBlend();\n\t\t};\n\n\t\tthis._isViewDirty = true;\n\t\tthis._view = this.newView(options);\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tthis._isViewDirty = true;\n\t\tthis._isContainerBoundsDirty = true;\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t}\n\n\tget chart(): CHART {\n\t\treturn this._chart;\n\t}\n\n\tabstract get coordinate(): DChartCoordinateContainer<CHART>;\n\n\tabstract get series(): DChartSeriesContainer<CHART>;\n\n\tabstract get container(): DChartPlotAreaContainer;\n\n\tabstract get axis(): DChartAxisContainer<CHART>;\n\n\tget view(): DView {\n\t\treturn this._view;\n\t}\n\n\tabstract newView(options?: OPTIONS): DViewImpl;\n\n\tprotected onWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean {\n\t\tconst vresult = this._view.onWheel(e, deltas, global);\n\t\tconst sresult = super.onWheel(e, deltas, global);\n\t\treturn vresult || sresult;\n\t}\n\n\tprotected onDblClick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager\n\t): boolean {\n\t\tconst vresult = this._view.onDblClick(e, interactionManager);\n\t\tconst sresult = super.onDblClick(e, interactionManager);\n\t\treturn vresult || sresult;\n\t}\n\n\tprotected onDown(e: InteractionEvent): void {\n\t\tthis._view.onDown(e);\n\t\tsuper.onDown(e);\n\t}\n\n\trender(renderer: Renderer): void {\n\t\tif (this._isViewDirty) {\n\t\t\tthis._isViewDirty = false;\n\t\t\tthis.onViewDirty();\n\t\t}\n\t\tsuper.render(renderer);\n\t}\n\n\tprotected abstract onViewDirty(): void;\n\n\tabstract destroy(): void;\n\n\tgetPixelDomain(result: DChartRegion): DChartRegion {\n\t\tconst padding = this.padding;\n\t\treturn result.set(padding.getLeft(), this.width - padding.getRight());\n\t}\n\n\tgetPixelRange(result: DChartRegion): DChartRegion {\n\t\tconst padding = this.padding;\n\t\treturn result.set(this.height - padding.getBottom(), padding.getTop());\n\t}\n\n\tgetPixelBounds(): Rectangle {\n\t\tconst result = this._pixelBounds;\n\t\tresult.x = 0;\n\t\tresult.y = 0;\n\t\tresult.width = this.width;\n\t\tresult.height = this.height;\n\t\treturn result;\n\t}\n\n\tgetAxisBounds(position: DChartAxisPosition): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsX(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsY(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetContainerBounds(): Rectangle {\n\t\tconst result = this._containerBounds;\n\t\tif (this._isContainerBoundsDirty) {\n\t\t\tthis._isContainerBoundsDirty = false;\n\n\t\t\tconst container = this.container;\n\t\t\tcontainer.updateTransform();\n\t\t\tconst transform = container.transform.localTransform;\n\n\t\t\tconst work = this._workPoint;\n\n\t\t\twork.set(0, 0);\n\t\t\ttransform.applyInverse(work, work);\n\t\t\tresult.x = work.x;\n\t\t\tresult.y = work.y;\n\n\t\t\twork.set(this.width, this.height);\n\t\t\ttransform.applyInverse(work, work);\n\t\t\tresult.width = work.x - result.x;\n\t\t\tresult.height = work.y - result.y;\n\t\t}\n\t\treturn result;\n\t}\n\n\tabstract fit(\n\t\tduration?: number,\n\t\tdomainFrom?: number,\n\t\tdomainTo?: number,\n\t\trangeFrom?: number,\n\t\trangeTo?: number\n\t): this;\n\n\tprotected abstract onBlend(): void;\n\n\tprotected getType(): string {\n\t\treturn \"DChartPlotArea\";\n\t}\n}\n"]}
|