@hestia-earth/ui-components 0.41.49 → 0.41.50
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/package.json
CHANGED
package/styles.scss
CHANGED
|
@@ -433,6 +433,7 @@ declare class ChartTooltipComponent<T> {
|
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
interface ContributionChartDataItem {
|
|
436
|
+
id?: string;
|
|
436
437
|
label: string;
|
|
437
438
|
values: number[];
|
|
438
439
|
color?: string;
|
|
@@ -447,8 +448,11 @@ interface ContributionTooltipData {
|
|
|
447
448
|
value: number;
|
|
448
449
|
})[];
|
|
449
450
|
selectedLabel?: string;
|
|
451
|
+
maxLabelLength: number;
|
|
450
452
|
}
|
|
451
453
|
declare class ContributionChartComponent {
|
|
454
|
+
private readonly emissionCategoryService;
|
|
455
|
+
private readonly responsiveService;
|
|
452
456
|
protected readonly tooltipFn: chartTooltipContentFn<ContributionTooltipData>;
|
|
453
457
|
/**
|
|
454
458
|
* Contribution data.
|
|
@@ -466,24 +470,46 @@ declare class ContributionChartComponent {
|
|
|
466
470
|
* Show default button for export, located on the top-right corner of the chart.
|
|
467
471
|
*/
|
|
468
472
|
protected readonly showExportButton: _angular_core.InputSignal<boolean>;
|
|
473
|
+
/**
|
|
474
|
+
* Show the legend below the chart.
|
|
475
|
+
*/
|
|
476
|
+
protected readonly showLegend: _angular_core.InputSignal<boolean>;
|
|
469
477
|
readonly config: _angular_core.InputSignal<Partial<ChartConfiguration<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint)[], unknown>>>;
|
|
470
478
|
protected readonly minHeight: _angular_core.InputSignal<number>;
|
|
471
479
|
protected readonly maxHeight: _angular_core.InputSignal<number>;
|
|
480
|
+
/**
|
|
481
|
+
* Category to group the data by.
|
|
482
|
+
*/
|
|
483
|
+
readonly category: _angular_core.InputSignal<string>;
|
|
472
484
|
private readonly chart;
|
|
473
485
|
private readonly tooltip;
|
|
474
486
|
readonly exporting: _angular_core.Signal<boolean>;
|
|
475
487
|
protected readonly height: _angular_core.Signal<number>;
|
|
476
488
|
private readonly hasNegativeContributions;
|
|
489
|
+
protected readonly displayData: _angular_core.Signal<ContributionChartDataItem[] | {
|
|
490
|
+
label: string;
|
|
491
|
+
values: number[];
|
|
492
|
+
color: string;
|
|
493
|
+
includedItems: {
|
|
494
|
+
color: string;
|
|
495
|
+
id?: string;
|
|
496
|
+
label: string;
|
|
497
|
+
values: number[];
|
|
498
|
+
backgroundColor?: string;
|
|
499
|
+
borderColor?: string;
|
|
500
|
+
includedItems?: ContributionChartDataItem[];
|
|
501
|
+
}[];
|
|
502
|
+
}[]>;
|
|
477
503
|
private readonly defaultConfig;
|
|
478
|
-
|
|
504
|
+
readonly dataConfig: _angular_core.Signal<{
|
|
479
505
|
datasets: {
|
|
480
|
-
label:
|
|
481
|
-
data:
|
|
482
|
-
backgroundColor:
|
|
483
|
-
borderColor:
|
|
506
|
+
label: any;
|
|
507
|
+
data: any;
|
|
508
|
+
backgroundColor: any;
|
|
509
|
+
borderColor: any;
|
|
484
510
|
barThickness: number;
|
|
485
511
|
maxBarThickness: number;
|
|
486
|
-
includedItems:
|
|
512
|
+
includedItems: any;
|
|
487
513
|
}[];
|
|
488
514
|
labels: string[];
|
|
489
515
|
}>;
|
|
@@ -546,6 +572,7 @@ declare class ContributionChartComponent {
|
|
|
546
572
|
onClick: (event: ChartEvent, activeElements: ActiveElement[], chart: Chart<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint)[], unknown>) => void;
|
|
547
573
|
scales: {
|
|
548
574
|
x: {
|
|
575
|
+
display: boolean;
|
|
549
576
|
afterDataLimits: (scale: chart_js.Scale<chart_js.CoreScaleOptions>) => void;
|
|
550
577
|
title: {
|
|
551
578
|
display: boolean;
|
|
@@ -555,6 +582,9 @@ declare class ContributionChartComponent {
|
|
|
555
582
|
lineWidth: (context: chart_js.ScriptableScaleContext) => 0 | 1;
|
|
556
583
|
};
|
|
557
584
|
};
|
|
585
|
+
y: {
|
|
586
|
+
display: boolean;
|
|
587
|
+
};
|
|
558
588
|
};
|
|
559
589
|
};
|
|
560
590
|
plugins: {
|
|
@@ -567,12 +597,12 @@ declare class ContributionChartComponent {
|
|
|
567
597
|
}[];
|
|
568
598
|
} & Partial<ChartConfiguration<keyof chart_js.ChartTypeRegistry, (number | [number, number] | chart_js.Point | chart_js.BubbleDataPoint)[], unknown>>>;
|
|
569
599
|
private readonly csvContent;
|
|
570
|
-
|
|
600
|
+
onItemClick(event: ChartEvent, activeElements: ActiveElement[], chart: Chart): void;
|
|
571
601
|
exportAsSvg(config?: Partial<ChartExportMetadata>): Promise<void>;
|
|
572
602
|
exportAsPng(): void;
|
|
573
603
|
exportAsCsv(title: string): void;
|
|
574
604
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ContributionChartComponent, never>;
|
|
575
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ContributionChartComponent, "he-contribution-chart", ["contributionChart"], { "data": { "alias": "data"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "showExportButton": { "alias": "showExportButton"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
605
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ContributionChartComponent, "he-contribution-chart", ["contributionChart"], { "data": { "alias": "data"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "showExportButton": { "alias": "showExportButton"; "required": false; "isSignal": true; }; "showLegend": { "alias": "showLegend"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "minHeight": { "alias": "minHeight"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "category": { "alias": "category"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
576
606
|
}
|
|
577
607
|
|
|
578
608
|
interface HistogramChartDataItem {
|
|
@@ -4165,6 +4195,7 @@ declare class ImpactAssessmentsIndicatorsChartComponent {
|
|
|
4165
4195
|
private readonly groupedValues;
|
|
4166
4196
|
private readonly contributionData;
|
|
4167
4197
|
protected readonly chartData: _angular_core.Signal<{
|
|
4198
|
+
id: any;
|
|
4168
4199
|
label: string;
|
|
4169
4200
|
values: number[];
|
|
4170
4201
|
color: string;
|