@provoly/dashboard 1.4.5 → 1.4.7
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/esm2022/filters/date/date-filter.component.mjs +3 -3
- package/esm2022/import/components/list/import-list.component.mjs +3 -3
- package/esm2022/lib/core/components/sort/sort-data.pipe.mjs +2 -2
- package/esm2022/lib/core/errors/http-error-interceptor.service.mjs +1 -2
- package/esm2022/lib/core/store/config/config.service.mjs +22 -18
- package/esm2022/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.mjs +106 -92
- package/esm2022/widgets/widget-aggregated-chart/i18n/en.translations.mjs +11 -2
- package/esm2022/widgets/widget-aggregated-chart/i18n/fr.translations.mjs +12 -3
- package/esm2022/widgets/widget-map/interaction/tooltip-manager.class.mjs +2 -1
- package/fesm2022/provoly-dashboard-filters-date.mjs +2 -2
- package/fesm2022/provoly-dashboard-filters-date.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-import.mjs +2 -2
- package/fesm2022/provoly-dashboard-import.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs +126 -94
- package/fesm2022/provoly-dashboard-widgets-widget-aggregated-chart.mjs.map +1 -1
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs +1 -0
- package/fesm2022/provoly-dashboard-widgets-widget-map.mjs.map +1 -1
- package/fesm2022/provoly-dashboard.mjs +22 -19
- package/fesm2022/provoly-dashboard.mjs.map +1 -1
- package/lib/core/components/sort/sort-data.pipe.d.ts +1 -1
- package/lib/core/store/config/config.service.d.ts +2 -1
- package/package.json +31 -31
- package/styles/components/_m-filter.scss +17 -2
- package/widgets/widget-aggregated-chart/component/widget-aggregated-chart.component.d.ts +13 -13
- package/widgets/widget-aggregated-chart/i18n/en.translations.d.ts +9 -0
- package/widgets/widget-aggregated-chart/i18n/fr.translations.d.ts +9 -0
|
@@ -9,7 +9,7 @@ import * as i2 from '@provoly/dashboard';
|
|
|
9
9
|
import { DataWidgetComponent, WIDGET_HEADER_HEIGHT, GraphType, Operation, FieldSelectors, ClassSelectors, FieldType, NamedQueryTypes, VegaType, SearchActions, BaseWidgetModule, PryCoreModule, PryDashboardModule, PrySelectModule, PryIconModule, PryToggleModule, PryEditInputModule, PryI18nModule, PryRangeModule, PrySortModule, PryAggregationService } from '@provoly/dashboard';
|
|
10
10
|
import * as i6 from '@provoly/dashboard/components/checkbox';
|
|
11
11
|
import { PryCheckboxModule } from '@provoly/dashboard/components/checkbox';
|
|
12
|
-
import { BehaviorSubject, Subject, map, filter,
|
|
12
|
+
import { BehaviorSubject, Subject, combineLatest, map, filter, fromEvent, startWith, debounceTime, tap, switchMap, catchError, throwError, withLatestFrom, share } from 'rxjs';
|
|
13
13
|
import embed, { vega } from 'vega-embed';
|
|
14
14
|
import { mergeDeep } from 'vega-lite';
|
|
15
15
|
import { initConfig } from 'vega-lite/build/src/config';
|
|
@@ -50,34 +50,38 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
50
50
|
{ value: 'asc', label: '' },
|
|
51
51
|
{ value: 'desc', label: '' }
|
|
52
52
|
];
|
|
53
|
+
// @ts-ignore
|
|
53
54
|
this.colors = vega.scheme('Provoly');
|
|
54
55
|
this.DEFAULT_ITEM_LIMIT = 20;
|
|
56
|
+
this.fields$ = this.store.select(FieldSelectors.fields);
|
|
57
|
+
this.classes$ = this.store.select(ClassSelectors.classes);
|
|
55
58
|
this.typeOptions = Object.values(GraphType)
|
|
56
59
|
.map((v) => ({
|
|
57
60
|
id: v,
|
|
58
61
|
label: this.translateService.instant('@pry.widget.chart.graphType.' + v)
|
|
59
62
|
}))
|
|
60
63
|
.sort((a, b) => a.label.localeCompare(b.label));
|
|
61
|
-
this.options$ = this.manifest
|
|
62
|
-
|
|
63
|
-
abscissa
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
this.options$ = combineLatest([this.manifest$, this.classes$]).pipe(map(([manifest, classes]) => {
|
|
65
|
+
const options = manifest.options;
|
|
66
|
+
const abscissa = classes
|
|
67
|
+
.map((clazz) => clazz.attributes.find((attr) => attr.id === options.abscissa?.attribute))
|
|
68
|
+
.find((attr) => !!attr);
|
|
69
|
+
const fixInterval = this.fixInterval(options, abscissa);
|
|
70
|
+
console.log({
|
|
71
|
+
graph: { type: GraphType.BAR, tooltip: true, legend: false },
|
|
72
|
+
abscissa: { keep0: true },
|
|
73
|
+
ordinate: { keep0: true }
|
|
74
|
+
}, (options ?? {}), fixInterval);
|
|
75
|
+
return mergeDeep({
|
|
76
|
+
graph: { type: GraphType.BAR, tooltip: true, legend: false },
|
|
77
|
+
abscissa: { keep0: true },
|
|
78
|
+
ordinate: { keep0: true }
|
|
79
|
+
}, (options ?? {}), fixInterval);
|
|
80
|
+
}));
|
|
66
81
|
this.options$.pipe(filter((opt) => !!opt)).subscribe((options) => {
|
|
82
|
+
console.log(options);
|
|
67
83
|
this.optionsCopy$.next(JSON.parse(JSON.stringify(options)));
|
|
68
|
-
if ([GraphType.HISTOGRAM].includes(options.graph?.type)) {
|
|
69
|
-
this.enableIntervals(true);
|
|
70
|
-
}
|
|
71
84
|
});
|
|
72
|
-
this.fields$ = this.store.select(FieldSelectors.fields);
|
|
73
|
-
this.classes$ = this.store.select(ClassSelectors.classes);
|
|
74
|
-
const usedAttributes$ = combineLatest([this.usedDatasources$, this.classes$]).pipe(map(([datasources, classes]) => {
|
|
75
|
-
const usedClasses = datasources
|
|
76
|
-
.filter((ds) => ds.sourceType === 'dataset')
|
|
77
|
-
// @ts-ignore
|
|
78
|
-
.map((ds) => ds.oClass);
|
|
79
|
-
return this.classes.filter((c) => usedClasses.includes(c.id));
|
|
80
|
-
}));
|
|
81
85
|
this.operations$ = combineLatest([this.usedDatasources$, this.classes$, this.fields$]).pipe(map(([datasources, classes, fields]) => classes
|
|
82
86
|
.filter((clazz) => datasources.map((ds) => ('oClass' in ds ? ds.oClass : undefined)).includes(clazz.id))
|
|
83
87
|
.map((clazz) => clazz.attributes)
|
|
@@ -141,7 +145,9 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
141
145
|
Operation.AVERAGE,
|
|
142
146
|
Operation.MEDIAN,
|
|
143
147
|
Operation.NONE
|
|
144
|
-
]
|
|
148
|
+
]
|
|
149
|
+
.map((op) => op.toString())
|
|
150
|
+
.includes(this.optionsCopy$.value?.ordinate.operation ?? '----')) {
|
|
145
151
|
return (!!field &&
|
|
146
152
|
[FieldType.INTEGER, FieldType.INSTANT, FieldType.LONG, FieldType.DECIMAL].includes(field.type));
|
|
147
153
|
}
|
|
@@ -172,7 +178,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
172
178
|
name: abscissa?.name ?? ''
|
|
173
179
|
},
|
|
174
180
|
ordinate: {
|
|
175
|
-
|
|
181
|
+
field: ordinate?.field,
|
|
176
182
|
vegaType: options.ordinate.operation === Operation.COUNT || options.ordinate.operation === Operation.DISTINCT
|
|
177
183
|
? VegaType.QUANTITATIVE
|
|
178
184
|
: this.translateToVegaType(ordinate?.field.type, ordinate?.name ?? ''),
|
|
@@ -191,7 +197,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
191
197
|
combineLatest([fromEvent(window, 'datasourceRefresh'), this.datasourceIds$]).pipe(filter(([event, datasources]) => datasources.includes(event.detail.replace(/$aggregate!/, ''))), startWith(undefined))
|
|
192
198
|
]).pipe(debounceTime(100), tap(([datasources]) => this.store.dispatch(SearchActions.setSearchLoading({ datasources, start: true }))), switchMap(([datasources, options]) => this.aggregationService.aggregate(datasources, options).pipe(tap(() => this.store.dispatch(SearchActions.setSearchLoading({ datasources, start: false }))), catchError((err) => {
|
|
193
199
|
this.store.dispatch(SearchActions.setSearchLoading({ datasources, start: false }));
|
|
194
|
-
|
|
200
|
+
return throwError(err);
|
|
195
201
|
}))), withLatestFrom(this.options$), map(([aggregate, options]) => {
|
|
196
202
|
// @ts-ignore
|
|
197
203
|
if (aggregate.values.length > 0 && !aggregate.values[0].groupBy) {
|
|
@@ -208,7 +214,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
208
214
|
})))
|
|
209
215
|
.reduce((a, b) => [...a, ...b], []);
|
|
210
216
|
return { operation: aggregate.operation, data: flattened };
|
|
211
|
-
}), startWith({ operation: Operation.NONE, data:
|
|
217
|
+
}), startWith({ operation: Operation.NONE, data: {} }), share());
|
|
212
218
|
this.noData$ = this.datasourceIds$.pipe(map((ids) => ids.length === 0));
|
|
213
219
|
this.noAggregationData$ = this.aggregatedValues$.pipe(map(({ data }) => data.length === 0));
|
|
214
220
|
this.vegaLiteSpec$ = combineLatest([
|
|
@@ -249,7 +255,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
249
255
|
axis: {
|
|
250
256
|
grid: false,
|
|
251
257
|
...WidgetAggregatedChartComponent.minTick(types.abscissa.field?.type ?? FieldType.STRING),
|
|
252
|
-
labelExpr: this.getLabelExpr('x', types.abscissa.vegaType, types.abscissa.field),
|
|
258
|
+
labelExpr: this.getLabelExpr('x', types.abscissa.vegaType, options?.abscissa?.interval, types.abscissa.field),
|
|
253
259
|
...this.getLabelAngle(types.abscissa.vegaType, values.data)
|
|
254
260
|
},
|
|
255
261
|
scale: {
|
|
@@ -268,7 +274,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
268
274
|
axis: {
|
|
269
275
|
...WidgetAggregatedChartComponent.minTick(types.ordinate.field?.type ?? FieldType.STRING),
|
|
270
276
|
...this.setTickCount(values.data),
|
|
271
|
-
labelExpr: this.getLabelExpr('y', types.ordinate.vegaType, types.ordinate.field)
|
|
277
|
+
labelExpr: this.getLabelExpr('y', types.ordinate.vegaType, undefined, types.ordinate.field)
|
|
272
278
|
},
|
|
273
279
|
scale: {
|
|
274
280
|
zero: types.ordinate.vegaType === VegaType.QUANTITATIVE ? !!options.ordinate.keep0 : false
|
|
@@ -302,13 +308,13 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
302
308
|
field: 'key',
|
|
303
309
|
type: types.abscissa.vegaType,
|
|
304
310
|
title: options.abscissa.label,
|
|
305
|
-
...this.getDataFormat(types.abscissa.vegaType, types.abscissa.field)
|
|
311
|
+
...this.getDataFormat(types.abscissa.vegaType, options?.abscissa?.interval, types.abscissa.field)
|
|
306
312
|
},
|
|
307
313
|
{
|
|
308
314
|
field: 'value',
|
|
309
315
|
type: types.ordinate.vegaType,
|
|
310
316
|
title: options.ordinate.label,
|
|
311
|
-
...this.getDataFormat(types.ordinate.vegaType, types.ordinate.field)
|
|
317
|
+
...this.getDataFormat(types.ordinate.vegaType, undefined, types.ordinate.field)
|
|
312
318
|
},
|
|
313
319
|
{
|
|
314
320
|
field: 'series',
|
|
@@ -321,13 +327,13 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
321
327
|
field: 'key',
|
|
322
328
|
type: types.abscissa.vegaType,
|
|
323
329
|
title: options.abscissa.label,
|
|
324
|
-
...this.getDataFormat(types.abscissa.vegaType, types.abscissa.field)
|
|
330
|
+
...this.getDataFormat(types.abscissa.vegaType, options?.abscissa?.interval, types.abscissa.field)
|
|
325
331
|
},
|
|
326
332
|
{
|
|
327
333
|
field: 'value',
|
|
328
334
|
type: types.ordinate.vegaType,
|
|
329
335
|
title: options.ordinate.label,
|
|
330
|
-
...this.getDataFormat(types.ordinate.vegaType, types.ordinate.field)
|
|
336
|
+
...this.getDataFormat(types.ordinate.vegaType, undefined, types.ordinate.field)
|
|
331
337
|
}
|
|
332
338
|
]
|
|
333
339
|
: undefined
|
|
@@ -336,7 +342,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
336
342
|
],
|
|
337
343
|
config: this.getChartConfig()
|
|
338
344
|
}, options.additionalSpec);
|
|
339
|
-
}));
|
|
345
|
+
}), tap((v) => console.log(v)));
|
|
340
346
|
this.sortValues$ = this.optionsCopy$.pipe(map((options) => {
|
|
341
347
|
return [
|
|
342
348
|
{
|
|
@@ -371,6 +377,22 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
371
377
|
.sort((a, b) => a.label.localeCompare(b.label));
|
|
372
378
|
}));
|
|
373
379
|
}
|
|
380
|
+
fixInterval(options, abscissa) {
|
|
381
|
+
const fixInterval = { abscissa: options.abscissa ?? {} };
|
|
382
|
+
if (!!abscissa) {
|
|
383
|
+
let newIntervalValue = options.abscissa?.interval ?? (abscissa.field.type !== FieldType.INSTANT ? CHART_INTERVAL_STEP : 'second');
|
|
384
|
+
// if date time interval and field is not date, reinitializing interval value
|
|
385
|
+
if (typeof options?.abscissa?.interval === 'string' && abscissa.field.type !== FieldType.INSTANT) {
|
|
386
|
+
newIntervalValue = CHART_INTERVAL_STEP;
|
|
387
|
+
}
|
|
388
|
+
// if numeric interval and field is date, reinitializing interval value
|
|
389
|
+
if (typeof options?.abscissa?.interval !== 'string' && abscissa.field.type === FieldType.INSTANT) {
|
|
390
|
+
newIntervalValue = 'second';
|
|
391
|
+
}
|
|
392
|
+
fixInterval.abscissa.interval = newIntervalValue;
|
|
393
|
+
}
|
|
394
|
+
return fixInterval;
|
|
395
|
+
}
|
|
374
396
|
ngAfterViewInit() {
|
|
375
397
|
this.subscriptions.add(combineLatest([this.vegaLiteSpec$, this.trigger$]).subscribe(([spec, _]) => {
|
|
376
398
|
if (this.vega) {
|
|
@@ -394,7 +416,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
394
416
|
}));
|
|
395
417
|
this.trigger$.next();
|
|
396
418
|
if (this.optionsCopy$.value &&
|
|
397
|
-
(!!this.optionsCopy$.value
|
|
419
|
+
(!!this.optionsCopy$.value?.abscissa.limit || this.optionsCopy$.value?.abscissa.limit === undefined)) {
|
|
398
420
|
this.toggleLimitItems(true);
|
|
399
421
|
}
|
|
400
422
|
}
|
|
@@ -499,14 +521,14 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
499
521
|
...this.optionsCopy$.value,
|
|
500
522
|
graph: { ...this.optionsCopy$.value?.graph, type: $event }
|
|
501
523
|
});
|
|
502
|
-
if ([GraphType.CIRCULAR, GraphType.DONUT].includes($event)) {
|
|
524
|
+
if ([GraphType.CIRCULAR, GraphType.DONUT].map((gt) => gt.toString()).includes($event)) {
|
|
503
525
|
this.optionsCopy$.next({
|
|
504
526
|
...this.optionsCopy$.value,
|
|
505
527
|
groupBy: undefined,
|
|
506
528
|
circleColorScheme: this.optionsCopy$.value?.circleColorScheme ?? 'Provoly'
|
|
507
529
|
});
|
|
508
530
|
}
|
|
509
|
-
if ([GraphType.HISTOGRAM].includes($event)) {
|
|
531
|
+
if ([GraphType.HISTOGRAM.toString()].includes($event)) {
|
|
510
532
|
this.enableIntervals(true);
|
|
511
533
|
}
|
|
512
534
|
}
|
|
@@ -540,20 +562,19 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
540
562
|
}
|
|
541
563
|
changeAbscissa($event) {
|
|
542
564
|
if ($event && this.optionsCopy$.value) {
|
|
543
|
-
this.optionsCopy$.next({
|
|
544
|
-
...this.optionsCopy$.value,
|
|
545
|
-
abscissa: { ...this.optionsCopy$.value?.abscissa, attribute: $event }
|
|
546
|
-
});
|
|
547
565
|
const attr = this.classes
|
|
548
566
|
.map((clazz) => clazz.attributes)
|
|
549
567
|
.reduce((a, b) => [...a, ...b], [])
|
|
550
568
|
.find((attr) => attr.id === $event);
|
|
551
569
|
this.optionsCopy$.next({
|
|
552
570
|
...this.optionsCopy$.value,
|
|
553
|
-
abscissa: {
|
|
571
|
+
abscissa: {
|
|
572
|
+
...this.optionsCopy$.value?.abscissa,
|
|
573
|
+
attribute: $event,
|
|
574
|
+
label: attr?.name ?? 'attr-not-found',
|
|
575
|
+
interval: this.fixInterval({ ...this.optionsCopy$.value, abscissa: { ...this.optionsCopy$.value.abscissa, attribute: $event } }, attr).abscissa?.interval
|
|
576
|
+
}
|
|
554
577
|
});
|
|
555
|
-
this.copyAbscissaField = this.fields.find((field) => attr?.field.id === field.id);
|
|
556
|
-
this.enableIntervals(!!this.optionsCopy$.value?.abscissa.interval);
|
|
557
578
|
}
|
|
558
579
|
}
|
|
559
580
|
changeAbscissaLabel($event) {
|
|
@@ -606,35 +627,18 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
606
627
|
}
|
|
607
628
|
}
|
|
608
629
|
enableIntervals($event) {
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
// if numeric interval and field is date, reinitializing interval value
|
|
620
|
-
if (typeof this.optionsCopy$.value.abscissa?.interval !== 'string' &&
|
|
621
|
-
this.copyAbscissaField?.type === FieldType.INSTANT) {
|
|
622
|
-
newIntervalValue = 'second';
|
|
630
|
+
const attr = this.classes
|
|
631
|
+
.map((clazz) => clazz.attributes)
|
|
632
|
+
.reduce((a, b) => [...a, ...b], [])
|
|
633
|
+
.find((attr) => attr.id === this.optionsCopy$.value?.abscissa?.attribute);
|
|
634
|
+
if (attr) {
|
|
635
|
+
this.optionsCopy$.next({
|
|
636
|
+
...this.optionsCopy$.value,
|
|
637
|
+
abscissa: {
|
|
638
|
+
...this.optionsCopy$.value?.abscissa,
|
|
639
|
+
interval: $event ? this.fixInterval(this.optionsCopy$.value, attr).abscissa?.interval : undefined
|
|
623
640
|
}
|
|
624
|
-
|
|
625
|
-
...this.optionsCopy$.value,
|
|
626
|
-
abscissa: {
|
|
627
|
-
...this.optionsCopy$.value?.abscissa,
|
|
628
|
-
interval: newIntervalValue
|
|
629
|
-
}
|
|
630
|
-
});
|
|
631
|
-
}
|
|
632
|
-
else {
|
|
633
|
-
this.optionsCopy$.next({
|
|
634
|
-
...this.optionsCopy$.value,
|
|
635
|
-
abscissa: { ...this.optionsCopy$.value?.abscissa, interval: undefined }
|
|
636
|
-
});
|
|
637
|
-
}
|
|
641
|
+
});
|
|
638
642
|
}
|
|
639
643
|
}
|
|
640
644
|
changeInterval($event) {
|
|
@@ -653,7 +657,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
653
657
|
this.optionsCopy$.next({
|
|
654
658
|
...this.optionsCopy$.value,
|
|
655
659
|
abscissa: {
|
|
656
|
-
...this.optionsCopy$.value
|
|
660
|
+
...this.optionsCopy$.value?.abscissa,
|
|
657
661
|
interval: $event
|
|
658
662
|
}
|
|
659
663
|
});
|
|
@@ -663,7 +667,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
663
667
|
if (this.optionsCopy$.value) {
|
|
664
668
|
this.optionsCopy$.next({
|
|
665
669
|
...this.optionsCopy$.value,
|
|
666
|
-
graph: { ...this.optionsCopy$.value
|
|
670
|
+
graph: { ...this.optionsCopy$.value?.graph, legend: $event }
|
|
667
671
|
});
|
|
668
672
|
}
|
|
669
673
|
}
|
|
@@ -695,7 +699,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
695
699
|
}
|
|
696
700
|
}
|
|
697
701
|
changeGroupBy($event) {
|
|
698
|
-
if (typeof $event === 'string' && this.optionsCopy$.value && this.optionsCopy$.value
|
|
702
|
+
if (typeof $event === 'string' && this.optionsCopy$.value && this.optionsCopy$.value?.groupBy) {
|
|
699
703
|
this.optionsCopy$.next({
|
|
700
704
|
...this.optionsCopy$.value,
|
|
701
705
|
groupBy: {
|
|
@@ -710,7 +714,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
710
714
|
this.optionsCopy$.next({
|
|
711
715
|
...this.optionsCopy$.value,
|
|
712
716
|
groupBy: {
|
|
713
|
-
attribute: this.optionsCopy$.value
|
|
717
|
+
attribute: this.optionsCopy$.value?.groupBy?.attribute,
|
|
714
718
|
color: $event
|
|
715
719
|
}
|
|
716
720
|
});
|
|
@@ -737,9 +741,9 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
737
741
|
this.optionsCopy$.next({
|
|
738
742
|
...this.optionsCopy$.value,
|
|
739
743
|
graph: {
|
|
740
|
-
...this.optionsCopy$.value
|
|
744
|
+
...this.optionsCopy$.value?.graph,
|
|
741
745
|
sort: $event
|
|
742
|
-
? this.optionsCopy$.value
|
|
746
|
+
? this.optionsCopy$.value?.graph.sort ?? {
|
|
743
747
|
value: 'key',
|
|
744
748
|
direction: 'asc'
|
|
745
749
|
}
|
|
@@ -753,8 +757,8 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
753
757
|
this.optionsCopy$.next({
|
|
754
758
|
...this.optionsCopy$.value,
|
|
755
759
|
graph: {
|
|
756
|
-
...this.optionsCopy$.value
|
|
757
|
-
sort: { ...this.optionsCopy$.value
|
|
760
|
+
...this.optionsCopy$.value?.graph,
|
|
761
|
+
sort: { ...this.optionsCopy$.value?.graph.sort, value: $event }
|
|
758
762
|
}
|
|
759
763
|
});
|
|
760
764
|
}
|
|
@@ -772,12 +776,13 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
772
776
|
}
|
|
773
777
|
toggleLimitItems($event) {
|
|
774
778
|
if (this.optionsCopy$.value) {
|
|
775
|
-
if ($event !== !!this.optionsCopy$.value
|
|
779
|
+
if ($event !== !!this.optionsCopy$.value?.abscissa.limit ||
|
|
780
|
+
this.optionsCopy$.value?.abscissa.limit === undefined) {
|
|
776
781
|
this.optionsCopy$.next({
|
|
777
782
|
...this.optionsCopy$.value,
|
|
778
783
|
abscissa: {
|
|
779
|
-
...this.optionsCopy$.value
|
|
780
|
-
limit: this.optionsCopy$.value
|
|
784
|
+
...this.optionsCopy$.value?.abscissa,
|
|
785
|
+
limit: this.optionsCopy$.value?.abscissa.limit ? null : this.DEFAULT_ITEM_LIMIT
|
|
781
786
|
}
|
|
782
787
|
});
|
|
783
788
|
}
|
|
@@ -788,7 +793,7 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
788
793
|
this.optionsCopy$.next({
|
|
789
794
|
...this.optionsCopy$.value,
|
|
790
795
|
abscissa: {
|
|
791
|
-
...this.optionsCopy$.value
|
|
796
|
+
...this.optionsCopy$.value?.abscissa,
|
|
792
797
|
limit: $event > 0 ? $event : 1
|
|
793
798
|
}
|
|
794
799
|
});
|
|
@@ -816,8 +821,9 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
816
821
|
}
|
|
817
822
|
}
|
|
818
823
|
getLabelAngle(abscissaType, data) {
|
|
819
|
-
if ([VegaType.NOMINAL, VegaType.ORDINAL].includes(abscissaType) &&
|
|
820
|
-
data.some((item) => item.key.toString().length > 10))
|
|
824
|
+
if (([VegaType.NOMINAL, VegaType.ORDINAL].map((vt) => vt.toString()).includes(abscissaType) &&
|
|
825
|
+
data.some((item) => item.key.toString().length > 10)) ||
|
|
826
|
+
[VegaType.TEMPORAL].map((vt) => vt.toString()).includes(abscissaType)) {
|
|
821
827
|
return { labelAngle: -30 };
|
|
822
828
|
}
|
|
823
829
|
return {};
|
|
@@ -831,35 +837,43 @@ class WidgetAggregatedChartComponent extends DataWidgetComponent {
|
|
|
831
837
|
isTimeInterval(abscissaInterval) {
|
|
832
838
|
return typeof abscissaInterval === 'string';
|
|
833
839
|
}
|
|
834
|
-
getLabelExpr(axis, axisType, field) {
|
|
840
|
+
getLabelExpr(axis, axisType, interval, field) {
|
|
835
841
|
const truncateBasedOn = axis === 'x' ? 'height < 300' : 'width < 100';
|
|
836
|
-
const timeFormat = `timeFormat(datum.value, '${this.getLocaleFormat(field?.format)}')`;
|
|
842
|
+
const timeFormat = `timeFormat(datum.value, '${this.getLocaleFormat(field?.format, interval)}')`;
|
|
837
843
|
const numberFormat = field?.decimalPrecision
|
|
838
844
|
? `format(datum.value, '.${field?.decimalPrecision}f')`
|
|
839
845
|
: 'datum.value';
|
|
840
846
|
const truncatedFormat = 'truncate(datum.value, 10)';
|
|
841
|
-
return
|
|
847
|
+
return axisType === VegaType.TEMPORAL
|
|
848
|
+
? timeFormat
|
|
849
|
+
: `${axisType === VegaType.QUANTITATIVE ? numberFormat : `${truncateBasedOn} ? ${truncatedFormat} : datum.value`}`;
|
|
842
850
|
}
|
|
843
|
-
getDataFormat(axisType, field) {
|
|
851
|
+
getDataFormat(axisType, interval, field) {
|
|
844
852
|
switch (axisType) {
|
|
845
853
|
case VegaType.TEMPORAL:
|
|
846
|
-
return { format: this.getLocaleFormat(field?.format), scale: { type: 'utc' } };
|
|
854
|
+
return { format: this.getLocaleFormat(field?.format, interval), scale: { type: 'utc' } };
|
|
847
855
|
case VegaType.QUANTITATIVE:
|
|
848
856
|
return field?.decimalPrecision ? { format: `.${field?.decimalPrecision}f` } : {};
|
|
849
857
|
default:
|
|
850
858
|
return {};
|
|
851
859
|
}
|
|
852
860
|
}
|
|
853
|
-
getLocaleFormat(type) {
|
|
854
|
-
|
|
855
|
-
|
|
861
|
+
getLocaleFormat(type, interval) {
|
|
862
|
+
if (!interval) {
|
|
863
|
+
const formats = this.translateService.instantObject('@pry.widget.chart.specializedLocale');
|
|
864
|
+
return formats[type ?? 'default'];
|
|
865
|
+
}
|
|
866
|
+
else {
|
|
867
|
+
const formats = this.translateService.instantObject('@pry.widget.chart.specializedLocale.interval');
|
|
868
|
+
return formats[interval ?? 'default'];
|
|
869
|
+
}
|
|
856
870
|
}
|
|
857
871
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: WidgetAggregatedChartComponent, deps: [{ token: i1.Store }, { token: i2.PryI18nService }, { token: i0.ElementRef }, { token: i2.PryAggregationService }, { token: i3.PrySchemeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
858
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: WidgetAggregatedChartComponent, selector: "pry-widget-aggregated-chart", viewQueries: [{ propertyName: "vega", first: true, predicate: ["vega"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<pry-widget-aggregated-chart-css></pry-widget-aggregated-chart-css>\n<div\n class=\"o-widget o-widget--chart\"\n *ngIf=\"optionsCopy$ | async as optionsCopy\"\n [class.-has-header]=\"displayHeader$ | async\"\n>\n <pry-widget-header\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [displayCount]=\"false\"\n [openData$]=\"openData$\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [open$]=\"open$\"\n [header]=\"header\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-edit-input\n label=\"@pry.widget.chart.title\"\n (ngModelChange)=\"changeChartTitle($event)\"\n [ngModel]=\"optionsCopy.graph.title\"\n ></pry-edit-input>\n </div>\n\n <div *ngIf=\"optionsCopy\" class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_type\">{{ '@pry.widget.chart.type' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeType($event)\"\n [items]=\"typeOptions\"\n [ngModel]=\"optionsCopy.graph.type\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"chart_type\"\n ></pry-select>\n </div>\n\n <ng-container *ngIf=\"optionsCopy.graph.type === GraphType.DONUT\">\n <pry-range\n [ngModel]=\"optionsCopy.graph.donutSize\"\n (ngModelChange)=\"changeDonutSize($event)\"\n labelTranslate=\"@pry.widget.chart.donutSize\"\n min=\"1\"\n max=\"500\"\n ></pry-range>\n </ng-container>\n\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleLegend($event)\" [ngModel]=\"!!optionsCopy.graph.legend\">\n {{ '@pry.widget.chart.legend' | i18n }}\n </pry-checkbox>\n </div>\n </div>\n\n <ng-container *ngIf=\"!!optionsCopy.graph.type\">\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"abscissa\">{{ '@pry.widget.chart.abscissa' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeAbscissa($event)\"\n [items]=\"abscissaAttributes$ | async | prySortData: sortActive : sortDirection\"\n [ngModel]=\"optionsCopy.abscissa.attribute\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"abscissa\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\">\n <pry-edit-input\n label=\"@pry.widget.chart.dataLabel\"\n (ngModelChange)=\"changeAbscissaLabel($event)\"\n [ngModel]=\"optionsCopy.abscissa.label\"\n ></pry-edit-input>\n </div>\n\n <div\n *ngIf=\"\n ['quantitative', 'temporal'].includes(translateToVegaType(copyAbscissaField?.type)) &&\n optionsCopy.graph.type !== GraphType.DONUT &&\n optionsCopy.graph.type !== GraphType.CIRCULAR\n \"\n class=\"m-form-label-field\"\n >\n <pry-checkbox (ngModelChange)=\"changeKeep0Abscissa($event)\" [ngModel]=\"optionsCopy.abscissa.keep0\"\n >{{ '@pry.widget.chart.origin' | i18n }}\n </pry-checkbox>\n\n <ng-container *ngIf=\"optionsCopy.graph.type === GraphType.HISTOGRAM\">\n <pry-checkbox\n (ngModelChange)=\"enableIntervals($event)\"\n [ngModel]=\"!!optionsCopy.abscissa.interval\"\n [disabled]=\"optionsCopy.graph.type === GraphType.HISTOGRAM\"\n >{{ '@pry.widget.chart.interval' | i18n }}\n </pry-checkbox>\n\n <ng-container *ngIf=\"!!optionsCopy.abscissa.interval\">\n <ng-container *ngIf=\"!isTimeInterval(optionsCopy.abscissa.interval); else timeInterval\">\n <pry-range\n [ngModel]=\"optionsCopy.abscissa.interval\"\n (ngModelChange)=\"changeInterval($event)\"\n labelTranslate=\"@pry.widget.chart.specifyInterval\"\n min=\"1\"\n max=\"10\"\n ></pry-range>\n </ng-container>\n\n <ng-template #timeInterval>\n <label class=\"a-label\" for=\"time_interval\">{{ '@pry.widget.chart.timeInterval' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeTimeInterval($event)\"\n [items]=\"['second', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year']\"\n [ngModel]=\"optionsCopy.abscissa.interval\"\n i18nPrefix=\"@pry.widget.chart.time.\"\n id=\"time_interval\"\n ></pry-select>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"operations\">{{ '@pry.widget.chart.operation.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeOperation($event)\"\n [items]=\"operations$ | async\"\n [ngModel]=\"optionsCopy.ordinate.operation\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"operations\"\n ></pry-select>\n </div>\n\n <ng-container *ngIf=\"optionsCopy.ordinate.operation !== Operation.COUNT\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"ordinate\">{{ '@pry.widget.chart.ordinate' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeOrdinate($event)\"\n [items]=\"ordinateAttributes$ | async | prySortData: sortActive : sortDirection\"\n [ngModel]=\"optionsCopy.ordinate.attribute\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"ordinate\"\n ></pry-select>\n </div>\n </ng-container>\n\n <div class=\"m-form-label-field\">\n <pry-edit-input\n label=\"@pry.widget.chart.dataLabel\"\n (ngModelChange)=\"changeOrdinateLabel($event)\"\n [ngModel]=\"optionsCopy.ordinate.label\"\n ></pry-edit-input>\n </div>\n\n <div *ngIf=\"translateToVegaType(copyOrdinateField?.type) === 'quantitative'\" class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"changeKeep0Ordinate($event)\" [ngModel]=\"optionsCopy.ordinate.keep0\"\n >{{ '@pry.widget.chart.origin' | i18n }}\n </pry-checkbox>\n </div>\n </div>\n\n <ng-container\n *ngIf=\"optionsCopy.graph.type !== GraphType.DONUT && optionsCopy.graph.type !== GraphType.CIRCULAR\"\n >\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleGroupBy($event)\" [ngModel]=\"!!optionsCopy.groupBy\"\n >{{ '@pry.widget.chart.groupBy' | i18n }}\n </pry-checkbox>\n </div>\n\n <ng-container *ngIf=\"!!optionsCopy.groupBy\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_seriesAttr\">{{ '@pry.widget.chart.groupAttr' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeGroupBy($event)\"\n [ngModel]=\"optionsCopy.groupBy.attribute\"\n [items]=\"abscissaAttributes$ | async | prySortData: sortActive : sortDirection\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"chart_seriesAttr\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\">\n <pry-scheme-picker\n (ngModelChange)=\"changeColorScheme($event)\"\n [ngModel]=\"optionsCopy.groupBy.color\"\n ></pry-scheme-picker>\n </div>\n\n <div class=\"m-form-label-field\">\n <pry-checkbox [ngModel]=\"optionsCopy.graph.stacked\" (ngModelChange)=\"toggleStacked($event)\">\n {{ '@pry.widget.chart.stacked' | i18n }}\n </pry-checkbox>\n </div>\n </ng-container>\n </div>\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-checkbox\n (ngModelChange)=\"toggleLimitItems($event)\"\n [ngModel]=\"optionsCopy.abscissa.limit !== undefined && optionsCopy.abscissa.limit !== null\"\n >\n {{ '@pry.widget.chart.limit' | i18n }}\n </pry-checkbox>\n </div>\n <ng-container *ngIf=\"optionsCopy.abscissa.limit !== undefined && optionsCopy.abscissa.limit !== null\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_limitItemsValue\">{{ '@pry.widget.chart.limitMaxNb' | i18n }}</label>\n <input\n type=\"number\"\n id=\"chart_limitItemsValue\"\n class=\"a-form-field\"\n [ngModel]=\"optionsCopy.abscissa.limit\"\n (ngModelChange)=\"changeLimitValue($event)\"\n min=\"1\"\n step=\"1\"\n [attr.aria-invalid]=\"optionsCopy.abscissa.limit < 1\"\n />\n </div>\n </ng-container>\n </div>\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleSort($event)\" [ngModel]=\"!!optionsCopy.graph.sort\"\n >{{ '@pry.widget.chart.sort.title' | i18n }}\n </pry-checkbox>\n </div>\n <ng-container *ngIf=\"!!optionsCopy.graph.sort\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_sortValue\">{{ '@pry.widget.chart.sort.attribute' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSortValue($event)\"\n [ngModel]=\"optionsCopy.graph.sort.value\"\n [items]=\"sortValues$ | async\"\n bindValue=\"value\"\n bindLabel=\"label\"\n id=\"chart_sortValue\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_sortDirection\">{{ '@pry.widget.chart.sort.direction' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSortDirection($event)\"\n [ngModel]=\"optionsCopy.graph.sort.direction\"\n [items]=\"sortDirections\"\n bindValue=\"value\"\n bindLabel=\"label\"\n id=\"chart_sortDirection\"\n ></pry-select>\n </div>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container\n *ngIf=\"optionsCopy.graph.type === GraphType.DONUT || optionsCopy.graph.type === GraphType.CIRCULAR\"\n >\n <pry-scheme-picker\n (ngModelChange)=\"changeCircleColorScheme($event)\"\n [ngModel]=\"optionsCopy.circleColorScheme\"\n ></pry-scheme-picker>\n </ng-container>\n\n <ng-container\n *ngIf=\"\n optionsCopy.graph.type !== GraphType.DONUT &&\n optionsCopy.graph.type !== GraphType.CIRCULAR &&\n !optionsCopy.groupBy\n \"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_baseColor\">{{ '@pry.widget.chart.color' | i18n }}</label>\n <pry-color-picker\n (ngModelChange)=\"changeBaseColor($event)\"\n [ngModel]=\"optionsCopy.baseColor\"\n id=\"chart_baseColor\"\n ></pry-color-picker>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"aligned-option\">\n <div class=\"a-chip -md\" [style.background-color]=\"item\">{{ item }}</div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </ng-container>\n </pry-settings>\n </pry-widget-header>\n\n <ng-container *ngIf=\"(isChartValid$ | async) && !(noData$ | async) && !(noAggregationData$ | async)\">\n <div #vega></div>\n </ng-container>\n\n <ng-container *ngIf=\"noData$ | async\">\n <div class=\"o-widget__choose-parameters\">\n <img\n class=\"no-result__search\"\n src=\"../../../assets/svgs/pry_recherche_pas_de_resultat.svg\"\n alt=\"{{ '@pry.widget.chart.noData' | i18n }}\"\n aria-hidden=\"true\"\n />\n <span class=\"no-result__text\">{{ '@pry.widget.chart.noData' | i18n }}</span>\n <button type=\"button\" (click)=\"openData()\" class=\"a-btn a-btn--primary\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.readSearch' | i18n }}</span>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!(noData$ | async) && (noAggregationData$ | async)\">\n <div class=\"o-widget__choose-parameters\">\n <img\n class=\"no-result__search\"\n src=\"../../../assets/svgs/pry_recherche_pas_de_resultat.svg\"\n alt=\"{{ '@pry.widget.chart.aggNoResult' | i18n }}\"\n aria-hidden=\"true\"\n />\n <span class=\"no-result__text\">{{ '@pry.widget.chart.aggNoResult' | i18n }}</span>\n <button type=\"button\" (click)=\"openSettings()\" class=\"a-btn a-btn--primary\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.settings.title' | i18n }}</span>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!(noData$ | async) && !(noAggregationData$ | async) && !(isChartValid$ | async)\">\n <div class=\"o-widget__choose-parameters\">\n <img\n class=\"no-result__search\"\n src=\"../../../assets/svgs/pry_recherche_pas_de_resultat.svg\"\n alt=\"{{ '@pry.widget.chart.chooseParameters' | i18n }}\"\n aria-hidden=\"true\"\n />\n <span class=\"no-result__text\">{{ '@pry.widget.chart.chooseParameters' | i18n }}</span>\n <button type=\"button\" (click)=\"openSettings()\" class=\"a-btn a-btn--primary\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.settings.title' | i18n }}</span>\n </button>\n </div>\n </ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.SettingsComponent, selector: "pry-settings", inputs: ["widgetIndex", "isDisable", "headerPresent", "open$", "header"], outputs: ["triggerClick", "saveTriggered", "changeTitle"] }, { kind: "component", type: i2.PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: ["manifest", "openData$", "additionalOptions", "headerOptions", "displayCount", "datasourceIds", "widgetIndex"], outputs: ["manifestModified"] }, { kind: "component", type: i2.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "component", type: i2.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i6.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle", "name", "inputId", "inhibit"] }, { kind: "component", type: i2.PryEditInputComponent, selector: "pry-edit-input", inputs: ["label", "editButtonTooltip", "confirmButtonTooltip"], outputs: ["validated"] }, { kind: "component", type: i2.PryRangeComponent, selector: "pry-range", inputs: ["min", "max", "step", "disabled", "labelTranslate"] }, { kind: "component", type: i7.PryColorPickerComponent, selector: "pry-color-picker" }, { kind: "component", type: i3.PrySchemePickerComponent, selector: "pry-scheme-picker" }, { kind: "component", type: PryWidgetAggregatedChartCssComponent, selector: "pry-widget-aggregated-chart-css" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.I18nPipe, name: "i18n" }, { kind: "pipe", type: i2.PrySortDataPipe, name: "prySortData" }] }); }
|
|
872
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.6", type: WidgetAggregatedChartComponent, selector: "pry-widget-aggregated-chart", viewQueries: [{ propertyName: "vega", first: true, predicate: ["vega"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<pry-widget-aggregated-chart-css></pry-widget-aggregated-chart-css>\n<div\n class=\"o-widget o-widget--chart\"\n *ngIf=\"optionsCopy$ | async as optionsCopy\"\n [class.-has-header]=\"displayHeader$ | async\"\n>\n <pry-widget-header\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [displayCount]=\"false\"\n [openData$]=\"openData$\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [open$]=\"open$\"\n [header]=\"header\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-edit-input\n label=\"@pry.widget.chart.title\"\n (ngModelChange)=\"changeChartTitle($event)\"\n [ngModel]=\"optionsCopy.graph.title\"\n ></pry-edit-input>\n </div>\n\n <div *ngIf=\"optionsCopy\" class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_type\">{{ '@pry.widget.chart.type' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeType($event)\"\n [items]=\"typeOptions\"\n [ngModel]=\"optionsCopy.graph.type\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"chart_type\"\n ></pry-select>\n </div>\n\n <ng-container *ngIf=\"optionsCopy.graph.type === GraphType.DONUT\">\n <pry-range\n [ngModel]=\"optionsCopy.graph.donutSize\"\n (ngModelChange)=\"changeDonutSize($event)\"\n labelTranslate=\"@pry.widget.chart.donutSize\"\n min=\"1\"\n max=\"500\"\n ></pry-range>\n </ng-container>\n\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleLegend($event)\" [ngModel]=\"!!optionsCopy.graph.legend\">\n {{ '@pry.widget.chart.legend' | i18n }}\n </pry-checkbox>\n </div>\n </div>\n\n <ng-container *ngIf=\"!!optionsCopy.graph.type\">\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"abscissa\">{{ '@pry.widget.chart.abscissa' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeAbscissa($event)\"\n [items]=\"abscissaAttributes$ | async | prySortData: sortActive : sortDirection\"\n [ngModel]=\"optionsCopy.abscissa.attribute\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"abscissa\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\">\n <pry-edit-input\n label=\"@pry.widget.chart.dataLabel\"\n (ngModelChange)=\"changeAbscissaLabel($event)\"\n [ngModel]=\"optionsCopy.abscissa.label\"\n ></pry-edit-input>\n </div>\n\n <div\n *ngIf=\"\n ['quantitative', 'temporal'].includes(\n (attributeTypes$ | async)?.abscissa?.vegaType?.toString() ?? '--'\n ) &&\n optionsCopy.graph.type !== GraphType.DONUT &&\n optionsCopy.graph.type !== GraphType.CIRCULAR\n \"\n class=\"m-form-label-field\"\n >\n <pry-checkbox (ngModelChange)=\"changeKeep0Abscissa($event)\" [ngModel]=\"optionsCopy.abscissa.keep0\"\n >{{ '@pry.widget.chart.origin' | i18n }}\n </pry-checkbox>\n\n <ng-container *ngIf=\"optionsCopy.graph.type === GraphType.HISTOGRAM\">\n <pry-checkbox\n (ngModelChange)=\"enableIntervals($event)\"\n [ngModel]=\"!!optionsCopy.abscissa.interval\"\n [disabled]=\"optionsCopy.graph.type === GraphType.HISTOGRAM\"\n >{{ '@pry.widget.chart.interval' | i18n }}\n </pry-checkbox>\n\n <ng-container *ngIf=\"!!optionsCopy.abscissa.interval\">\n <ng-container *ngIf=\"!isTimeInterval(optionsCopy.abscissa.interval); else timeInterval\">\n <pry-range\n [ngModel]=\"optionsCopy.abscissa.interval\"\n (ngModelChange)=\"changeInterval($event)\"\n labelTranslate=\"@pry.widget.chart.specifyInterval\"\n min=\"1\"\n max=\"10\"\n ></pry-range>\n </ng-container>\n\n <ng-template #timeInterval>\n <label class=\"a-label\" for=\"time_interval\">{{ '@pry.widget.chart.timeInterval' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeTimeInterval($event)\"\n [items]=\"['second', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year']\"\n [ngModel]=\"optionsCopy.abscissa.interval\"\n i18nPrefix=\"@pry.widget.chart.time.\"\n id=\"time_interval\"\n ></pry-select>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"operations\">{{ '@pry.widget.chart.operation.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeOperation($event)\"\n [items]=\"operations$ | async\"\n [ngModel]=\"optionsCopy.ordinate.operation\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"operations\"\n ></pry-select>\n </div>\n\n <ng-container *ngIf=\"optionsCopy.ordinate.operation !== Operation.COUNT\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"ordinate\">{{ '@pry.widget.chart.ordinate' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeOrdinate($event)\"\n [items]=\"ordinateAttributes$ | async | prySortData: sortActive : sortDirection\"\n [ngModel]=\"optionsCopy.ordinate.attribute\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"ordinate\"\n ></pry-select>\n </div>\n </ng-container>\n\n <div class=\"m-form-label-field\">\n <pry-edit-input\n label=\"@pry.widget.chart.dataLabel\"\n (ngModelChange)=\"changeOrdinateLabel($event)\"\n [ngModel]=\"optionsCopy.ordinate.label\"\n ></pry-edit-input>\n </div>\n\n <div *ngIf=\"translateToVegaType(copyOrdinateField?.type) === 'quantitative'\" class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"changeKeep0Ordinate($event)\" [ngModel]=\"optionsCopy.ordinate.keep0\"\n >{{ '@pry.widget.chart.origin' | i18n }}\n </pry-checkbox>\n </div>\n </div>\n\n <ng-container\n *ngIf=\"optionsCopy.graph.type !== GraphType.DONUT && optionsCopy.graph.type !== GraphType.CIRCULAR\"\n >\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleGroupBy($event)\" [ngModel]=\"!!optionsCopy.groupBy\"\n >{{ '@pry.widget.chart.groupBy' | i18n }}\n </pry-checkbox>\n </div>\n\n <ng-container *ngIf=\"!!optionsCopy.groupBy\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_seriesAttr\">{{ '@pry.widget.chart.groupAttr' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeGroupBy($event)\"\n [ngModel]=\"optionsCopy.groupBy.attribute\"\n [items]=\"abscissaAttributes$ | async | prySortData: sortActive : sortDirection\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"chart_seriesAttr\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\">\n <pry-scheme-picker\n (ngModelChange)=\"changeColorScheme($event)\"\n [ngModel]=\"optionsCopy.groupBy.color\"\n ></pry-scheme-picker>\n </div>\n\n <div class=\"m-form-label-field\">\n <pry-checkbox [ngModel]=\"optionsCopy.graph.stacked\" (ngModelChange)=\"toggleStacked($event)\">\n {{ '@pry.widget.chart.stacked' | i18n }}\n </pry-checkbox>\n </div>\n </ng-container>\n </div>\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-checkbox\n (ngModelChange)=\"toggleLimitItems($event)\"\n [ngModel]=\"optionsCopy.abscissa.limit !== undefined && optionsCopy.abscissa.limit !== null\"\n >\n {{ '@pry.widget.chart.limit' | i18n }}\n </pry-checkbox>\n </div>\n <ng-container *ngIf=\"optionsCopy.abscissa.limit !== undefined && optionsCopy.abscissa.limit !== null\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_limitItemsValue\">{{ '@pry.widget.chart.limitMaxNb' | i18n }}</label>\n <input\n type=\"number\"\n id=\"chart_limitItemsValue\"\n class=\"a-form-field\"\n [ngModel]=\"optionsCopy.abscissa.limit\"\n (ngModelChange)=\"changeLimitValue($event)\"\n min=\"1\"\n step=\"1\"\n [attr.aria-invalid]=\"optionsCopy.abscissa.limit < 1\"\n />\n </div>\n </ng-container>\n </div>\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleSort($event)\" [ngModel]=\"!!optionsCopy.graph.sort\"\n >{{ '@pry.widget.chart.sort.title' | i18n }}\n </pry-checkbox>\n </div>\n <ng-container *ngIf=\"!!optionsCopy.graph.sort\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_sortValue\">{{ '@pry.widget.chart.sort.attribute' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSortValue($event)\"\n [ngModel]=\"optionsCopy.graph.sort.value\"\n [items]=\"sortValues$ | async\"\n bindValue=\"value\"\n bindLabel=\"label\"\n id=\"chart_sortValue\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_sortDirection\">{{ '@pry.widget.chart.sort.direction' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSortDirection($event)\"\n [ngModel]=\"optionsCopy.graph.sort.direction\"\n [items]=\"sortDirections\"\n bindValue=\"value\"\n bindLabel=\"label\"\n id=\"chart_sortDirection\"\n ></pry-select>\n </div>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container\n *ngIf=\"optionsCopy.graph.type === GraphType.DONUT || optionsCopy.graph.type === GraphType.CIRCULAR\"\n >\n <pry-scheme-picker\n (ngModelChange)=\"changeCircleColorScheme($event)\"\n [ngModel]=\"optionsCopy.circleColorScheme\"\n ></pry-scheme-picker>\n </ng-container>\n\n <ng-container\n *ngIf=\"\n optionsCopy.graph.type !== GraphType.DONUT &&\n optionsCopy.graph.type !== GraphType.CIRCULAR &&\n !optionsCopy.groupBy\n \"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_baseColor\">{{ '@pry.widget.chart.color' | i18n }}</label>\n <pry-color-picker\n (ngModelChange)=\"changeBaseColor($event)\"\n [ngModel]=\"optionsCopy.baseColor\"\n id=\"chart_baseColor\"\n ></pry-color-picker>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"aligned-option\">\n <div class=\"a-chip -md\" [style.background-color]=\"item\">{{ item }}</div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </ng-container>\n </pry-settings>\n </pry-widget-header>\n\n <ng-container *ngIf=\"(isChartValid$ | async) && !(noData$ | async) && !(noAggregationData$ | async)\">\n <div #vega></div>\n </ng-container>\n\n <ng-container *ngIf=\"noData$ | async\">\n <div class=\"o-widget__choose-parameters\">\n <img\n class=\"no-result__search\"\n src=\"../../../assets/svgs/pry_recherche_pas_de_resultat.svg\"\n alt=\"{{ '@pry.widget.chart.noData' | i18n }}\"\n aria-hidden=\"true\"\n />\n <span class=\"no-result__text\">{{ '@pry.widget.chart.noData' | i18n }}</span>\n <button type=\"button\" (click)=\"openData()\" class=\"a-btn a-btn--primary\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.readSearch' | i18n }}</span>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!(noData$ | async) && (noAggregationData$ | async)\">\n <div class=\"o-widget__choose-parameters\">\n <img\n class=\"no-result__search\"\n src=\"../../../assets/svgs/pry_recherche_pas_de_resultat.svg\"\n alt=\"{{ '@pry.widget.chart.aggNoResult' | i18n }}\"\n aria-hidden=\"true\"\n />\n <span class=\"no-result__text\">{{ '@pry.widget.chart.aggNoResult' | i18n }}</span>\n <button type=\"button\" (click)=\"openSettings()\" class=\"a-btn a-btn--primary\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.settings.title' | i18n }}</span>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!(noData$ | async) && !(noAggregationData$ | async) && !(isChartValid$ | async)\">\n <div class=\"o-widget__choose-parameters\">\n <img\n class=\"no-result__search\"\n src=\"../../../assets/svgs/pry_recherche_pas_de_resultat.svg\"\n alt=\"{{ '@pry.widget.chart.chooseParameters' | i18n }}\"\n aria-hidden=\"true\"\n />\n <span class=\"no-result__text\">{{ '@pry.widget.chart.chooseParameters' | i18n }}</span>\n <button type=\"button\" (click)=\"openSettings()\" class=\"a-btn a-btn--primary\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.settings.title' | i18n }}</span>\n </button>\n </div>\n </ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.SettingsComponent, selector: "pry-settings", inputs: ["widgetIndex", "isDisable", "headerPresent", "open$", "header"], outputs: ["triggerClick", "saveTriggered", "changeTitle"] }, { kind: "component", type: i2.PryWidgetHeaderComponent, selector: "pry-widget-header", inputs: ["manifest", "openData$", "additionalOptions", "headerOptions", "displayCount", "datasourceIds", "widgetIndex"], outputs: ["manifestModified"] }, { kind: "component", type: i2.PrySelectComponent, selector: "pry-select", inputs: ["items", "clearable", "multiple", "closeOnSelect", "placeholder", "isForm", "required", "name", "autocomplete", "alwaysShowAutosuggestedValues", "externalAutocompleteService", "bindValue", "bindLabel", "iconSize", "bindIcon", "template", "i18nPrefix", "bindClasses", "loading", "elementRef"], outputs: ["searched", "cleared", "clicked"] }, { kind: "component", type: i2.PryIconComponent, selector: "pry-icon", inputs: ["color", "iconSvg", "animation", "iconImage", "alt", "width", "height", "classes"] }, { kind: "component", type: i6.PryCheckboxComponent, selector: "pry-checkbox", inputs: ["circle", "name", "inputId", "inhibit"] }, { kind: "component", type: i2.PryEditInputComponent, selector: "pry-edit-input", inputs: ["label", "editButtonTooltip", "confirmButtonTooltip"], outputs: ["validated"] }, { kind: "component", type: i2.PryRangeComponent, selector: "pry-range", inputs: ["min", "max", "step", "disabled", "labelTranslate"] }, { kind: "component", type: i7.PryColorPickerComponent, selector: "pry-color-picker" }, { kind: "component", type: i3.PrySchemePickerComponent, selector: "pry-scheme-picker" }, { kind: "component", type: PryWidgetAggregatedChartCssComponent, selector: "pry-widget-aggregated-chart-css" }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.I18nPipe, name: "i18n" }, { kind: "pipe", type: i2.PrySortDataPipe, name: "prySortData" }] }); }
|
|
859
873
|
}
|
|
860
874
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.6", ngImport: i0, type: WidgetAggregatedChartComponent, decorators: [{
|
|
861
875
|
type: Component,
|
|
862
|
-
args: [{ selector: 'pry-widget-aggregated-chart', template: "<pry-widget-aggregated-chart-css></pry-widget-aggregated-chart-css>\n<div\n class=\"o-widget o-widget--chart\"\n *ngIf=\"optionsCopy$ | async as optionsCopy\"\n [class.-has-header]=\"displayHeader$ | async\"\n>\n <pry-widget-header\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [displayCount]=\"false\"\n [openData$]=\"openData$\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [open$]=\"open$\"\n [header]=\"header\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-edit-input\n label=\"@pry.widget.chart.title\"\n (ngModelChange)=\"changeChartTitle($event)\"\n [ngModel]=\"optionsCopy.graph.title\"\n ></pry-edit-input>\n </div>\n\n <div *ngIf=\"optionsCopy\" class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_type\">{{ '@pry.widget.chart.type' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeType($event)\"\n [items]=\"typeOptions\"\n [ngModel]=\"optionsCopy.graph.type\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"chart_type\"\n ></pry-select>\n </div>\n\n <ng-container *ngIf=\"optionsCopy.graph.type === GraphType.DONUT\">\n <pry-range\n [ngModel]=\"optionsCopy.graph.donutSize\"\n (ngModelChange)=\"changeDonutSize($event)\"\n labelTranslate=\"@pry.widget.chart.donutSize\"\n min=\"1\"\n max=\"500\"\n ></pry-range>\n </ng-container>\n\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleLegend($event)\" [ngModel]=\"!!optionsCopy.graph.legend\">\n {{ '@pry.widget.chart.legend' | i18n }}\n </pry-checkbox>\n </div>\n </div>\n\n <ng-container *ngIf=\"!!optionsCopy.graph.type\">\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"abscissa\">{{ '@pry.widget.chart.abscissa' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeAbscissa($event)\"\n [items]=\"abscissaAttributes$ | async | prySortData: sortActive : sortDirection\"\n [ngModel]=\"optionsCopy.abscissa.attribute\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"abscissa\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\">\n <pry-edit-input\n label=\"@pry.widget.chart.dataLabel\"\n (ngModelChange)=\"changeAbscissaLabel($event)\"\n [ngModel]=\"optionsCopy.abscissa.label\"\n ></pry-edit-input>\n </div>\n\n <div\n *ngIf=\"\n ['quantitative', 'temporal'].includes(translateToVegaType(copyAbscissaField?.type)) &&\n optionsCopy.graph.type !== GraphType.DONUT &&\n optionsCopy.graph.type !== GraphType.CIRCULAR\n \"\n class=\"m-form-label-field\"\n >\n <pry-checkbox (ngModelChange)=\"changeKeep0Abscissa($event)\" [ngModel]=\"optionsCopy.abscissa.keep0\"\n >{{ '@pry.widget.chart.origin' | i18n }}\n </pry-checkbox>\n\n <ng-container *ngIf=\"optionsCopy.graph.type === GraphType.HISTOGRAM\">\n <pry-checkbox\n (ngModelChange)=\"enableIntervals($event)\"\n [ngModel]=\"!!optionsCopy.abscissa.interval\"\n [disabled]=\"optionsCopy.graph.type === GraphType.HISTOGRAM\"\n >{{ '@pry.widget.chart.interval' | i18n }}\n </pry-checkbox>\n\n <ng-container *ngIf=\"!!optionsCopy.abscissa.interval\">\n <ng-container *ngIf=\"!isTimeInterval(optionsCopy.abscissa.interval); else timeInterval\">\n <pry-range\n [ngModel]=\"optionsCopy.abscissa.interval\"\n (ngModelChange)=\"changeInterval($event)\"\n labelTranslate=\"@pry.widget.chart.specifyInterval\"\n min=\"1\"\n max=\"10\"\n ></pry-range>\n </ng-container>\n\n <ng-template #timeInterval>\n <label class=\"a-label\" for=\"time_interval\">{{ '@pry.widget.chart.timeInterval' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeTimeInterval($event)\"\n [items]=\"['second', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year']\"\n [ngModel]=\"optionsCopy.abscissa.interval\"\n i18nPrefix=\"@pry.widget.chart.time.\"\n id=\"time_interval\"\n ></pry-select>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"operations\">{{ '@pry.widget.chart.operation.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeOperation($event)\"\n [items]=\"operations$ | async\"\n [ngModel]=\"optionsCopy.ordinate.operation\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"operations\"\n ></pry-select>\n </div>\n\n <ng-container *ngIf=\"optionsCopy.ordinate.operation !== Operation.COUNT\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"ordinate\">{{ '@pry.widget.chart.ordinate' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeOrdinate($event)\"\n [items]=\"ordinateAttributes$ | async | prySortData: sortActive : sortDirection\"\n [ngModel]=\"optionsCopy.ordinate.attribute\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"ordinate\"\n ></pry-select>\n </div>\n </ng-container>\n\n <div class=\"m-form-label-field\">\n <pry-edit-input\n label=\"@pry.widget.chart.dataLabel\"\n (ngModelChange)=\"changeOrdinateLabel($event)\"\n [ngModel]=\"optionsCopy.ordinate.label\"\n ></pry-edit-input>\n </div>\n\n <div *ngIf=\"translateToVegaType(copyOrdinateField?.type) === 'quantitative'\" class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"changeKeep0Ordinate($event)\" [ngModel]=\"optionsCopy.ordinate.keep0\"\n >{{ '@pry.widget.chart.origin' | i18n }}\n </pry-checkbox>\n </div>\n </div>\n\n <ng-container\n *ngIf=\"optionsCopy.graph.type !== GraphType.DONUT && optionsCopy.graph.type !== GraphType.CIRCULAR\"\n >\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleGroupBy($event)\" [ngModel]=\"!!optionsCopy.groupBy\"\n >{{ '@pry.widget.chart.groupBy' | i18n }}\n </pry-checkbox>\n </div>\n\n <ng-container *ngIf=\"!!optionsCopy.groupBy\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_seriesAttr\">{{ '@pry.widget.chart.groupAttr' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeGroupBy($event)\"\n [ngModel]=\"optionsCopy.groupBy.attribute\"\n [items]=\"abscissaAttributes$ | async | prySortData: sortActive : sortDirection\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"chart_seriesAttr\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\">\n <pry-scheme-picker\n (ngModelChange)=\"changeColorScheme($event)\"\n [ngModel]=\"optionsCopy.groupBy.color\"\n ></pry-scheme-picker>\n </div>\n\n <div class=\"m-form-label-field\">\n <pry-checkbox [ngModel]=\"optionsCopy.graph.stacked\" (ngModelChange)=\"toggleStacked($event)\">\n {{ '@pry.widget.chart.stacked' | i18n }}\n </pry-checkbox>\n </div>\n </ng-container>\n </div>\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-checkbox\n (ngModelChange)=\"toggleLimitItems($event)\"\n [ngModel]=\"optionsCopy.abscissa.limit !== undefined && optionsCopy.abscissa.limit !== null\"\n >\n {{ '@pry.widget.chart.limit' | i18n }}\n </pry-checkbox>\n </div>\n <ng-container *ngIf=\"optionsCopy.abscissa.limit !== undefined && optionsCopy.abscissa.limit !== null\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_limitItemsValue\">{{ '@pry.widget.chart.limitMaxNb' | i18n }}</label>\n <input\n type=\"number\"\n id=\"chart_limitItemsValue\"\n class=\"a-form-field\"\n [ngModel]=\"optionsCopy.abscissa.limit\"\n (ngModelChange)=\"changeLimitValue($event)\"\n min=\"1\"\n step=\"1\"\n [attr.aria-invalid]=\"optionsCopy.abscissa.limit < 1\"\n />\n </div>\n </ng-container>\n </div>\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleSort($event)\" [ngModel]=\"!!optionsCopy.graph.sort\"\n >{{ '@pry.widget.chart.sort.title' | i18n }}\n </pry-checkbox>\n </div>\n <ng-container *ngIf=\"!!optionsCopy.graph.sort\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_sortValue\">{{ '@pry.widget.chart.sort.attribute' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSortValue($event)\"\n [ngModel]=\"optionsCopy.graph.sort.value\"\n [items]=\"sortValues$ | async\"\n bindValue=\"value\"\n bindLabel=\"label\"\n id=\"chart_sortValue\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_sortDirection\">{{ '@pry.widget.chart.sort.direction' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSortDirection($event)\"\n [ngModel]=\"optionsCopy.graph.sort.direction\"\n [items]=\"sortDirections\"\n bindValue=\"value\"\n bindLabel=\"label\"\n id=\"chart_sortDirection\"\n ></pry-select>\n </div>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container\n *ngIf=\"optionsCopy.graph.type === GraphType.DONUT || optionsCopy.graph.type === GraphType.CIRCULAR\"\n >\n <pry-scheme-picker\n (ngModelChange)=\"changeCircleColorScheme($event)\"\n [ngModel]=\"optionsCopy.circleColorScheme\"\n ></pry-scheme-picker>\n </ng-container>\n\n <ng-container\n *ngIf=\"\n optionsCopy.graph.type !== GraphType.DONUT &&\n optionsCopy.graph.type !== GraphType.CIRCULAR &&\n !optionsCopy.groupBy\n \"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_baseColor\">{{ '@pry.widget.chart.color' | i18n }}</label>\n <pry-color-picker\n (ngModelChange)=\"changeBaseColor($event)\"\n [ngModel]=\"optionsCopy.baseColor\"\n id=\"chart_baseColor\"\n ></pry-color-picker>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"aligned-option\">\n <div class=\"a-chip -md\" [style.background-color]=\"item\">{{ item }}</div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </ng-container>\n </pry-settings>\n </pry-widget-header>\n\n <ng-container *ngIf=\"(isChartValid$ | async) && !(noData$ | async) && !(noAggregationData$ | async)\">\n <div #vega></div>\n </ng-container>\n\n <ng-container *ngIf=\"noData$ | async\">\n <div class=\"o-widget__choose-parameters\">\n <img\n class=\"no-result__search\"\n src=\"../../../assets/svgs/pry_recherche_pas_de_resultat.svg\"\n alt=\"{{ '@pry.widget.chart.noData' | i18n }}\"\n aria-hidden=\"true\"\n />\n <span class=\"no-result__text\">{{ '@pry.widget.chart.noData' | i18n }}</span>\n <button type=\"button\" (click)=\"openData()\" class=\"a-btn a-btn--primary\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.readSearch' | i18n }}</span>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!(noData$ | async) && (noAggregationData$ | async)\">\n <div class=\"o-widget__choose-parameters\">\n <img\n class=\"no-result__search\"\n src=\"../../../assets/svgs/pry_recherche_pas_de_resultat.svg\"\n alt=\"{{ '@pry.widget.chart.aggNoResult' | i18n }}\"\n aria-hidden=\"true\"\n />\n <span class=\"no-result__text\">{{ '@pry.widget.chart.aggNoResult' | i18n }}</span>\n <button type=\"button\" (click)=\"openSettings()\" class=\"a-btn a-btn--primary\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.settings.title' | i18n }}</span>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!(noData$ | async) && !(noAggregationData$ | async) && !(isChartValid$ | async)\">\n <div class=\"o-widget__choose-parameters\">\n <img\n class=\"no-result__search\"\n src=\"../../../assets/svgs/pry_recherche_pas_de_resultat.svg\"\n alt=\"{{ '@pry.widget.chart.chooseParameters' | i18n }}\"\n aria-hidden=\"true\"\n />\n <span class=\"no-result__text\">{{ '@pry.widget.chart.chooseParameters' | i18n }}</span>\n <button type=\"button\" (click)=\"openSettings()\" class=\"a-btn a-btn--primary\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.settings.title' | i18n }}</span>\n </button>\n </div>\n </ng-container>\n</div>\n" }]
|
|
876
|
+
args: [{ selector: 'pry-widget-aggregated-chart', template: "<pry-widget-aggregated-chart-css></pry-widget-aggregated-chart-css>\n<div\n class=\"o-widget o-widget--chart\"\n *ngIf=\"optionsCopy$ | async as optionsCopy\"\n [class.-has-header]=\"displayHeader$ | async\"\n>\n <pry-widget-header\n [datasourceIds]=\"(datasourceIds$ | async) ?? []\"\n *ngIf=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [manifest]=\"manifest\"\n (manifestModified)=\"manifestModified.emit($event)\"\n #header\n [headerOptions]=\"(displayHeader$ | async) ?? {}\"\n [displayCount]=\"false\"\n [openData$]=\"openData$\"\n >\n <pry-settings\n (saveTriggered)=\"emitManifest()\"\n (changeTitle)=\"changeWidgetTitle($event)\"\n [headerPresent]=\"displayHeader$ | async\"\n [widgetIndex]=\"widgetIndex\"\n [open$]=\"open$\"\n [header]=\"header\"\n class=\"o-settings\"\n >\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-edit-input\n label=\"@pry.widget.chart.title\"\n (ngModelChange)=\"changeChartTitle($event)\"\n [ngModel]=\"optionsCopy.graph.title\"\n ></pry-edit-input>\n </div>\n\n <div *ngIf=\"optionsCopy\" class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_type\">{{ '@pry.widget.chart.type' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeType($event)\"\n [items]=\"typeOptions\"\n [ngModel]=\"optionsCopy.graph.type\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"chart_type\"\n ></pry-select>\n </div>\n\n <ng-container *ngIf=\"optionsCopy.graph.type === GraphType.DONUT\">\n <pry-range\n [ngModel]=\"optionsCopy.graph.donutSize\"\n (ngModelChange)=\"changeDonutSize($event)\"\n labelTranslate=\"@pry.widget.chart.donutSize\"\n min=\"1\"\n max=\"500\"\n ></pry-range>\n </ng-container>\n\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleLegend($event)\" [ngModel]=\"!!optionsCopy.graph.legend\">\n {{ '@pry.widget.chart.legend' | i18n }}\n </pry-checkbox>\n </div>\n </div>\n\n <ng-container *ngIf=\"!!optionsCopy.graph.type\">\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"abscissa\">{{ '@pry.widget.chart.abscissa' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeAbscissa($event)\"\n [items]=\"abscissaAttributes$ | async | prySortData: sortActive : sortDirection\"\n [ngModel]=\"optionsCopy.abscissa.attribute\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"abscissa\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\">\n <pry-edit-input\n label=\"@pry.widget.chart.dataLabel\"\n (ngModelChange)=\"changeAbscissaLabel($event)\"\n [ngModel]=\"optionsCopy.abscissa.label\"\n ></pry-edit-input>\n </div>\n\n <div\n *ngIf=\"\n ['quantitative', 'temporal'].includes(\n (attributeTypes$ | async)?.abscissa?.vegaType?.toString() ?? '--'\n ) &&\n optionsCopy.graph.type !== GraphType.DONUT &&\n optionsCopy.graph.type !== GraphType.CIRCULAR\n \"\n class=\"m-form-label-field\"\n >\n <pry-checkbox (ngModelChange)=\"changeKeep0Abscissa($event)\" [ngModel]=\"optionsCopy.abscissa.keep0\"\n >{{ '@pry.widget.chart.origin' | i18n }}\n </pry-checkbox>\n\n <ng-container *ngIf=\"optionsCopy.graph.type === GraphType.HISTOGRAM\">\n <pry-checkbox\n (ngModelChange)=\"enableIntervals($event)\"\n [ngModel]=\"!!optionsCopy.abscissa.interval\"\n [disabled]=\"optionsCopy.graph.type === GraphType.HISTOGRAM\"\n >{{ '@pry.widget.chart.interval' | i18n }}\n </pry-checkbox>\n\n <ng-container *ngIf=\"!!optionsCopy.abscissa.interval\">\n <ng-container *ngIf=\"!isTimeInterval(optionsCopy.abscissa.interval); else timeInterval\">\n <pry-range\n [ngModel]=\"optionsCopy.abscissa.interval\"\n (ngModelChange)=\"changeInterval($event)\"\n labelTranslate=\"@pry.widget.chart.specifyInterval\"\n min=\"1\"\n max=\"10\"\n ></pry-range>\n </ng-container>\n\n <ng-template #timeInterval>\n <label class=\"a-label\" for=\"time_interval\">{{ '@pry.widget.chart.timeInterval' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeTimeInterval($event)\"\n [items]=\"['second', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year']\"\n [ngModel]=\"optionsCopy.abscissa.interval\"\n i18nPrefix=\"@pry.widget.chart.time.\"\n id=\"time_interval\"\n ></pry-select>\n </ng-template>\n </ng-container>\n </ng-container>\n </div>\n </div>\n\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"operations\">{{ '@pry.widget.chart.operation.title' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeOperation($event)\"\n [items]=\"operations$ | async\"\n [ngModel]=\"optionsCopy.ordinate.operation\"\n bindLabel=\"label\"\n bindValue=\"id\"\n id=\"operations\"\n ></pry-select>\n </div>\n\n <ng-container *ngIf=\"optionsCopy.ordinate.operation !== Operation.COUNT\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"ordinate\">{{ '@pry.widget.chart.ordinate' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeOrdinate($event)\"\n [items]=\"ordinateAttributes$ | async | prySortData: sortActive : sortDirection\"\n [ngModel]=\"optionsCopy.ordinate.attribute\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"ordinate\"\n ></pry-select>\n </div>\n </ng-container>\n\n <div class=\"m-form-label-field\">\n <pry-edit-input\n label=\"@pry.widget.chart.dataLabel\"\n (ngModelChange)=\"changeOrdinateLabel($event)\"\n [ngModel]=\"optionsCopy.ordinate.label\"\n ></pry-edit-input>\n </div>\n\n <div *ngIf=\"translateToVegaType(copyOrdinateField?.type) === 'quantitative'\" class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"changeKeep0Ordinate($event)\" [ngModel]=\"optionsCopy.ordinate.keep0\"\n >{{ '@pry.widget.chart.origin' | i18n }}\n </pry-checkbox>\n </div>\n </div>\n\n <ng-container\n *ngIf=\"optionsCopy.graph.type !== GraphType.DONUT && optionsCopy.graph.type !== GraphType.CIRCULAR\"\n >\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleGroupBy($event)\" [ngModel]=\"!!optionsCopy.groupBy\"\n >{{ '@pry.widget.chart.groupBy' | i18n }}\n </pry-checkbox>\n </div>\n\n <ng-container *ngIf=\"!!optionsCopy.groupBy\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_seriesAttr\">{{ '@pry.widget.chart.groupAttr' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeGroupBy($event)\"\n [ngModel]=\"optionsCopy.groupBy.attribute\"\n [items]=\"abscissaAttributes$ | async | prySortData: sortActive : sortDirection\"\n bindLabel=\"name\"\n bindValue=\"id\"\n id=\"chart_seriesAttr\"\n ></pry-select>\n </div>\n\n <div class=\"m-form-label-field\">\n <pry-scheme-picker\n (ngModelChange)=\"changeColorScheme($event)\"\n [ngModel]=\"optionsCopy.groupBy.color\"\n ></pry-scheme-picker>\n </div>\n\n <div class=\"m-form-label-field\">\n <pry-checkbox [ngModel]=\"optionsCopy.graph.stacked\" (ngModelChange)=\"toggleStacked($event)\">\n {{ '@pry.widget.chart.stacked' | i18n }}\n </pry-checkbox>\n </div>\n </ng-container>\n </div>\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-checkbox\n (ngModelChange)=\"toggleLimitItems($event)\"\n [ngModel]=\"optionsCopy.abscissa.limit !== undefined && optionsCopy.abscissa.limit !== null\"\n >\n {{ '@pry.widget.chart.limit' | i18n }}\n </pry-checkbox>\n </div>\n <ng-container *ngIf=\"optionsCopy.abscissa.limit !== undefined && optionsCopy.abscissa.limit !== null\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_limitItemsValue\">{{ '@pry.widget.chart.limitMaxNb' | i18n }}</label>\n <input\n type=\"number\"\n id=\"chart_limitItemsValue\"\n class=\"a-form-field\"\n [ngModel]=\"optionsCopy.abscissa.limit\"\n (ngModelChange)=\"changeLimitValue($event)\"\n min=\"1\"\n step=\"1\"\n [attr.aria-invalid]=\"optionsCopy.abscissa.limit < 1\"\n />\n </div>\n </ng-container>\n </div>\n <div class=\"o-settings__popup__content__fields -condensed\">\n <div class=\"m-form-label-field\">\n <pry-checkbox (ngModelChange)=\"toggleSort($event)\" [ngModel]=\"!!optionsCopy.graph.sort\"\n >{{ '@pry.widget.chart.sort.title' | i18n }}\n </pry-checkbox>\n </div>\n <ng-container *ngIf=\"!!optionsCopy.graph.sort\">\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_sortValue\">{{ '@pry.widget.chart.sort.attribute' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSortValue($event)\"\n [ngModel]=\"optionsCopy.graph.sort.value\"\n [items]=\"sortValues$ | async\"\n bindValue=\"value\"\n bindLabel=\"label\"\n id=\"chart_sortValue\"\n ></pry-select>\n </div>\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_sortDirection\">{{ '@pry.widget.chart.sort.direction' | i18n }}</label>\n <pry-select\n (ngModelChange)=\"changeSortDirection($event)\"\n [ngModel]=\"optionsCopy.graph.sort.direction\"\n [items]=\"sortDirections\"\n bindValue=\"value\"\n bindLabel=\"label\"\n id=\"chart_sortDirection\"\n ></pry-select>\n </div>\n </ng-container>\n </div>\n </ng-container>\n\n <ng-container\n *ngIf=\"optionsCopy.graph.type === GraphType.DONUT || optionsCopy.graph.type === GraphType.CIRCULAR\"\n >\n <pry-scheme-picker\n (ngModelChange)=\"changeCircleColorScheme($event)\"\n [ngModel]=\"optionsCopy.circleColorScheme\"\n ></pry-scheme-picker>\n </ng-container>\n\n <ng-container\n *ngIf=\"\n optionsCopy.graph.type !== GraphType.DONUT &&\n optionsCopy.graph.type !== GraphType.CIRCULAR &&\n !optionsCopy.groupBy\n \"\n >\n <div class=\"m-form-label-field\">\n <label class=\"a-label\" for=\"chart_baseColor\">{{ '@pry.widget.chart.color' | i18n }}</label>\n <pry-color-picker\n (ngModelChange)=\"changeBaseColor($event)\"\n [ngModel]=\"optionsCopy.baseColor\"\n id=\"chart_baseColor\"\n ></pry-color-picker>\n <ng-template #templateOption let-item=\"item\">\n <div class=\"aligned-option\">\n <div class=\"a-chip -md\" [style.background-color]=\"item\">{{ item }}</div>\n </div>\n </ng-template>\n </div>\n </ng-container>\n </ng-container>\n </pry-settings>\n </pry-widget-header>\n\n <ng-container *ngIf=\"(isChartValid$ | async) && !(noData$ | async) && !(noAggregationData$ | async)\">\n <div #vega></div>\n </ng-container>\n\n <ng-container *ngIf=\"noData$ | async\">\n <div class=\"o-widget__choose-parameters\">\n <img\n class=\"no-result__search\"\n src=\"../../../assets/svgs/pry_recherche_pas_de_resultat.svg\"\n alt=\"{{ '@pry.widget.chart.noData' | i18n }}\"\n aria-hidden=\"true\"\n />\n <span class=\"no-result__text\">{{ '@pry.widget.chart.noData' | i18n }}</span>\n <button type=\"button\" (click)=\"openData()\" class=\"a-btn a-btn--primary\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.tooltip.readSearch' | i18n }}</span>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!(noData$ | async) && (noAggregationData$ | async)\">\n <div class=\"o-widget__choose-parameters\">\n <img\n class=\"no-result__search\"\n src=\"../../../assets/svgs/pry_recherche_pas_de_resultat.svg\"\n alt=\"{{ '@pry.widget.chart.aggNoResult' | i18n }}\"\n aria-hidden=\"true\"\n />\n <span class=\"no-result__text\">{{ '@pry.widget.chart.aggNoResult' | i18n }}</span>\n <button type=\"button\" (click)=\"openSettings()\" class=\"a-btn a-btn--primary\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.settings.title' | i18n }}</span>\n </button>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!(noData$ | async) && !(noAggregationData$ | async) && !(isChartValid$ | async)\">\n <div class=\"o-widget__choose-parameters\">\n <img\n class=\"no-result__search\"\n src=\"../../../assets/svgs/pry_recherche_pas_de_resultat.svg\"\n alt=\"{{ '@pry.widget.chart.chooseParameters' | i18n }}\"\n aria-hidden=\"true\"\n />\n <span class=\"no-result__text\">{{ '@pry.widget.chart.chooseParameters' | i18n }}</span>\n <button type=\"button\" (click)=\"openSettings()\" class=\"a-btn a-btn--primary\">\n <pry-icon [height]=\"20\" [width]=\"20\" iconSvg=\"control\"></pry-icon>\n <span>{{ '@pry.widget.settings.title' | i18n }}</span>\n </button>\n </div>\n </ng-container>\n</div>\n" }]
|
|
863
877
|
}], ctorParameters: () => [{ type: i1.Store }, { type: i2.PryI18nService }, { type: i0.ElementRef }, { type: i2.PryAggregationService }, { type: i3.PrySchemeService }], propDecorators: { vega: [{
|
|
864
878
|
type: ViewChild,
|
|
865
879
|
args: ['vega']
|
|
@@ -893,7 +907,16 @@ const enTranslations = {
|
|
|
893
907
|
DAY_MONTH: '%d-%m',
|
|
894
908
|
YEAR: '%Y',
|
|
895
909
|
MONTH: '%m',
|
|
896
|
-
DAY: '%d'
|
|
910
|
+
DAY: '%d',
|
|
911
|
+
interval: {
|
|
912
|
+
default: '%Y-%m-%dT%H:%M:%S',
|
|
913
|
+
second: '%Y-%m-%dT%H:%M:%S',
|
|
914
|
+
minute: '%Y-%m-%dT%H:%M',
|
|
915
|
+
hour: '%Y-%m-%dT%H:00',
|
|
916
|
+
day: '%Y-%m-%d',
|
|
917
|
+
month: '%Y-%m',
|
|
918
|
+
year: '%Y'
|
|
919
|
+
}
|
|
897
920
|
},
|
|
898
921
|
operation: {
|
|
899
922
|
none: 'Attribute value',
|
|
@@ -1030,13 +1053,22 @@ const frTranslations = {
|
|
|
1030
1053
|
},
|
|
1031
1054
|
specializedLocale: {
|
|
1032
1055
|
default: '%Y-%m-%dT%H:%M:%S',
|
|
1033
|
-
DATETIME: '%Y
|
|
1056
|
+
DATETIME: '%Y/%m/%d %H:%M:%S',
|
|
1034
1057
|
DATE: '%d/%m/%Y',
|
|
1035
1058
|
MONTH_YEAR: '%m/%Y',
|
|
1036
1059
|
DAY_MONTH: '%d/%m',
|
|
1037
1060
|
YEAR: '%Y',
|
|
1038
1061
|
MONTH: '%m',
|
|
1039
|
-
DAY: '%d'
|
|
1062
|
+
DAY: '%d',
|
|
1063
|
+
interval: {
|
|
1064
|
+
default: '%Y-%m-%dT%H:%M:%S',
|
|
1065
|
+
second: '%Y/%m/%d %H:%M:%S',
|
|
1066
|
+
minute: '%Y/%m/%d %H:%M',
|
|
1067
|
+
hour: '%Y/%m/%d %H:00',
|
|
1068
|
+
day: '%Y-%m-%d',
|
|
1069
|
+
month: '%Y-%m',
|
|
1070
|
+
year: '%Y'
|
|
1071
|
+
}
|
|
1040
1072
|
},
|
|
1041
1073
|
operation: {
|
|
1042
1074
|
none: "Valeur de l'attribut",
|