@genesislcap/g2plot-chart 14.197.1-alpha-1283f91.0 → 14.197.1
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/custom-elements.json +0 -4
- package/dist/dts/chart.d.ts +1 -16
- package/dist/dts/chart.d.ts.map +1 -1
- package/dist/esm/chart.js +4 -11
- package/package.json +14 -14
package/dist/dts/chart.d.ts
CHANGED
|
@@ -25,21 +25,7 @@ declare const G2PlotChart_base: (new (...args: any[]) => {
|
|
|
25
25
|
hidden: boolean;
|
|
26
26
|
inert: boolean;
|
|
27
27
|
innerText: string;
|
|
28
|
-
lang: string;
|
|
29
|
-
* Get which legend items are selected (shown/hidden) so they can be re-applied during a subsequent connectedCallback
|
|
30
|
-
*
|
|
31
|
-
* @remarks
|
|
32
|
-
* When moving a chart around with `appendChild()` the state of hidden/shown fields is reset. This callback function
|
|
33
|
-
* will cache the state of the legend items so they can be re-applied when the chart is re-rendered. The cache
|
|
34
|
-
* is applied in `this.initalizeConfiguration()`.
|
|
35
|
-
*
|
|
36
|
-
* To get the state of the legend items, the chart's `filteredData` is used. This is the data that is currently
|
|
37
|
-
* shown on the chart. If we diff this with all of the data from `this.data` we can work out which fields are hidden or shown.
|
|
38
|
-
*
|
|
39
|
-
* To get the legend name from the data to pass to the options we use a legend parser which is a function that takes a single
|
|
40
|
-
* data item and extracts the legend name from it. There are defaults for certain chart types in `this.getLegendNameFromData`
|
|
41
|
-
* but this can be overridden by passing a `legendParser` function to the chart.
|
|
42
|
-
*/
|
|
28
|
+
lang: string;
|
|
43
29
|
readonly offsetHeight: number;
|
|
44
30
|
readonly offsetLeft: number;
|
|
45
31
|
readonly offsetParent: Element;
|
|
@@ -347,7 +333,6 @@ export declare class G2PlotChart extends G2PlotChart_base {
|
|
|
347
333
|
chartContainer: HTMLElement;
|
|
348
334
|
type: ChartTypes;
|
|
349
335
|
config: any;
|
|
350
|
-
configChanged(): void;
|
|
351
336
|
data: any[];
|
|
352
337
|
errorItems: ChartErrorItem<ChartErrorEvent['detail']>[];
|
|
353
338
|
private legendSelected;
|
package/dist/dts/chart.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../src/chart.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAK/D,OAAO,EACL,WAAW,EACX,UAAU,EAGV,eAAe,EACf,cAAc,EACf,MAAM,eAAe,CAAC
|
|
1
|
+
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../src/chart.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAK/D,OAAO,EACL,WAAW,EACX,UAAU,EAGV,eAAe,EACf,cAAc,EACf,MAAM,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBvB;;GAEG;AACH,qBAAa,WAAY,SAAQ,gBAAiC;IACzD,KAAK,EAAE,WAAW,CAAC;IACnB,cAAc,EAAE,WAAW,CAAC;IAC7B,IAAI,EAAE,UAAU,CAAS;IACnB,MAAM,MAAC;IACP,IAAI,EAAE,GAAG,EAAE,CAAM;IACjB,UAAU,EAAE,cAAc,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAM;IAEzE,OAAO,CAAC,cAAc,CAAkC;IACxD,OAAO,CAAC,YAAY,CAAC,CAAqB;IAC1C,OAAO,CAAC,mBAAmB,CAA4B;IAEvD,WAAW,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;;IAmB5C,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,YAAY;IAUX,SAAS,IAAI,IAAI;IAU1B,WAAW;IAKX,iBAAiB;IAmBjB,oBAAoB,IAAI,IAAI;IAW5B,YAAY,mBAEV;IAEF,OAAO,CAAC,cAAc,CAapB;IAEF,OAAO,CAAC,qBAAqB,CAO3B;IAEF;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,8BAA8B;IA0BtC,OAAO,CAAC,sBAAsB,CAW5B;CACH;AAGD,eAAO,MAAM,4BAA4B,EAAE,cAA0B,CAAC;AAEtE,eAAO,MAAM,kBAAkB,IAAK,CAAC;AAErC;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;sBAMtB,CAAC"}
|
package/dist/esm/chart.js
CHANGED
|
@@ -13,11 +13,6 @@ ChartDatasource;
|
|
|
13
13
|
* @tagname %%prefix%%-g2plot-chart
|
|
14
14
|
*/
|
|
15
15
|
export class G2PlotChart extends LifecycleMixin(FoundationElement) {
|
|
16
|
-
configChanged() {
|
|
17
|
-
if (this.chartContainer) {
|
|
18
|
-
this.renderChart();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
16
|
dataChanged(oldValue, newValue) {
|
|
22
17
|
var _a;
|
|
23
18
|
if (!newValue)
|
|
@@ -89,19 +84,17 @@ export class G2PlotChart extends LifecycleMixin(FoundationElement) {
|
|
|
89
84
|
return copy;
|
|
90
85
|
}
|
|
91
86
|
renderChart() {
|
|
92
|
-
if (this.chart) {
|
|
93
|
-
this.chart.destroy();
|
|
94
|
-
this.chart.off('*', this.eventHandler);
|
|
95
|
-
}
|
|
96
87
|
this.initalizeChart[this.type](this.initalizeConfiguration());
|
|
97
88
|
this.chart.render();
|
|
98
|
-
this.chart.on('*', this.eventHandler);
|
|
99
89
|
}
|
|
100
90
|
connectedCallback() {
|
|
101
91
|
var _a;
|
|
102
92
|
super.connectedCallback();
|
|
103
93
|
registerRapidShape();
|
|
104
|
-
this.
|
|
94
|
+
if (this.config) {
|
|
95
|
+
this.renderChart();
|
|
96
|
+
this.chart.on('*', this.eventHandler);
|
|
97
|
+
}
|
|
105
98
|
this.cacheHiddenLegendItemsCallback = this.cacheHiddenLegendItemsCallback.bind(this);
|
|
106
99
|
// as the chart is destroyed in the disconnect the event is wiped
|
|
107
100
|
(_a = this.chart) === null || _a === void 0 ? void 0 : _a.on('legend-item:click', this.cacheHiddenLegendItemsCallback);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/g2plot-chart",
|
|
3
3
|
"description": "Genesis G2plot Chart",
|
|
4
|
-
"version": "14.197.1
|
|
4
|
+
"version": "14.197.1",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -53,22 +53,22 @@
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@genesislcap/foundation-testing": "14.197.1
|
|
57
|
-
"@genesislcap/genx": "14.197.1
|
|
58
|
-
"@genesislcap/rollup-builder": "14.197.1
|
|
59
|
-
"@genesislcap/ts-builder": "14.197.1
|
|
60
|
-
"@genesislcap/uvu-playwright-builder": "14.197.1
|
|
61
|
-
"@genesislcap/vite-builder": "14.197.1
|
|
62
|
-
"@genesislcap/webpack-builder": "14.197.1
|
|
56
|
+
"@genesislcap/foundation-testing": "14.197.1",
|
|
57
|
+
"@genesislcap/genx": "14.197.1",
|
|
58
|
+
"@genesislcap/rollup-builder": "14.197.1",
|
|
59
|
+
"@genesislcap/ts-builder": "14.197.1",
|
|
60
|
+
"@genesislcap/uvu-playwright-builder": "14.197.1",
|
|
61
|
+
"@genesislcap/vite-builder": "14.197.1",
|
|
62
|
+
"@genesislcap/webpack-builder": "14.197.1",
|
|
63
63
|
"rimraf": "^5.0.0"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@antv/g2plot": "^2.4.20",
|
|
67
|
-
"@genesislcap/foundation-comms": "14.197.1
|
|
68
|
-
"@genesislcap/foundation-logger": "14.197.1
|
|
69
|
-
"@genesislcap/foundation-ui": "14.197.1
|
|
70
|
-
"@genesislcap/foundation-utils": "14.197.1
|
|
71
|
-
"@genesislcap/foundation-zero": "14.197.1
|
|
67
|
+
"@genesislcap/foundation-comms": "14.197.1",
|
|
68
|
+
"@genesislcap/foundation-logger": "14.197.1",
|
|
69
|
+
"@genesislcap/foundation-ui": "14.197.1",
|
|
70
|
+
"@genesislcap/foundation-utils": "14.197.1",
|
|
71
|
+
"@genesislcap/foundation-zero": "14.197.1",
|
|
72
72
|
"@microsoft/fast-element": "^1.12.0",
|
|
73
73
|
"@microsoft/fast-foundation": "^2.49.4",
|
|
74
74
|
"tslib": "^2.3.1"
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"access": "public"
|
|
83
83
|
},
|
|
84
84
|
"customElements": "dist/custom-elements.json",
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "1da096e68875cde07e1c683bc75d6676b48d8093"
|
|
86
86
|
}
|