RED-7641: Align axis grid lines

This commit is contained in:
Adina Țeudan 2023-09-27 15:06:32 +03:00
parent 4247b00894
commit b97a8dc1f9
2 changed files with 9 additions and 8 deletions

View File

@ -35,7 +35,10 @@ export class ChartComponent implements OnChanges {
scales: {
y: {
stacked: true,
ticks: { callback: this.valueFormatter ? (value: number) => this.valueFormatter(value) : undefined },
ticks: {
callback: this.valueFormatter ? (value: number) => this.valueFormatter(value) : undefined,
count: 9,
},
title: {
display: !!this.yAxisLabel,
text: this.yAxisLabel,
@ -46,7 +49,10 @@ export class ChartComponent implements OnChanges {
y1: {
display: this.secondaryAxis,
position: 'right',
ticks: { callback: this.valueFormatter ? (value: number) => this.valueFormatter(value) : undefined },
ticks: {
callback: this.valueFormatter ? (value: number) => this.valueFormatter(value) : undefined,
count: 9,
},
title: {
display: !!this.yAxisLabelRight,
text: this.yAxisLabelRight,

View File

@ -86,7 +86,7 @@ export class LicenseService extends GenericService<ILicenseReport> {
get analysisCapacityBytes(): number {
const capacityFeature = this.getFeature(LicenseFeatures.ANALYSIS_CAPACITY_BYTES);
return Number(capacityFeature?.value ?? '-1');
return (Number(capacityFeature?.value ?? '-1') / 10) * 10;
}
get retentionCapacityBytes(): number {
@ -122,11 +122,6 @@ export class LicenseService extends GenericService<ILicenseReport> {
this.licenseData$ = this.#licenseData$.pipe(filter(licenses => !!licenses));
}
hasNumberFeature(key: LicenseFeatures): boolean {
const feature = this.getFeature(key);
return !!feature && Number(feature.value) >= 0;
}
getFeature(name: string): ILicenseFeature | undefined {
return this.selectedLicense.features?.find(f => f.name === name);
}