@provoly/dashboard 0.14.8 → 0.14.10
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/admin/components/admin-layout/admin-layout.component.d.ts +5 -3
- package/admin/components/admin-metadata-user/admin-metadata-user.component.d.ts +1 -1
- package/admin/components/admin-metadata-user/store/admin-metadata-user.action.d.ts +0 -11
- package/admin/components/admin-metadata-user/store/admin-metadata-user.effects.d.ts +2 -7
- package/admin/components/admin-metadata-user/store/admin-metadata-user.reducer.d.ts +1 -3
- package/admin/components/admin-metadata-user/store/admin-metadata-user.selector.d.ts +1 -4
- package/admin/components/admin-user/store/admin-user.action.d.ts +1 -52
- package/admin/components/admin-user/store/admin-user.effects.d.ts +0 -28
- package/admin/components/admin-user/store/admin-user.reducer.d.ts +1 -2
- package/admin/components/admin-user/store/admin-user.selector.d.ts +0 -1
- package/admin/store/admin.service.d.ts +1 -4
- package/assets/svgs/map.svg +1 -1
- package/components/metadata-editor/metadata-editor.component.d.ts +6 -6
- package/components/metadata-editor/metadata-editor.module.d.ts +7 -6
- package/components/metadata-editor/public-api.d.ts +1 -0
- package/components/metadata-editor/store/metadata.action.d.ts +63 -1
- package/components/metadata-editor/store/metadata.effects.d.ts +33 -0
- package/components/metadata-editor/store/metadata.reducer.d.ts +3 -1
- package/components/metadata-editor/store/metadata.selector.d.ts +2 -0
- package/components/metadata-editor/store/metadata.service.d.ts +5 -1
- package/components/metadata-editor/style/_o-metadata-editor.scss +15 -0
- package/components/metadata-editor/style/css.component.d.ts +5 -0
- package/esm2022/admin/components/admin-abac-rules/admin-abac-rules-edit/admin-abac-rules-edit.component.mjs +2 -3
- package/esm2022/admin/components/admin-abac-rules/admin-abac-rules-new/admin-abac-rules-new.component.mjs +2 -3
- package/esm2022/admin/components/admin-abac-rules/components/metadata-condition/metadata-condition.component.mjs +2 -3
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-edit/admin-attributes-edit.component.mjs +1 -1
- package/esm2022/admin/components/admin-classes/admin-classes-view/admin-attributes-form/admin-attributes-form.component.mjs +4 -4
- package/esm2022/admin/components/admin-dataset/admin-select-dataset/admin-select-dataset.component.mjs +3 -3
- package/esm2022/admin/components/admin-layout/admin-layout.component.mjs +10 -7
- package/esm2022/admin/components/admin-metadata/shared/form-metadata/form-metadata.component.mjs +2 -3
- package/esm2022/admin/components/admin-metadata-rules/shared/admin-form-metadata-rules/admin-form-metadata-rules.component.mjs +3 -5
- package/esm2022/admin/components/admin-metadata-user/admin-metadata-user.component.mjs +9 -10
- package/esm2022/admin/components/admin-metadata-user/admin-user-edit-metadata/admin-user-edit-metadata.component.mjs +4 -4
- package/esm2022/admin/components/admin-metadata-user/admin-user-select-metadata/admin-user-select-metadata.component.mjs +7 -3
- package/esm2022/admin/components/admin-metadata-user/store/admin-metadata-user.action.mjs +1 -4
- package/esm2022/admin/components/admin-metadata-user/store/admin-metadata-user.effects.mjs +4 -4
- package/esm2022/admin/components/admin-metadata-user/store/admin-metadata-user.reducer.mjs +8 -28
- package/esm2022/admin/components/admin-metadata-user/store/admin-metadata-user.selector.mjs +2 -6
- package/esm2022/admin/components/admin-user/admin-user-select/admin-user-select.component.mjs +9 -10
- package/esm2022/admin/components/admin-user/admin-user.component.mjs +1 -1
- package/esm2022/admin/components/admin-user/store/admin-user.action.mjs +2 -11
- package/esm2022/admin/components/admin-user/store/admin-user.effects.mjs +1 -19
- package/esm2022/admin/components/admin-user/store/admin-user.reducer.mjs +2 -7
- package/esm2022/admin/components/admin-user/store/admin-user.selector.mjs +1 -3
- package/esm2022/admin/i18n/en.translations.mjs +2 -2
- package/esm2022/admin/i18n/fr.translations.mjs +4 -4
- package/esm2022/admin/store/admin.effects.mjs +1 -1
- package/esm2022/admin/store/admin.service.mjs +1 -16
- package/esm2022/components/metadata-editor/metadata-editor.component.mjs +40 -45
- package/esm2022/components/metadata-editor/metadata-editor.module.mjs +5 -4
- package/esm2022/components/metadata-editor/public-api.mjs +2 -1
- package/esm2022/components/metadata-editor/store/metadata.action.mjs +14 -2
- package/esm2022/components/metadata-editor/store/metadata.effects.mjs +21 -1
- package/esm2022/components/metadata-editor/store/metadata.reducer.mjs +18 -2
- package/esm2022/components/metadata-editor/store/metadata.selector.mjs +6 -2
- package/esm2022/components/metadata-editor/store/metadata.service.mjs +21 -1
- package/esm2022/components/metadata-editor/style/css.component.mjs +11 -0
- package/esm2022/dataset/i18n/fr.translations.mjs +2 -2
- package/esm2022/import/i18n/en.translations.mjs +4 -1
- package/esm2022/import/i18n/fr.translations.mjs +4 -1
- package/esm2022/import/store/import.effects.mjs +8 -1
- package/esm2022/lib/core/components/about/about.component.mjs +29 -0
- package/esm2022/lib/core/components/about/pry-about.module.mjs +21 -0
- package/esm2022/lib/core/components/icon/icon.component.mjs +5 -1
- package/esm2022/lib/core/components/modal-status/modal-status.component.mjs +10 -6
- package/esm2022/lib/core/components/snackbar/snackbar.service.mjs +1 -1
- package/esm2022/lib/core/i18n/en.translations.mjs +14 -3
- package/esm2022/lib/core/i18n/fr.translations.mjs +14 -3
- package/esm2022/lib/core/i18n/i18n.pipe.mjs +4 -3
- package/esm2022/lib/core/i18n/i18n.service.mjs +5 -5
- package/esm2022/lib/core/model/display-options.interface.mjs +1 -1
- package/esm2022/lib/core/model/manifest.interface.mjs +1 -1
- package/esm2022/lib/core/model/public-api.mjs +2 -1
- package/esm2022/lib/core/model/widget-map-manifest.interface.mjs +1 -1
- package/esm2022/lib/core/model/widget-vega-manifest.interface.mjs +2 -0
- package/esm2022/lib/core/public-api.mjs +3 -1
- package/esm2022/lib/core/store/class/class.effects.mjs +1 -1
- package/esm2022/lib/core/store/config/config.actions.mjs +5 -2
- package/esm2022/lib/core/store/config/config.effects.mjs +4 -1
- package/esm2022/lib/core/store/config/config.reducer.mjs +9 -2
- package/esm2022/lib/core/store/config/config.selectors.mjs +6 -4
- package/esm2022/lib/core/store/config/config.service.mjs +36 -2
- package/esm2022/lib/core/store/config/versions.interface.mjs +2 -0
- package/esm2022/lib/core/toolbox/toolbox-menu.service.mjs +1 -16
- package/esm2022/lib/dashboard/components/manifests/manifests.component.mjs +3 -1
- package/esm2022/lib/dashboard/components/widgets/base-widget.component.mjs +3 -2
- package/esm2022/lib/dashboard/store/dashboard.actions.mjs +3 -3
- package/esm2022/lib/dashboard/store/dashboard.effects.mjs +15 -6
- package/esm2022/lib/dashboard/store/dashboard.reducers.mjs +10 -2
- package/esm2022/lib/dashboard/store/dashboard.selectors.mjs +3 -4
- package/esm2022/lib/dashboard/store/manifest.service.mjs +2 -3
- package/esm2022/notification/store/notification.effects.mjs +3 -3
- package/esm2022/presentation/components/add-edit-presentation/add-edit-presentation.component.mjs +23 -18
- package/esm2022/presentation/components/presentation.component.mjs +18 -18
- package/esm2022/presentation/style/css.component.mjs +2 -2
- package/esm2022/restitution/components/restitution-list/restitution-list.component.mjs +3 -3
- package/esm2022/restitution/components/restitution-list-item/restitution-list-item.component.mjs +6 -3
- package/esm2022/supervision/components/supervision-integration-errors/supervision-integration-errors-select/supervision-integration-errors-select.component.mjs +6 -3
- package/esm2022/supervision/components/supervision-integration-errors/supervision-integration-errors.component.mjs +2 -2
- package/esm2022/supervision/components/supervision-layout/supervision-layout.component.mjs +2 -2
- package/esm2022/supervision/components/supervision.component.mjs +2 -2
- package/esm2022/supervision/store/supervision.actions.mjs +1 -1
- package/esm2022/supervision/store/supervision.reducer.mjs +3 -2
- package/esm2022/supervision/store/supervision.selectors.mjs +2 -2
- package/esm2022/toolbox/components/save-view/save-view.component.mjs +4 -4
- package/esm2022/tooltips/attribute/attribute-tooltip.component.mjs +18 -11
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +20 -6
- package/esm2022/widgets/widget-aggregated-chart/i18n/fr.translations.mjs +1 -2
- package/esm2022/widgets/widget-map/component/widget-map-layer.service.mjs +4 -2
- package/esm2022/widgets/widget-map/component/widget-map.component.mjs +15 -9
- package/esm2022/widgets/widget-map/utils/cql-utils.class.mjs +5 -5
- package/esm2022/widgets/widget-map/utils/xml-utils.class.mjs +23 -1
- package/esm2022/widgets/widget-vega/component/widget-vega.component.mjs +139 -0
- package/esm2022/widgets/widget-vega/i18n/en.translations.mjs +11 -0
- package/esm2022/widgets/widget-vega/i18n/fr.translations.mjs +11 -0
- package/esm2022/widgets/widget-vega/provoly-dashboard-widgets-widget-vega.mjs +5 -0
- package/esm2022/widgets/widget-vega/public-api.mjs +3 -0
- package/esm2022/widgets/widget-vega/style/css.component.mjs +11 -0
- package/esm2022/widgets/widget-vega/widget-vega.module.mjs +68 -0
- package/fesm2022/provoly-dashboard-admin.mjs +134 -206
- package/fesm2022/provoly-dashboard-admin.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs +127 -52
- package/fesm2022/provoly-dashboard-components-metadata-editor.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs +1 -1
- package/fesm2022/provoly-dashboard-dataset.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-import.mjs +13 -0
- package/fesm2022/provoly-dashboard-import.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-notification.mjs +2 -2
- package/fesm2022/provoly-dashboard-notification.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-presentation.mjs +41 -37
- package/fesm2022/provoly-dashboard-presentation.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-restitution.mjs +7 -4
- package/fesm2022/provoly-dashboard-restitution.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-supervision.mjs +11 -8
- package/fesm2022/provoly-dashboard-supervision.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-toolbox.mjs +3 -3
- package/fesm2022/provoly-dashboard-toolbox.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-tooltips-attribute.mjs +17 -10
- package/fesm2022/provoly-dashboard-tooltips-attribute.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +19 -6
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +43 -14
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs +235 -0
- package/fesm2022/provoly-dashboard-widgets-widget-vega.mjs.map +1 -0
- package/fesm2022/provoly-dashboard.mjs +188 -68
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/import/i18n/en.translations.d.ts +3 -0
- package/import/i18n/fr.translations.d.ts +3 -0
- package/lib/core/components/about/about.component.d.ts +12 -0
- package/lib/core/components/about/pry-about.module.d.ts +10 -0
- package/lib/core/i18n/en.translations.d.ts +11 -0
- package/lib/core/i18n/fr.translations.d.ts +11 -0
- package/lib/core/i18n/i18n.service.d.ts +2 -2
- package/lib/core/model/display-options.interface.d.ts +1 -1
- package/lib/core/model/manifest.interface.d.ts +2 -1
- package/lib/core/model/public-api.d.ts +1 -0
- package/lib/core/model/widget-map-manifest.interface.d.ts +2 -0
- package/lib/core/model/widget-vega-manifest.interface.d.ts +5 -0
- package/lib/core/public-api.d.ts +2 -0
- package/lib/core/store/config/config.actions.d.ts +12 -0
- package/lib/core/store/config/config.effects.d.ts +6 -0
- package/lib/core/store/config/config.reducer.d.ts +2 -0
- package/lib/core/store/config/config.selectors.d.ts +1 -0
- package/lib/core/store/config/config.service.d.ts +2 -0
- package/lib/core/store/config/versions.interface.d.ts +10 -0
- package/lib/dashboard/store/dashboard.actions.d.ts +10 -8
- package/lib/dashboard/store/dashboard.effects.d.ts +2 -0
- package/lib/dashboard/store/dashboard.selectors.d.ts +1 -1
- package/lib/dashboard/store/manifest.service.d.ts +1 -1
- package/package.json +31 -25
- package/presentation/components/add-edit-presentation/add-edit-presentation.component.d.ts +4 -3
- package/presentation/components/presentation.component.d.ts +2 -2
- package/presentation/style/_o-pry-new-presentation.scss +7 -0
- package/restitution/components/restitution-list-item/restitution-list-item.component.d.ts +3 -2
- package/schematics/ng-add/index.js +7 -1
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/schema.json +2 -1
- package/styles/components/_o-tabs.scss +1 -7
- package/styles/layout/_o-base-layout.scss +8 -1
- package/supervision/components/supervision-integration-errors/supervision-integration-errors-select/supervision-integration-errors-select.component.d.ts +1 -1
- package/supervision/store/supervision.actions.d.ts +2 -2
- package/supervision/store/supervision.reducer.d.ts +1 -1
- package/supervision/store/supervision.selectors.d.ts +1 -1
- package/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.d.ts +7 -0
- package/widgets/widget-aggregated-chart/i18n/fr.translations.d.ts +0 -1
- package/widgets/widget-map/component/widget-map.component.d.ts +3 -1
- package/widgets/widget-map/utils/xml-utils.class.d.ts +2 -0
- package/widgets/widget-vega/component/widget-vega.component.d.ts +37 -0
- package/widgets/widget-vega/i18n/en.translations.d.ts +10 -0
- package/widgets/widget-vega/i18n/fr.translations.d.ts +10 -0
- package/widgets/widget-vega/index.d.ts +5 -0
- package/widgets/widget-vega/public-api.d.ts +2 -0
- package/widgets/widget-vega/style/_o-widget-vega.scss +6 -0
- package/widgets/widget-vega/style/css.component.d.ts +5 -0
- package/widgets/widget-vega/widget-vega.module.d.ts +19 -0
|
@@ -15,16 +15,23 @@ class AttributeTooltipComponent extends BaseTooltipComponent {
|
|
|
15
15
|
this.context = this.context ?? { attributes: [] };
|
|
16
16
|
}
|
|
17
17
|
getValue(attribute) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
if (!this.data.item.properties) {
|
|
19
|
+
// This is for Provoly-like items
|
|
20
|
+
switch (attribute) {
|
|
21
|
+
case 'id':
|
|
22
|
+
return of(this.data.item[attribute]);
|
|
23
|
+
case 'oClass':
|
|
24
|
+
return this.translateIdPipe.transform(this.data.item[attribute], {
|
|
25
|
+
type: 'class',
|
|
26
|
+
output: 'name'
|
|
27
|
+
});
|
|
28
|
+
default:
|
|
29
|
+
return of((this.data.item.attributes[attribute]?.value ?? ''));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
// This is for other items, like WMSFeatures
|
|
34
|
+
return of(this.data.item.properties.find((prop) => prop.key === attribute).value);
|
|
28
35
|
}
|
|
29
36
|
}
|
|
30
37
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.6", ngImport: i0, type: AttributeTooltipComponent, deps: [{ token: i1.TranslateIdPipe }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provoly-dashboard-tooltips-attribute.mjs","sources":["../../../../projects/provoly/dashboard/tooltips/attribute/attribute-tooltip.component.ts","../../../../projects/provoly/dashboard/tooltips/attribute/attribute-tooltip.component.html","../../../../projects/provoly/dashboard/tooltips/attribute/attribute-tooltip.module.ts","../../../../projects/provoly/dashboard/tooltips/attribute/provoly-dashboard-tooltips-attribute.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { BaseTooltipComponent, TranslateIdPipe } from '@provoly/dashboard';\nimport { Observable, of } from 'rxjs';\n\n@Component({\n selector: 'pry-attribute-tooltip',\n templateUrl: './attribute-tooltip.component.html'\n})\nexport class AttributeTooltipComponent extends BaseTooltipComponent {\n constructor(private translateIdPipe: TranslateIdPipe) {\n super();\n this.context = this.context ?? { attributes: [] };\n }\n\n getValue(attribute: string): Observable<string> {\n switch (attribute) {\n
|
|
1
|
+
{"version":3,"file":"provoly-dashboard-tooltips-attribute.mjs","sources":["../../../../projects/provoly/dashboard/tooltips/attribute/attribute-tooltip.component.ts","../../../../projects/provoly/dashboard/tooltips/attribute/attribute-tooltip.component.html","../../../../projects/provoly/dashboard/tooltips/attribute/attribute-tooltip.module.ts","../../../../projects/provoly/dashboard/tooltips/attribute/provoly-dashboard-tooltips-attribute.ts"],"sourcesContent":["import { Component } from '@angular/core';\nimport { BaseTooltipComponent, TranslateIdPipe } from '@provoly/dashboard';\nimport { Observable, of } from 'rxjs';\n\n@Component({\n selector: 'pry-attribute-tooltip',\n templateUrl: './attribute-tooltip.component.html'\n})\nexport class AttributeTooltipComponent extends BaseTooltipComponent {\n constructor(private translateIdPipe: TranslateIdPipe) {\n super();\n this.context = this.context ?? { attributes: [] };\n }\n\n getValue(attribute: string): Observable<string> {\n if (!this.data.item.properties) {\n // This is for Provoly-like items\n switch (attribute) {\n case 'id':\n return of(this.data.item[attribute]);\n case 'oClass':\n return this.translateIdPipe.transform(this.data.item[attribute], {\n type: 'class',\n output: 'name'\n }) as Observable<string>;\n default:\n return of((this.data.item.attributes[attribute]?.value ?? '') as string);\n }\n } else {\n // This is for other items, like WMSFeatures\n return of(this.data.item.properties.find((prop: { key: string; value: string }) => prop.key === attribute).value);\n }\n }\n}\n","<div class=\"m-tooltip__item__content\">\n <h3 class=\"a-h3 -attribute\">\n <img\n [src]=\"data.item | translateItemToSymbol | async\"\n [alt]=\"data.item.oClass | translateId : { type: 'class', output: 'name' } | async\"\n width=\"32\"\n aria-hidden=\"true\"\n />\n <span>{{ data.item.oClass | translateId : { type: 'class', output: 'name' } | async }}</span>\n </h3>\n <ng-container *ngFor=\"let attribute of context.attributes\">\n <p>\n <span>{{ attribute }}:</span> {{ getValue(attribute) | async }}\n </p>\n </ng-container>\n</div>\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule, Type } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { BaseTooltipComponent, BaseTooltipModule, PryCoreModule } from '@provoly/dashboard';\nimport { AttributeTooltipComponent } from './attribute-tooltip.component';\n\n@NgModule({\n declarations: [AttributeTooltipComponent],\n imports: [CommonModule, FormsModule, OverlayModule, PryCoreModule],\n exports: [AttributeTooltipComponent]\n})\nexport class PryAttributeTooltipModule extends BaseTooltipModule {\n override getComponent() {\n return AttributeTooltipComponent as Type<BaseTooltipComponent>;\n }\n}\n","/**\n * Generated bundle index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A;AAExB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,YAH1B,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGtD,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBALrC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,yBAAyB,CAAC;oBACzC,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,CAAC;oBAClE,OAAO,EAAE,CAAC,yBAAyB,CAAC;AACrC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -150,18 +150,29 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
150
150
|
const ordinate = classes
|
|
151
151
|
.map((clazz) => clazz.attributes.find((attr) => attr.id === options.ordinate.attribute))
|
|
152
152
|
.find((attr) => !!attr);
|
|
153
|
+
const groupBy = classes
|
|
154
|
+
.map((clazz) => clazz.attributes.find((attr) => attr.id === options.groupBy?.attribute))
|
|
155
|
+
.find((attr) => !!attr);
|
|
153
156
|
const abscissaFieldType = fields.find((field) => field.id === abscissa?.field)?.type ?? FieldType.STRING;
|
|
154
157
|
const ordinateFieldType = fields.find((field) => field.id === ordinate?.field)?.type ?? FieldType.STRING;
|
|
158
|
+
const groupByFieldType = fields.find((field) => field.id === groupBy?.field)?.type ?? FieldType.STRING;
|
|
155
159
|
return {
|
|
156
160
|
abscissa: {
|
|
157
161
|
fieldType: abscissaFieldType,
|
|
158
|
-
vegaType: this.translateToVegaType(abscissaFieldType, abscissa?.name ?? '')
|
|
162
|
+
vegaType: this.translateToVegaType(abscissaFieldType, abscissa?.name ?? ''),
|
|
163
|
+
name: abscissa?.name ?? ''
|
|
159
164
|
},
|
|
160
165
|
ordinate: {
|
|
161
166
|
fieldType: ordinateFieldType,
|
|
162
167
|
vegaType: options.ordinate.operation === Operation.COUNT || options.ordinate.operation === Operation.DISTINCT
|
|
163
168
|
? VegaType.QUANTITATIVE
|
|
164
|
-
: this.translateToVegaType(ordinateFieldType, ordinate?.name ?? '')
|
|
169
|
+
: this.translateToVegaType(ordinateFieldType, ordinate?.name ?? ''),
|
|
170
|
+
name: ordinate?.name ?? ''
|
|
171
|
+
},
|
|
172
|
+
groupBy: {
|
|
173
|
+
fieldType: groupByFieldType,
|
|
174
|
+
vegaType: this.translateToVegaType(groupByFieldType, groupBy?.name),
|
|
175
|
+
name: groupBy?.name ?? ''
|
|
165
176
|
}
|
|
166
177
|
};
|
|
167
178
|
}));
|
|
@@ -192,6 +203,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
192
203
|
]).pipe(map(([options, types, values, size, display]) => {
|
|
193
204
|
const isCircular = [GraphType.CIRCULAR, GraphType.DONUT].includes(options.graph.type);
|
|
194
205
|
const stacked = options.graph.type.startsWith('bar') ? !options.graph.stacked : options.graph.stacked;
|
|
206
|
+
const legendTitle = this.translateService.instant(options.groupBy ? types.groupBy.name ?? '' : '@pry.widget.chart.legendLabel');
|
|
195
207
|
return mergeDeep({
|
|
196
208
|
$schema: 'https://vega.github.io/schema/vega-lite/v5.json',
|
|
197
209
|
title: this.getTitle(options),
|
|
@@ -252,7 +264,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
252
264
|
: undefined,
|
|
253
265
|
theta: isCircular ? { field: 'value', type: types.ordinate.vegaType } : undefined,
|
|
254
266
|
color: {
|
|
255
|
-
title:
|
|
267
|
+
title: legendTitle,
|
|
256
268
|
field: !isCircular ? 'series' : 'key',
|
|
257
269
|
legend: options.graph.legend,
|
|
258
270
|
scale: options.graph.legend ? { scheme: options.groupBy?.color ?? this.schemes[0].id } : undefined
|
|
@@ -270,7 +282,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
270
282
|
{ field: 'value', type: types.ordinate.vegaType, title: options.ordinate.label },
|
|
271
283
|
{
|
|
272
284
|
field: 'series',
|
|
273
|
-
title:
|
|
285
|
+
title: legendTitle,
|
|
274
286
|
type: 'nominal'
|
|
275
287
|
}
|
|
276
288
|
]
|
|
@@ -301,7 +313,9 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
301
313
|
renderer: 'canvas',
|
|
302
314
|
formatLocale: this.translateService.instantObject('@pry.widget.chart.numberLocale'),
|
|
303
315
|
timeFormatLocale: this.translateService.instantObject('@pry.widget.chart.timeFormatLocale')
|
|
304
|
-
})
|
|
316
|
+
})
|
|
317
|
+
.then((result) => (this.view = result.view))
|
|
318
|
+
.catch((err) => console.error('Cannot display chart', err));
|
|
305
319
|
}
|
|
306
320
|
else {
|
|
307
321
|
setTimeout(() => this.trigger$.next(), 100);
|
|
@@ -801,7 +815,6 @@ const frTranslations = {
|
|
|
801
815
|
title: 'Opération'
|
|
802
816
|
},
|
|
803
817
|
chooseParameters: "Merci de sélectionner les paramètres afin d'afficher le graphique",
|
|
804
|
-
series: 'Regroupement',
|
|
805
818
|
type: 'Type de graphique',
|
|
806
819
|
title: 'Titre du graphique',
|
|
807
820
|
graphType: {
|