@genesislcap/g2plot-chart 14.172.3 → 14.173.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/custom-elements.json +159 -2
- package/dist/dts/chart-components.d.ts +4 -2
- package/dist/dts/chart-components.d.ts.map +1 -1
- package/dist/dts/chart-datasource/chart-datasource.config.d.ts +8 -0
- package/dist/dts/chart-datasource/chart-datasource.config.d.ts.map +1 -0
- package/dist/dts/chart-datasource/chart-datasource.d.ts +2 -0
- package/dist/dts/chart-datasource/chart-datasource.d.ts.map +1 -1
- package/dist/dts/chart-datasource/chart-datasource.types.d.ts +13 -0
- package/dist/dts/chart-datasource/chart-datasource.types.d.ts.map +1 -0
- package/dist/dts/chart-datasource/index.d.ts +2 -0
- package/dist/dts/chart-datasource/index.d.ts.map +1 -1
- package/dist/dts/chart.d.ts +10 -3
- package/dist/dts/chart.d.ts.map +1 -1
- package/dist/dts/chart.definitions.d.ts +16 -0
- package/dist/dts/chart.definitions.d.ts.map +1 -0
- package/dist/dts/chart.styles.d.ts +7 -0
- package/dist/dts/chart.styles.d.ts.map +1 -0
- package/dist/dts/chart.template.d.ts +7 -2
- package/dist/dts/chart.template.d.ts.map +1 -1
- package/dist/dts/chart.types.d.ts +28 -0
- package/dist/dts/chart.types.d.ts.map +1 -1
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/esm/chart-datasource/chart-datasource.config.js +7 -0
- package/dist/esm/chart-datasource/chart-datasource.js +20 -3
- package/dist/esm/chart-datasource/chart-datasource.types.js +1 -0
- package/dist/esm/chart-datasource/index.js +2 -0
- package/dist/esm/chart.definitions.js +15 -0
- package/dist/esm/chart.js +41 -10
- package/dist/esm/chart.styles.js +42 -0
- package/dist/esm/chart.template.js +12 -1
- package/dist/esm/index.js +1 -0
- package/package.json +14 -14
|
@@ -26,6 +26,58 @@
|
|
|
26
26
|
}
|
|
27
27
|
]
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
"kind": "javascript-module",
|
|
31
|
+
"path": "src/chart.definitions.ts",
|
|
32
|
+
"declarations": [
|
|
33
|
+
{
|
|
34
|
+
"kind": "variable",
|
|
35
|
+
"name": "chartErrorNames",
|
|
36
|
+
"type": {
|
|
37
|
+
"text": "{\n datasource: 'datasource',\n unknown: 'unknown',\n}"
|
|
38
|
+
},
|
|
39
|
+
"default": "{\n datasource: 'datasource',\n unknown: 'unknown',\n}",
|
|
40
|
+
"description": "The error names for the Chart component.",
|
|
41
|
+
"privacy": "public"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"exports": [
|
|
45
|
+
{
|
|
46
|
+
"kind": "js",
|
|
47
|
+
"name": "chartErrorNames",
|
|
48
|
+
"declaration": {
|
|
49
|
+
"name": "chartErrorNames",
|
|
50
|
+
"module": "src/chart.definitions.ts"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"kind": "javascript-module",
|
|
57
|
+
"path": "src/chart.styles.ts",
|
|
58
|
+
"declarations": [
|
|
59
|
+
{
|
|
60
|
+
"kind": "variable",
|
|
61
|
+
"name": "foundationChartStyles",
|
|
62
|
+
"type": {
|
|
63
|
+
"text": "ElementStyles"
|
|
64
|
+
},
|
|
65
|
+
"default": "css`\n :host {\n --datasource-error-background-color: var(--neutral-layer-4);\n --datasource-error-background-opacity: 0.5;\n --datasource-error-dialog-max-width: 50%;\n\n position: relative;\n width: 100%;\n height: 100%;\n }\n\n .hidden {\n display: none;\n }\n\n :host::part(chart-container) {\n z-index: 1;\n }\n\n :host::part(chart-datasource-error) {\n z-index: 2;\n }\n\n :host::part(chart-datasource-error)::before {\n content: '';\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n left: 0;\n height: 100%;\n width: 100%;\n border-radius: 2px;\n background-color: var(--datasource-error-background-color);\n opacity: var(--datasource-error-background-opacity);\n z-index: 1;\n }\n`",
|
|
66
|
+
"description": "The Chart styles.",
|
|
67
|
+
"privacy": "public"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"exports": [
|
|
71
|
+
{
|
|
72
|
+
"kind": "js",
|
|
73
|
+
"name": "foundationChartStyles",
|
|
74
|
+
"declaration": {
|
|
75
|
+
"name": "foundationChartStyles",
|
|
76
|
+
"module": "src/chart.styles.ts"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
29
81
|
{
|
|
30
82
|
"kind": "javascript-module",
|
|
31
83
|
"path": "src/chart.template.ts",
|
|
@@ -34,9 +86,22 @@
|
|
|
34
86
|
"kind": "variable",
|
|
35
87
|
"name": "g2plotChartTemplate",
|
|
36
88
|
"type": {
|
|
37
|
-
"text": "ViewTemplate
|
|
89
|
+
"text": "ViewTemplate"
|
|
38
90
|
},
|
|
39
|
-
"default": "html
|
|
91
|
+
"default": "html<G2PlotChart>`\n <slot\n name=\"chart-datasource-error\"\n class=\"${(x) =>\n x.errorItems.some(({ type }) => type === chartErrorNames.datasource) ? '' : 'hidden'}\"\n ></slot>\n <div style=\"height: 100%\" ${ref('chartContainer')} part=\"chart-container\"></div>\n`",
|
|
92
|
+
"description": "The g2lot chart template.",
|
|
93
|
+
"parameters": [
|
|
94
|
+
{
|
|
95
|
+
"description": "The design system prefix to use. Defaults to 'foundation'.",
|
|
96
|
+
"name": "prefix"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"return": {
|
|
100
|
+
"type": {
|
|
101
|
+
"text": ""
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"privacy": "public"
|
|
40
105
|
}
|
|
41
106
|
],
|
|
42
107
|
"exports": [
|
|
@@ -95,6 +160,14 @@
|
|
|
95
160
|
},
|
|
96
161
|
"default": "[]"
|
|
97
162
|
},
|
|
163
|
+
{
|
|
164
|
+
"kind": "field",
|
|
165
|
+
"name": "errorItems",
|
|
166
|
+
"type": {
|
|
167
|
+
"text": "ChartErrorItem<ChartErrorEvent['detail']>[]"
|
|
168
|
+
},
|
|
169
|
+
"default": "[]"
|
|
170
|
+
},
|
|
98
171
|
{
|
|
99
172
|
"kind": "field",
|
|
100
173
|
"name": "legendSelected",
|
|
@@ -112,6 +185,15 @@
|
|
|
112
185
|
},
|
|
113
186
|
"privacy": "private"
|
|
114
187
|
},
|
|
188
|
+
{
|
|
189
|
+
"kind": "field",
|
|
190
|
+
"name": "rootEventsListeners",
|
|
191
|
+
"type": {
|
|
192
|
+
"text": "ChartEventsListeners"
|
|
193
|
+
},
|
|
194
|
+
"privacy": "private",
|
|
195
|
+
"default": "[]"
|
|
196
|
+
},
|
|
115
197
|
{
|
|
116
198
|
"kind": "method",
|
|
117
199
|
"name": "dataChanged",
|
|
@@ -130,6 +212,30 @@
|
|
|
130
212
|
}
|
|
131
213
|
]
|
|
132
214
|
},
|
|
215
|
+
{
|
|
216
|
+
"kind": "method",
|
|
217
|
+
"name": "hideDatasourceError",
|
|
218
|
+
"privacy": "private"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"kind": "method",
|
|
222
|
+
"name": "addErrorItem",
|
|
223
|
+
"privacy": "private",
|
|
224
|
+
"parameters": [
|
|
225
|
+
{
|
|
226
|
+
"name": "type",
|
|
227
|
+
"type": {
|
|
228
|
+
"text": "ChartErrorTypes"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"name": "event",
|
|
233
|
+
"type": {
|
|
234
|
+
"text": "ChartErrorEvent"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
},
|
|
133
239
|
{
|
|
134
240
|
"kind": "method",
|
|
135
241
|
"name": "deepClone",
|
|
@@ -501,6 +607,14 @@
|
|
|
501
607
|
"package": "./chart.template"
|
|
502
608
|
}
|
|
503
609
|
},
|
|
610
|
+
{
|
|
611
|
+
"kind": "js",
|
|
612
|
+
"name": "*",
|
|
613
|
+
"declaration": {
|
|
614
|
+
"name": "*",
|
|
615
|
+
"package": "./chart.definitions"
|
|
616
|
+
}
|
|
617
|
+
},
|
|
504
618
|
{
|
|
505
619
|
"kind": "js",
|
|
506
620
|
"name": "*",
|
|
@@ -790,6 +904,27 @@
|
|
|
790
904
|
"module": "src/chart-datasource/chart-datasource.ts"
|
|
791
905
|
}
|
|
792
906
|
},
|
|
907
|
+
{
|
|
908
|
+
"kind": "method",
|
|
909
|
+
"name": "handleError",
|
|
910
|
+
"return": {
|
|
911
|
+
"type": {
|
|
912
|
+
"text": "void"
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
"parameters": [
|
|
916
|
+
{
|
|
917
|
+
"name": "params",
|
|
918
|
+
"type": {
|
|
919
|
+
"text": "BaseDatasourceErrorHandlingOptions"
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
],
|
|
923
|
+
"inheritedFrom": {
|
|
924
|
+
"name": "BaseDatasource",
|
|
925
|
+
"module": "src/utils/base-datasource.ts"
|
|
926
|
+
}
|
|
927
|
+
},
|
|
793
928
|
{
|
|
794
929
|
"kind": "method",
|
|
795
930
|
"name": "clearData",
|
|
@@ -1745,6 +1880,12 @@
|
|
|
1745
1880
|
}
|
|
1746
1881
|
]
|
|
1747
1882
|
},
|
|
1883
|
+
{
|
|
1884
|
+
"kind": "javascript-module",
|
|
1885
|
+
"path": "src/chart-datasource/chart-datasource.types.ts",
|
|
1886
|
+
"declarations": [],
|
|
1887
|
+
"exports": []
|
|
1888
|
+
},
|
|
1748
1889
|
{
|
|
1749
1890
|
"kind": "javascript-module",
|
|
1750
1891
|
"path": "src/chart-datasource/chart-datasource.utils.ts",
|
|
@@ -1852,6 +1993,22 @@
|
|
|
1852
1993
|
"path": "src/chart-datasource/index.ts",
|
|
1853
1994
|
"declarations": [],
|
|
1854
1995
|
"exports": [
|
|
1996
|
+
{
|
|
1997
|
+
"kind": "js",
|
|
1998
|
+
"name": "*",
|
|
1999
|
+
"declaration": {
|
|
2000
|
+
"name": "*",
|
|
2001
|
+
"package": "./chart-datasource.config"
|
|
2002
|
+
}
|
|
2003
|
+
},
|
|
2004
|
+
{
|
|
2005
|
+
"kind": "js",
|
|
2006
|
+
"name": "*",
|
|
2007
|
+
"declaration": {
|
|
2008
|
+
"name": "*",
|
|
2009
|
+
"package": "./chart-datasource.types"
|
|
2010
|
+
}
|
|
2011
|
+
},
|
|
1855
2012
|
{
|
|
1856
2013
|
"kind": "js",
|
|
1857
2014
|
"name": "*",
|
|
@@ -2,11 +2,13 @@ import type { Container } from '@microsoft/fast-foundation';
|
|
|
2
2
|
export declare const g2plotChartsComponents: {
|
|
3
3
|
g2plotChart: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
4
4
|
baseName: string;
|
|
5
|
-
|
|
5
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
6
|
+
template: import("@microsoft/fast-element").ViewTemplate<any, any>;
|
|
6
7
|
shadowOptions: ShadowRootInit;
|
|
7
8
|
}>) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
8
9
|
baseName: string;
|
|
9
|
-
|
|
10
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
11
|
+
template: import("@microsoft/fast-element").ViewTemplate<any, any>;
|
|
10
12
|
shadowOptions: ShadowRootInit;
|
|
11
13
|
}, typeof import("./chart").G2PlotChart>;
|
|
12
14
|
register(container?: Container, ...rest: any[]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-components.d.ts","sourceRoot":"","sources":["../../src/chart-components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAG5D,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"chart-components.d.ts","sourceRoot":"","sources":["../../src/chart-components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAG5D,eAAO,MAAM,sBAAsB;;;;;;;;;;;;yBAEZ,SAAS,WAAW,GAAG,EAAE;CAa/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-datasource.config.d.ts","sourceRoot":"","sources":["../../../src/chart-datasource/chart-datasource.config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;CAErC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseDatasource } from '@genesislcap/foundation-ui';
|
|
2
|
+
import type { BaseDatasourceErrorHandlingOptions } from '@genesislcap/foundation-ui';
|
|
2
3
|
export declare const defaultChartFields = "groupBy value";
|
|
3
4
|
export declare const defaultSeriesChartField = "series";
|
|
4
5
|
declare class ConcreteDatasource extends BaseDatasource {
|
|
@@ -43,6 +44,7 @@ declare class ConcreteDatasource extends BaseDatasource {
|
|
|
43
44
|
*/
|
|
44
45
|
showFormattedTime: boolean;
|
|
45
46
|
connectedCallback(): Promise<void>;
|
|
47
|
+
handleError(params: BaseDatasourceErrorHandlingOptions): void;
|
|
46
48
|
clearData(): void;
|
|
47
49
|
syncComponentData(snapshotData?: any[]): void;
|
|
48
50
|
handleStreamInserts(insertedRows: any[]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-datasource.d.ts","sourceRoot":"","sources":["../../../src/chart-datasource/chart-datasource.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"chart-datasource.d.ts","sourceRoot":"","sources":["../../../src/chart-datasource/chart-datasource.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,4BAA4B,CAAC;AAUrF,eAAO,MAAM,kBAAkB,kBAAkB,CAAC;AAClD,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAQhD,cAAM,kBAAmB,SAAQ,cAAc;IAC7C,OAAO,CAAC,KAAK,CAAc;IAE3B;;;;;;;;OAQG;IACkC,WAAW,EAAE,MAAM,CAAsB;IAC9E,OAAO,CAAC,qBAAqB,CAAW;IACxC,OAAO,CAAC,yBAAyB,CAA6B;IAC9D,OAAO,CAAC,gBAAgB,CAAS;IAEjC;;;;;;;;OAQG;IACmC,YAAY,EAAE,MAAM,CAAC;IAC3D,OAAO,CAAC,qBAAqB,CAAW;IAEU,OAAO,UAAS;IAChB,OAAO,UAAS;IAElE;;;OAGG;IACwB,OAAO,UAAQ;IAE1C;;;;;;OAMG;IAC0D,iBAAiB,UAAS;IAEjF,iBAAiB;IAwCvB,WAAW,CAAC,MAAM,EAAE,kCAAkC,GAAG,IAAI;IAc7D,SAAS;IAMT,iBAAiB,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE;IAuCtC,mBAAmB,CAAC,YAAY,EAAE,GAAG,EAAE;IAQvC,mBAAmB,CAAC,WAAW,EAAE,GAAG,EAAE;IAQtC,mBAAmB,CAAC,WAAW,EAAE,GAAG,EAAE;IAatC,OAAO,CAAC,kBAAkB;IAiC1B,OAAO,CAAC,gCAAgC;IAiBxC,IAAI,sBAAsB,IAAI,MAAM,CAEnC;IAED,IAAI,oBAAoB,IAAI,OAAO,CAElC;IAED,IAAI,mBAAmB,IAAI,OAAO,CAEjC;IAED,OAAO,CAAC,uBAAuB;CAOhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,qBAGa,eAAgB,SAAQ,oBAAkC;IAC5D,oBAAoB,IAAI,IAAI;IAKrB,gBAAgB,CAAC,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAIxE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The event detail for the Chart Datasource `error` event.
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
export type ChartDatasourceErrorEventDetail = {
|
|
6
|
+
message: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The error event Chart Datasource.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export type ChartDatasourceErrorEvent = CustomEvent<ChartDatasourceErrorEventDetail>;
|
|
13
|
+
//# sourceMappingURL=chart-datasource.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-datasource.types.d.ts","sourceRoot":"","sources":["../../../src/chart-datasource/chart-datasource.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,WAAW,CAAC,+BAA+B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart-datasource/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart-datasource/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC"}
|
package/dist/dts/chart.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
-
import { ChartModels, ChartTypes } from './chart.types';
|
|
2
|
+
import { ChartModels, ChartTypes, ChartErrorEvent, ChartErrorItem } from './chart.types';
|
|
3
3
|
declare const G2PlotChart_base: (new (...args: any[]) => {
|
|
4
4
|
"__#1@#_container": import("@genesislcap/foundation-utils").FoundationLayoutContainer | import("@genesislcap/foundation-utils").LayoutCacheContainer | import("@genesislcap/foundation-utils").DOMContainer;
|
|
5
5
|
"__#1@#_latestTokenCode": string;
|
|
@@ -334,9 +334,14 @@ export declare class G2PlotChart extends G2PlotChart_base {
|
|
|
334
334
|
type: ChartTypes;
|
|
335
335
|
config: any;
|
|
336
336
|
data: any[];
|
|
337
|
+
errorItems: ChartErrorItem<ChartErrorEvent['detail']>[];
|
|
337
338
|
private legendSelected;
|
|
338
339
|
private legendParser?;
|
|
340
|
+
private rootEventsListeners;
|
|
339
341
|
dataChanged(oldValue: any[], newValue: any[]): void;
|
|
342
|
+
constructor();
|
|
343
|
+
private hideDatasourceError;
|
|
344
|
+
private addErrorItem;
|
|
340
345
|
deepClone(): Node;
|
|
341
346
|
renderChart(): void;
|
|
342
347
|
connectedCallback(): void;
|
|
@@ -373,11 +378,13 @@ export declare const defaultChartConfig: {};
|
|
|
373
378
|
*/
|
|
374
379
|
export declare const g2plotChart: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
375
380
|
baseName: string;
|
|
376
|
-
|
|
381
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
382
|
+
template: import("@microsoft/fast-element").ViewTemplate<any, any>;
|
|
377
383
|
shadowOptions: ShadowRootInit;
|
|
378
384
|
}>) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
379
385
|
baseName: string;
|
|
380
|
-
|
|
386
|
+
styles: import("@microsoft/fast-element").ElementStyles;
|
|
387
|
+
template: import("@microsoft/fast-element").ViewTemplate<any, any>;
|
|
381
388
|
shadowOptions: ShadowRootInit;
|
|
382
389
|
}, typeof G2PlotChart>;
|
|
383
390
|
export {};
|
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;
|
|
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"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Chart Datasource events names.
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare const chartEventNames: {
|
|
6
|
+
datasourceErrorClose: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The error names for the Chart component.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const chartErrorNames: {
|
|
13
|
+
readonly datasource: "datasource";
|
|
14
|
+
readonly unknown: "unknown";
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chart.definitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart.definitions.d.ts","sourceRoot":"","sources":["../../src/chart.definitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,eAAe;;CAE3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe;;;CAGlB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart.styles.d.ts","sourceRoot":"","sources":["../../src/chart.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAoCnC,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The g2lot chart template.
|
|
4
|
+
* @param prefix - The design system prefix to use. Defaults to 'foundation'.
|
|
5
|
+
* @returns A g2plot chart template prefixed with the correct design system.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare const g2plotChartTemplate: ViewTemplate;
|
|
4
9
|
//# sourceMappingURL=chart.template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.template.d.ts","sourceRoot":"","sources":["../../src/chart.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"chart.template.d.ts","sourceRoot":"","sources":["../../src/chart.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAI5D;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,YAOjC,CAAC"}
|
|
@@ -1,4 +1,32 @@
|
|
|
1
1
|
import { Line, Area, Bar, Column, Pie, DualAxes, Rose, Scatter, Stock, Mix } from '@antv/g2plot';
|
|
2
|
+
import { ChartDatasourceErrorEvent } from './chart-datasource/chart-datasource.types';
|
|
3
|
+
import { chartErrorNames } from './chart.definitions';
|
|
2
4
|
export type ChartModels = Line | Area | Bar | Column | Pie | DualAxes | Rose | Scatter | Stock | Mix;
|
|
3
5
|
export type ChartTypes = 'line' | 'area' | 'column' | 'bar' | 'pie' | 'donut' | 'dualaxes' | 'rose' | 'scatter' | 'stock' | 'mix';
|
|
6
|
+
/**
|
|
7
|
+
* Chart Event Listeners
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export type ChartEventsListeners = {
|
|
11
|
+
key: string;
|
|
12
|
+
action: (event: Event) => void;
|
|
13
|
+
}[];
|
|
14
|
+
/**
|
|
15
|
+
* Chart Error Types
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export type ChartErrorTypes = keyof typeof chartErrorNames;
|
|
19
|
+
/**
|
|
20
|
+
* Chart Error Item
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export interface ChartErrorItem<ChartErrorItemDetailType> {
|
|
24
|
+
detail: ChartErrorItemDetailType;
|
|
25
|
+
type: ChartErrorTypes;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Chart possible error events
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
export type ChartErrorEvent = ChartDatasourceErrorEvent | CustomEvent<ChartErrorItem<any>>;
|
|
4
32
|
//# sourceMappingURL=chart.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.types.d.ts","sourceRoot":"","sources":["../../src/chart.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"chart.types.d.ts","sourceRoot":"","sources":["../../src/chart.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACjG,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,MAAM,WAAW,GACnB,IAAI,GACJ,IAAI,GACJ,GAAG,GACH,MAAM,GACN,GAAG,GACH,QAAQ,GACR,IAAI,GACJ,OAAO,GACP,KAAK,GACL,GAAG,CAAC;AACR,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,MAAM,GACN,QAAQ,GACR,KAAK,GACL,KAAK,GACL,OAAO,GACP,UAAU,GACV,MAAM,GACN,SAAS,GACT,OAAO,GACP,KAAK,CAAC;AAEV;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CAAE,EAAE,CAAC;AAErF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,eAAe,CAAC;AAE3D;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,wBAAwB;IACtD,MAAM,EAAE,wBAAwB,CAAC;IACjC,IAAI,EAAE,eAAe,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,yBAAyB,GAAG,WAAW,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC"}
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './chart-components';
|
|
|
2
2
|
export * from './chart';
|
|
3
3
|
export * from './chart.types';
|
|
4
4
|
export * from './chart.template';
|
|
5
|
+
export * from './chart.definitions';
|
|
5
6
|
export * from './settings';
|
|
6
7
|
export * from './chart-datasource';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AAEnC,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAE3B,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AAEnC,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAE3B,cAAc,oBAAoB,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { createLogger } from '@genesislcap/foundation-logger';
|
|
|
3
3
|
import { BaseDatasource } from '@genesislcap/foundation-ui';
|
|
4
4
|
import { LifecycleMixin } from '@genesislcap/foundation-utils';
|
|
5
5
|
import { attr, customElement } from '@microsoft/fast-element';
|
|
6
|
+
import { chartDatasourceEventNames } from './chart-datasource.config';
|
|
6
7
|
import { extractFields, getFormattedDateGroupBy, getReduced } from './chart-datasource.utils';
|
|
7
8
|
const logger = createLogger('chart-datasource');
|
|
8
9
|
export const defaultChartFields = 'groupBy value';
|
|
@@ -52,7 +53,9 @@ class ConcreteDatasource extends BaseDatasource {
|
|
|
52
53
|
this.extractedChartsFields = extractFields(this.chartFields);
|
|
53
54
|
this.prepareSeriesField();
|
|
54
55
|
if (!this.hasValidServerFields || !this.hasValidChartFields) {
|
|
55
|
-
|
|
56
|
+
this.handleError({
|
|
57
|
+
message: 'Use valid server and chart fields (e.g server-fields="NAME VALUE" charts-fields="groupBy value"). Chart will not load.',
|
|
58
|
+
});
|
|
56
59
|
return;
|
|
57
60
|
}
|
|
58
61
|
yield this.initDatasource();
|
|
@@ -63,7 +66,10 @@ class ConcreteDatasource extends BaseDatasource {
|
|
|
63
66
|
const message = invalidServerFieldsFound.length > 1
|
|
64
67
|
? `Server fields '${allInvalidServerFields}' are invalid.`
|
|
65
68
|
: `Server field '${allInvalidServerFields}' is invalid.`;
|
|
66
|
-
|
|
69
|
+
const filedsNames = allPossibleValidServerFields.join(',');
|
|
70
|
+
this.handleError({
|
|
71
|
+
message: `${message} Chart will not load. Available fields: ${filedsNames}`,
|
|
72
|
+
});
|
|
67
73
|
return;
|
|
68
74
|
}
|
|
69
75
|
if (this.chart && this.resourceName && this.connect.isConnected) {
|
|
@@ -71,6 +77,15 @@ class ConcreteDatasource extends BaseDatasource {
|
|
|
71
77
|
}
|
|
72
78
|
});
|
|
73
79
|
}
|
|
80
|
+
handleError(params) {
|
|
81
|
+
const { message, loggerType = 'error' } = params;
|
|
82
|
+
if (message) {
|
|
83
|
+
logger[loggerType](message);
|
|
84
|
+
if (loggerType === 'error') {
|
|
85
|
+
this.$emit(chartDatasourceEventNames.error, { message });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
74
89
|
// ChartDatasource's implementation of BaseDatasource abstracts
|
|
75
90
|
clearData() {
|
|
76
91
|
var _a;
|
|
@@ -137,7 +152,9 @@ class ConcreteDatasource extends BaseDatasource {
|
|
|
137
152
|
case 'bar':
|
|
138
153
|
case 'column':
|
|
139
154
|
if (this.isStack && this.isGroup) {
|
|
140
|
-
|
|
155
|
+
this.handleError({
|
|
156
|
+
message: 'Charts can not be stacked and grouped at the same time. Chart will not load properly.',
|
|
157
|
+
});
|
|
141
158
|
}
|
|
142
159
|
this.chart.config.isStack = this.isStack;
|
|
143
160
|
this.chart.config.isGroup = this.isGroup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Chart Datasource events names.
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export const chartEventNames = {
|
|
6
|
+
datasourceErrorClose: 'datasource-error-close',
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The error names for the Chart component.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export const chartErrorNames = {
|
|
13
|
+
datasource: 'datasource',
|
|
14
|
+
unknown: 'unknown',
|
|
15
|
+
};
|
package/dist/esm/chart.js
CHANGED
|
@@ -2,7 +2,9 @@ import { __decorate } from "tslib";
|
|
|
2
2
|
import { LifecycleMixin } from '@genesislcap/foundation-utils';
|
|
3
3
|
import { attr, observable } from '@microsoft/fast-element';
|
|
4
4
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
5
|
-
import { ChartDatasource } from './chart-datasource';
|
|
5
|
+
import { ChartDatasource, chartDatasourceEventNames } from './chart-datasource';
|
|
6
|
+
import { chartEventNames, chartErrorNames } from './chart.definitions';
|
|
7
|
+
import { foundationChartStyles as styles } from './chart.styles';
|
|
6
8
|
import { g2plotChartTemplate as template } from './chart.template';
|
|
7
9
|
import { LineChart, AreaChart, BarChart, ColumnChart, DonutChart, PieChart, DualAxesChart, RoseChart, ScatterChart, StockChart, MixChart, } from './models';
|
|
8
10
|
import { registerRapidShape } from './settings';
|
|
@@ -11,11 +13,21 @@ ChartDatasource;
|
|
|
11
13
|
* @tagname %%prefix%%-g2plot-chart
|
|
12
14
|
*/
|
|
13
15
|
export class G2PlotChart extends LifecycleMixin(FoundationElement) {
|
|
16
|
+
dataChanged(oldValue, newValue) {
|
|
17
|
+
var _a;
|
|
18
|
+
if (!newValue)
|
|
19
|
+
return;
|
|
20
|
+
if (oldValue && newValue && oldValue !== newValue) {
|
|
21
|
+
(_a = this.chart) === null || _a === void 0 ? void 0 : _a.changeData(this.data);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
14
24
|
constructor() {
|
|
15
|
-
super(
|
|
25
|
+
super();
|
|
16
26
|
this.type = 'bar';
|
|
17
27
|
this.data = [];
|
|
28
|
+
this.errorItems = [];
|
|
18
29
|
this.legendSelected = {};
|
|
30
|
+
this.rootEventsListeners = [];
|
|
19
31
|
this.eventHandler = (e) => {
|
|
20
32
|
this.$emit(e.type, e);
|
|
21
33
|
};
|
|
@@ -45,14 +57,22 @@ export class G2PlotChart extends LifecycleMixin(FoundationElement) {
|
|
|
45
57
|
configuration.legend = Object.assign(Object.assign({}, configuration.legend), { selected: Object.assign({}, this.legendSelected) });
|
|
46
58
|
return configuration;
|
|
47
59
|
};
|
|
60
|
+
this.rootEventsListeners.push({ key: chartEventNames.datasourceErrorClose, action: this.hideDatasourceError.bind(this) }, {
|
|
61
|
+
key: chartDatasourceEventNames.error,
|
|
62
|
+
action: this.addErrorItem.bind(this, chartErrorNames.datasource),
|
|
63
|
+
});
|
|
48
64
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
65
|
+
hideDatasourceError() {
|
|
66
|
+
this.errorItems = this.errorItems.filter((item) => item.type !== chartErrorNames.datasource);
|
|
67
|
+
}
|
|
68
|
+
addErrorItem(type, event) {
|
|
69
|
+
this.errorItems = [
|
|
70
|
+
...this.errorItems,
|
|
71
|
+
{
|
|
72
|
+
type,
|
|
73
|
+
detail: event.detail,
|
|
74
|
+
},
|
|
75
|
+
];
|
|
56
76
|
}
|
|
57
77
|
deepClone() {
|
|
58
78
|
const copy = super.deepClone();
|
|
@@ -78,12 +98,19 @@ export class G2PlotChart extends LifecycleMixin(FoundationElement) {
|
|
|
78
98
|
this.cacheHiddenLegendItemsCallback = this.cacheHiddenLegendItemsCallback.bind(this);
|
|
79
99
|
// as the chart is destroyed in the disconnect the event is wiped
|
|
80
100
|
(_a = this.chart) === null || _a === void 0 ? void 0 : _a.on('legend-item:click', this.cacheHiddenLegendItemsCallback);
|
|
101
|
+
// handle errors from chart
|
|
102
|
+
this.rootEventsListeners.forEach(({ key, action }) => {
|
|
103
|
+
this.addEventListener(key, action);
|
|
104
|
+
});
|
|
81
105
|
}
|
|
82
106
|
disconnectedCallback() {
|
|
83
107
|
if (this.chart) {
|
|
84
108
|
this.chart.destroy();
|
|
85
109
|
this.chart.off('*', this.eventHandler);
|
|
86
110
|
}
|
|
111
|
+
this.rootEventsListeners.forEach(({ key, action }) => {
|
|
112
|
+
this.removeEventListener(key, action);
|
|
113
|
+
});
|
|
87
114
|
}
|
|
88
115
|
/**
|
|
89
116
|
* Get which legend items are selected (shown/hidden) so they can be re-applied during a subsequent connectedCallback
|
|
@@ -124,6 +151,9 @@ __decorate([
|
|
|
124
151
|
__decorate([
|
|
125
152
|
observable
|
|
126
153
|
], G2PlotChart.prototype, "data", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
observable
|
|
156
|
+
], G2PlotChart.prototype, "errorItems", void 0);
|
|
127
157
|
// explicitly declaring for extensibility
|
|
128
158
|
export const foundationChartShadowOptions = undefined;
|
|
129
159
|
export const defaultChartConfig = {};
|
|
@@ -134,4 +164,5 @@ export const defaultChartConfig = {};
|
|
|
134
164
|
* @remarks
|
|
135
165
|
* HTML Element: \<design-system-g2plot-chart\>
|
|
136
166
|
*/
|
|
137
|
-
export const g2plotChart = G2PlotChart.compose(Object.assign({ baseName: 'g2plot-chart',
|
|
167
|
+
export const g2plotChart = G2PlotChart.compose(Object.assign({ baseName: 'g2plot-chart', styles,
|
|
168
|
+
template, shadowOptions: foundationChartShadowOptions }, defaultChartConfig));
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { css } from '@microsoft/fast-element';
|
|
2
|
+
/**
|
|
3
|
+
* The Chart styles.
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const foundationChartStyles = css `
|
|
7
|
+
:host {
|
|
8
|
+
--datasource-error-background-color: var(--neutral-layer-4);
|
|
9
|
+
--datasource-error-background-opacity: 0.5;
|
|
10
|
+
--datasource-error-dialog-max-width: 50%;
|
|
11
|
+
|
|
12
|
+
position: relative;
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.hidden {
|
|
18
|
+
display: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:host::part(chart-container) {
|
|
22
|
+
z-index: 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host::part(chart-datasource-error) {
|
|
26
|
+
z-index: 2;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host::part(chart-datasource-error)::before {
|
|
30
|
+
content: '';
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 50%;
|
|
33
|
+
transform: translateY(-50%);
|
|
34
|
+
left: 0;
|
|
35
|
+
height: 100%;
|
|
36
|
+
width: 100%;
|
|
37
|
+
border-radius: 2px;
|
|
38
|
+
background-color: var(--datasource-error-background-color);
|
|
39
|
+
opacity: var(--datasource-error-background-opacity);
|
|
40
|
+
z-index: 1;
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { html, ref } from '@microsoft/fast-element';
|
|
2
|
+
import { chartErrorNames } from './chart.definitions';
|
|
3
|
+
/**
|
|
4
|
+
* The g2lot chart template.
|
|
5
|
+
* @param prefix - The design system prefix to use. Defaults to 'foundation'.
|
|
6
|
+
* @returns A g2plot chart template prefixed with the correct design system.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
2
9
|
export const g2plotChartTemplate = html `
|
|
3
|
-
<
|
|
10
|
+
<slot
|
|
11
|
+
name="chart-datasource-error"
|
|
12
|
+
class="${(x) => x.errorItems.some(({ type }) => type === chartErrorNames.datasource) ? '' : 'hidden'}"
|
|
13
|
+
></slot>
|
|
14
|
+
<div style="height: 100%" ${ref('chartContainer')} part="chart-container"></div>
|
|
4
15
|
`;
|
package/dist/esm/index.js
CHANGED
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.
|
|
4
|
+
"version": "14.173.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -45,22 +45,22 @@
|
|
|
45
45
|
"test:debug": "genx test --debug"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@genesislcap/foundation-testing": "14.
|
|
49
|
-
"@genesislcap/genx": "14.
|
|
50
|
-
"@genesislcap/rollup-builder": "14.
|
|
51
|
-
"@genesislcap/ts-builder": "14.
|
|
52
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
53
|
-
"@genesislcap/vite-builder": "14.
|
|
54
|
-
"@genesislcap/webpack-builder": "14.
|
|
48
|
+
"@genesislcap/foundation-testing": "14.173.0",
|
|
49
|
+
"@genesislcap/genx": "14.173.0",
|
|
50
|
+
"@genesislcap/rollup-builder": "14.173.0",
|
|
51
|
+
"@genesislcap/ts-builder": "14.173.0",
|
|
52
|
+
"@genesislcap/uvu-playwright-builder": "14.173.0",
|
|
53
|
+
"@genesislcap/vite-builder": "14.173.0",
|
|
54
|
+
"@genesislcap/webpack-builder": "14.173.0",
|
|
55
55
|
"rimraf": "^3.0.2"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@antv/g2plot": "^2.4.20",
|
|
59
|
-
"@genesislcap/foundation-comms": "14.
|
|
60
|
-
"@genesislcap/foundation-logger": "14.
|
|
61
|
-
"@genesislcap/foundation-ui": "14.
|
|
62
|
-
"@genesislcap/foundation-utils": "14.
|
|
63
|
-
"@genesislcap/foundation-zero": "14.
|
|
59
|
+
"@genesislcap/foundation-comms": "14.173.0",
|
|
60
|
+
"@genesislcap/foundation-logger": "14.173.0",
|
|
61
|
+
"@genesislcap/foundation-ui": "14.173.0",
|
|
62
|
+
"@genesislcap/foundation-utils": "14.173.0",
|
|
63
|
+
"@genesislcap/foundation-zero": "14.173.0",
|
|
64
64
|
"@microsoft/fast-element": "^1.12.0",
|
|
65
65
|
"@microsoft/fast-foundation": "^2.49.4",
|
|
66
66
|
"tslib": "^2.3.1"
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
76
|
"customElements": "dist/custom-elements.json",
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "305d22f53f12f2df0ed90a713575837d36aec80f"
|
|
78
78
|
}
|