Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions frontend/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ import { WorkPackageFullCreateEntryComponent } from 'core-app/features/work-pack
import { WorkPackageFullViewEntryComponent } from 'core-app/features/work-packages/routing/wp-full-view/wp-full-view-entry.component';
import { MyPageComponent } from './features/my-page/my-page.component';
import { DashboardComponent } from './features/overview/dashboard.component';
import { BudgetOverviewGraphComponent } from './shared/components/budget-graphs/overview/budget-overview-graph.component';

export function initializeServices(injector:Injector) {
return () => {
Expand Down Expand Up @@ -423,5 +424,7 @@ export class OpenProjectModule implements DoBootstrap {

registerCustomElement('opce-my-page', MyPageComponent, { injector });
registerCustomElement('opce-dashboard', DashboardComponent, { injector });

registerCustomElement('opce-budget-overview-graph', BudgetOverviewGraphComponent, { injector });
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.op-budget-embedded-graph
&.work-packages-embedded-view--container
height: 100%
max-height: 500px
position: relative
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
import { Component, Input, SimpleChanges, OnChanges } from '@angular/core';
import { WorkPackageTableConfiguration } from 'core-app/features/work-packages/components/wp-table/wp-table-configuration';
import { ChartOptions } from 'chart.js';
import { I18nService } from 'core-app/core/i18n/i18n.service';
import { GroupObject } from 'core-app/features/hal/resources/wp-collection-resource';
import { CommonModule } from '@angular/common';
import { BaseChartDirective, provideCharts, withDefaultRegisterables } from 'ng2-charts';
import ChartDataLabels from 'chartjs-plugin-datalabels';
import PrimerColorsPlugin from '../plugin.primer-colors';

export interface BudgetEmbeddedGraphDataset {
label:string;
queryProps:any;

Check failure on line 13 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L13 <@typescript-eslint/no-explicit-any>(https://typescript-eslint.io/rules/no-explicit-any)

Unexpected any. Specify a different type.
Raw output
{"ruleId":"@typescript-eslint/no-explicit-any","severity":2,"message":"Unexpected any. Specify a different type.","line":13,"column":14,"nodeType":"TSAnyKeyword","messageId":"unexpectedAny","endLine":13,"endColumn":17,"suggestions":[{"messageId":"suggestUnknown","fix":{"range":[719,722],"text":"unknown"},"desc":"Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct."},{"messageId":"suggestNever","fix":{"range":[719,722],"text":"never"},"desc":"Use `never` instead, this is useful when instantiating generic type parameters that you don't need to know the type of."}]}
queryId?:number|string;
groups?:GroupObject[];
}
interface ChartDataSet {
label:string;
data:number[];
}

@Component({
selector: 'op-budget-embedded-graph',
templateUrl: './budget-embedded-graph.html',
styleUrls: ['./budget-embedded-graph.component.sass'],
standalone: true,
imports: [
CommonModule,
BaseChartDirective
],
providers: [
provideCharts(withDefaultRegisterables(ChartDataLabels, PrimerColorsPlugin)),
]
})

Check failure on line 34 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L22-L34 <@angular-eslint/prefer-on-push-component-change-detection>(https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-on-push-component-change-detection.md)

The component's `changeDetection` value should be set to `ChangeDetectionStrategy.OnPush`
Raw output
{"ruleId":"@angular-eslint/prefer-on-push-component-change-detection","severity":2,"message":"The component's `changeDetection` value should be set to `ChangeDetectionStrategy.OnPush`","line":22,"column":1,"nodeType":"Decorator","messageId":"preferOnPushComponentChangeDetection","endLine":34,"endColumn":3,"suggestions":[{"messageId":"suggestAddChangeDetectionOnPush","fix":{"range":[51,853],"text":", ChangeDetectionStrategy } from '@angular/core';\nimport { WorkPackageTableConfiguration } from 'core-app/features/work-packages/components/wp-table/wp-table-configuration';\nimport { ChartOptions } from 'chart.js';\nimport { I18nService } from 'core-app/core/i18n/i18n.service';\nimport { GroupObject } from 'core-app/features/hal/resources/wp-collection-resource';\nimport { CommonModule } from '@angular/common';\nimport { BaseChartDirective, provideCharts, withDefaultRegisterables } from 'ng2-charts';\nimport ChartDataLabels from 'chartjs-plugin-datalabels';\nimport PrimerColorsPlugin from '../plugin.primer-colors';\n\nexport interface BudgetEmbeddedGraphDataset {\n  label:string;\n  queryProps:any;\n  queryId?:number|string;\n  groups?:GroupObject[];\n}\ninterface ChartDataSet {\n  label:string;\n  data:number[];\n}\n\n@Component({\n  changeDetection: ChangeDetectionStrategy.OnPush,"},"desc":"Add `ChangeDetectionStrategy.OnPush`"}]}
export class BudgetEmbeddedGraphComponent implements OnChanges {
@Input() public datasets:BudgetEmbeddedGraphDataset[];

@Input() public chartOptions:ChartOptions;

@Input() chartType = 'bar';

public configuration:WorkPackageTableConfiguration;

public error:string|null = null;

public chartHeight = '100%';

public chartLabels:string[] = [];

public chartData:ChartDataSet[] = [];

public internalChartOptions:ChartOptions;

public initialized = false;

public text = {
noResults: this.i18n.t('js.work_packages.no_results.title'),
};

constructor(readonly i18n:I18nService) {}

Check failure on line 60 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L60 <@angular-eslint/prefer-inject>(https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-inject.md)

Prefer using the inject() function over constructor parameter injection. Use Angular's migration schematic to automatically refactor: ng generate @angular/core:inject
Raw output
{"ruleId":"@angular-eslint/prefer-inject","severity":2,"message":"Prefer using the inject() function over constructor parameter injection. Use Angular's migration schematic to automatically refactor: ng generate @angular/core:inject","line":60,"column":15,"nodeType":"TSParameterProperty","messageId":"preferInject","endLine":60,"endColumn":40}

ngOnChanges(changes:SimpleChanges) {
if (changes.datasets) {
this.setChartOptions();
this.updateChartData();

if (!changes.datasets.firstChange) {
this.initialized = true;
}
} else if (changes.chartType) {
this.setChartOptions();
}
}

private updateChartData() {
let uniqLabels = _.uniq(this.datasets.reduce((array, dataset) => {
const groups = (dataset.groups || []).map((group) => group.value) as any;

Check failure on line 77 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L77 <@typescript-eslint/no-unsafe-assignment>(https://typescript-eslint.io/rules/no-unsafe-assignment)

Unsafe assignment of an `any` value.
Raw output
{"ruleId":"@typescript-eslint/no-unsafe-assignment","severity":2,"message":"Unsafe assignment of an `any` value.","line":77,"column":13,"nodeType":"VariableDeclarator","messageId":"anyAssignment","endLine":77,"endColumn":79}

Check failure on line 77 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L77 <@typescript-eslint/prefer-nullish-coalescing>(https://typescript-eslint.io/rules/prefer-nullish-coalescing)

Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.
Raw output
{"ruleId":"@typescript-eslint/prefer-nullish-coalescing","severity":2,"message":"Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.","line":77,"column":38,"nodeType":"Punctuator","messageId":"preferNullishOverOr","endLine":77,"endColumn":40,"suggestions":[{"messageId":"suggestNullish","data":{"equals":""},"fix":{"range":[2216,2218],"text":"??"},"desc":"Fix to nullish coalescing operator (`??`)."}]}

Check failure on line 77 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L77 <@typescript-eslint/no-unsafe-return>(https://typescript-eslint.io/rules/no-unsafe-return)

Unsafe return of a value of type `any`.
Raw output
{"ruleId":"@typescript-eslint/no-unsafe-return","severity":2,"message":"Unsafe return of a value of type `any`.","line":77,"column":60,"nodeType":"MemberExpression","messageId":"unsafeReturn","endLine":77,"endColumn":71}

Check failure on line 77 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L77 <@typescript-eslint/no-explicit-any>(https://typescript-eslint.io/rules/no-explicit-any)

Unexpected any. Specify a different type.
Raw output
{"ruleId":"@typescript-eslint/no-explicit-any","severity":2,"message":"Unexpected any. Specify a different type.","line":77,"column":76,"nodeType":"TSAnyKeyword","messageId":"unexpectedAny","endLine":77,"endColumn":79,"suggestions":[{"messageId":"suggestUnknown","fix":{"range":[2254,2257],"text":"unknown"},"desc":"Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct."},{"messageId":"suggestNever","fix":{"range":[2254,2257],"text":"never"},"desc":"Use `never` instead, this is useful when instantiating generic type parameters that you don't need to know the type of."}]}
return array.concat(groups);

Check failure on line 78 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L78 <@typescript-eslint/no-unsafe-argument>(https://typescript-eslint.io/rules/no-unsafe-argument)

Unsafe argument of type `any` assigned to a parameter of type `ConcatArray<never>`.
Raw output
{"ruleId":"@typescript-eslint/no-unsafe-argument","severity":2,"message":"Unsafe argument of type `any` assigned to a parameter of type `ConcatArray<never>`.","line":78,"column":27,"nodeType":"Identifier","messageId":"unsafeArgument","endLine":78,"endColumn":33}
}, [])) as string[];

const labelCountMaps = this.datasets.map((dataset) => {
const countMap = (dataset.groups || []).reduce<any>((hash, group) => ({

Check failure on line 82 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L82 <@typescript-eslint/prefer-nullish-coalescing>(https://typescript-eslint.io/rules/prefer-nullish-coalescing)

Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.
Raw output
{"ruleId":"@typescript-eslint/prefer-nullish-coalescing","severity":2,"message":"Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.","line":82,"column":40,"nodeType":"Punctuator","messageId":"preferNullishOverOr","endLine":82,"endColumn":42,"suggestions":[{"messageId":"suggestNullish","data":{"equals":""},"fix":{"range":[2419,2421],"text":"??"},"desc":"Fix to nullish coalescing operator (`??`)."}]}

Check failure on line 82 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L82 <@typescript-eslint/no-explicit-any>(https://typescript-eslint.io/rules/no-explicit-any)

Unexpected any. Specify a different type.
Raw output
{"ruleId":"@typescript-eslint/no-explicit-any","severity":2,"message":"Unexpected any. Specify a different type.","line":82,"column":54,"nodeType":"TSAnyKeyword","messageId":"unexpectedAny","endLine":82,"endColumn":57,"suggestions":[{"messageId":"suggestUnknown","fix":{"range":[2433,2436],"text":"unknown"},"desc":"Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct."},{"messageId":"suggestNever","fix":{"range":[2433,2436],"text":"never"},"desc":"Use `never` instead, this is useful when instantiating generic type parameters that you don't need to know the type of."}]}
...hash,
[group.value]: group.count,
}), {});

Check failure on line 85 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L82-L85 <@typescript-eslint/no-unsafe-assignment>(https://typescript-eslint.io/rules/no-unsafe-assignment)

Unsafe assignment of an `any` value.
Raw output
{"ruleId":"@typescript-eslint/no-unsafe-assignment","severity":2,"message":"Unsafe assignment of an `any` value.","line":82,"column":13,"nodeType":"VariableDeclarator","messageId":"anyAssignment","endLine":85,"endColumn":14}

Check failure on line 85 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L82-L85 <@typescript-eslint/no-unsafe-return>(https://typescript-eslint.io/rules/no-unsafe-return)

Unsafe return of a value of type `any`.
Raw output
{"ruleId":"@typescript-eslint/no-unsafe-return","severity":2,"message":"Unsafe return of a value of type `any`.","line":82,"column":77,"nodeType":"ObjectExpression","messageId":"unsafeReturn","endLine":85,"endColumn":8}

return {
label: dataset.label,
data: uniqLabels.map((label) => countMap[label] || 0),

Check failure on line 89 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L89 <@typescript-eslint/no-unsafe-return>(https://typescript-eslint.io/rules/no-unsafe-return)

Unsafe return of a value of type `any`.
Raw output
{"ruleId":"@typescript-eslint/no-unsafe-return","severity":2,"message":"Unsafe return of a value of type `any`.","line":89,"column":41,"nodeType":"LogicalExpression","messageId":"unsafeReturn","endLine":89,"endColumn":61}

Check failure on line 89 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L89 <@typescript-eslint/no-unsafe-member-access>(https://typescript-eslint.io/rules/no-unsafe-member-access)

Unsafe member access [label] on an `any` value.
Raw output
{"ruleId":"@typescript-eslint/no-unsafe-member-access","severity":2,"message":"Unsafe member access [label] on an `any` value.","line":89,"column":50,"nodeType":"Identifier","messageId":"unsafeMemberExpression","endLine":89,"endColumn":55}

Check failure on line 89 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L89 <@typescript-eslint/prefer-nullish-coalescing>(https://typescript-eslint.io/rules/prefer-nullish-coalescing)

Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.
Raw output
{"ruleId":"@typescript-eslint/prefer-nullish-coalescing","severity":2,"message":"Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.","line":89,"column":57,"nodeType":"Punctuator","messageId":"preferNullishOverOr","endLine":89,"endColumn":59,"suggestions":[{"messageId":"suggestNullish","data":{"equals":""},"fix":{"range":[2628,2630],"text":"??"},"desc":"Fix to nullish coalescing operator (`??`)."}]}
};
});

uniqLabels = uniqLabels.map((label) => {
if (label === null) {
return this.i18n.t('js.placeholders.default');
}
return label;
});

this.setHeight();

// keep the array in order to update the labels
this.chartLabels.length = 0;
this.chartLabels.push(...uniqLabels);
this.chartData.length = 0;
this.chartData.push(...labelCountMaps);
}

protected setChartOptions() {
const bodyFontColor= getComputedStyle(document.body).getPropertyValue('--body-font-color');
const gridLineColor= getComputedStyle(document.body).getPropertyValue('--borderColor-muted');
const backdropColor= getComputedStyle(document.body).getPropertyValue('--overlay-backdrop-bgColor');

const defaults:ChartOptions = {
color: bodyFontColor,
responsive: true,
maintainAspectRatio: false,
indexAxis: this.chartType === 'horizontalBar' ? 'y' : 'x',
scales: {
r: {
angleLines: {
color: this.isRadarChart() ? gridLineColor : 'transparent',
},
grid: {
color: this.isRadarChart() ? gridLineColor : 'transparent',
},
pointLabels: {
color: this.isRadarChart() ? bodyFontColor : 'transparent',
},
ticks: {
color: this.isRadarChart() ? bodyFontColor : 'transparent',
backdropColor: this.isRadarChart() ? backdropColor : 'transparent',
font: {
weight: 'bold',
size: 14,
},
},
},
y: {
ticks: {
color: this.isBarChart() ? bodyFontColor : 'transparent',
},
grid: {
color: this.isBarChart() ? gridLineColor : 'transparent',
},
border: {
color: this.isBarChart() ? bodyFontColor : 'transparent',
},
},
x: {
ticks: {
color: this.isBarChart() ? bodyFontColor : 'transparent',
},
grid: {
color: this.isBarChart() ? gridLineColor : 'transparent',
},
border: {
color: this.isBarChart() ? bodyFontColor : 'transparent',
},
},
},
plugins: {
legend: {
// Only display legends if more than one dataset is provided.
display: this.datasets.length > 1,
},
datalabels: {
anchor: 'center',
align: this.chartType === 'bar' ? 'top' : 'center',
color: bodyFontColor,
font: {
weight: 'bold',
size: 14,
},
},
},
};

this.internalChartOptions = {
...defaults,
...this.chartOptions,
};
}

public get hasDataToDisplay() {
return this.chartData.length > 0 && this.chartData.some((set) => set.data.length > 0);
}

public get mappedChartType():string {
return this.chartType === 'horizontalBar' ? 'bar' : this.chartType;
}

public get chartDescription():string {
const chartDataDescriptions = _.map(this.chartLabels, (label, index) => {
if (this.chartData.length === 1) {
const allCount = this.chartData[0].data[index];
return `${allCount} ${label}`;
}
const labelCounts = _.map(this.chartData, (dataset) => `${dataset.data[index]} ${dataset.label}`);
return `${label}: ${labelCounts.join(', ')}`;
});

return chartDataDescriptions.join('; ');
}

private setHeight() {
if (this.chartType === 'horizontalBar' && this.datasets && this.datasets[0]) {

Check failure on line 207 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L207 <@typescript-eslint/prefer-optional-chain>(https://typescript-eslint.io/rules/prefer-optional-chain)

Prefer using an optional chain expression instead, as it's more concise and easier to read.
Raw output
{"ruleId":"@typescript-eslint/prefer-optional-chain","severity":2,"message":"Prefer using an optional chain expression instead, as it's more concise and easier to read.","line":207,"column":47,"nodeType":null,"messageId":"preferOptionalChain","endLine":207,"endColumn":80,"suggestions":[{"fix":{"range":[6176,6209],"text":"this.datasets?.[0]"},"messageId":"optionalChainSuggest","desc":"Change to an optional chain."}]}
const labels:string[] = [];
this.datasets.forEach((d) => { d.groups!.forEach((g) => {
if (!labels.includes(g.value)) {

Check failure on line 210 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L210 <@typescript-eslint/no-unsafe-argument>(https://typescript-eslint.io/rules/no-unsafe-argument)

Unsafe argument of type `any` assigned to a parameter of type `string`.
Raw output
{"ruleId":"@typescript-eslint/no-unsafe-argument","severity":2,"message":"Unsafe argument of type `any` assigned to a parameter of type `string`.","line":210,"column":30,"nodeType":"MemberExpression","messageId":"unsafeArgument","endLine":210,"endColumn":37}
labels.push(g.value);

Check failure on line 211 in frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts

View workflow job for this annotation

GitHub Actions / eslint

[eslint] frontend/src/app/shared/components/budget-graphs/embedded/budget-embedded-graph.component.ts#L211 <@typescript-eslint/no-unsafe-argument>(https://typescript-eslint.io/rules/no-unsafe-argument)

Unsafe argument of type `any` assigned to a parameter of type `string`.
Raw output
{"ruleId":"@typescript-eslint/no-unsafe-argument","severity":2,"message":"Unsafe argument of type `any` assigned to a parameter of type `string`.","line":211,"column":23,"nodeType":"MemberExpression","messageId":"unsafeArgument","endLine":211,"endColumn":30}
}
}); });
let height = labels.length * 40;

if (this.datasets.length > 1) {
// make some more room for the legend
height += 40;
}

// some minimum height e.g. for the labels
height += 40;

this.chartHeight = `${height}px`;
} else {
this.chartHeight = '100%';
}
}

private isBarChart() {
return this.chartType === 'bar' || this.chartType === 'horizontalBar' || this.chartType === 'line';
}

private isRadarChart() {
return this.chartType === 'radar' || this.chartType === 'polarArea';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div class="op-budget-embedded-graph work-packages-embedded-view--container loading-indicator--location" #graphContainer [ngStyle]="{height: chartHeight}">
@if (hasDataToDisplay) {
<canvas baseChart
[datasets]="chartData"
[labels]="chartLabels"
[type]="mappedChartType"
[options]="internalChartOptions"
>
{{chartDescription}}
</canvas>
}
@if (!hasDataToDisplay && initialized) {
<op-no-results [title]="text.noResults" />
}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
budget-embedded-graph
margin-top: 20px
display: block
Loading
Loading