Skip to content

Commit

Permalink
Update src/app/datapoints-graph/charts/y-axis.service.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Jakub Drewniak <[email protected]>
Signed-off-by: Enio Sultan <[email protected]>
  • Loading branch information
eniosultan and jdre-c8y authored Nov 14, 2024
1 parent 050838c commit c2e84f6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/app/datapoints-graph/charts/y-axis.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,8 @@ export class YAxisService {
fontSize: 10,
show: !matchingDpRange || !YAxisOptions.mergeMatchingDatapoints,
formatter: (val) => {
const { min, max } = dp || {};
const range =
min !== undefined && max !== undefined ? max - min : undefined;

if (range !== undefined) {
if (dp.min != undefined && dp.max != undefined) {
const range = dp.max - dp.min

Check failure on line 110 in src/app/datapoints-graph/charts/y-axis.service.ts

View workflow job for this annotation

GitHub Actions / Cypress tests

Insert `;`
const decimalPlaces = this.getDecimalPlaces(range);
return val.toFixed(decimalPlaces);
}
Expand Down

0 comments on commit c2e84f6

Please sign in to comment.