2
0
mirror of https://github.com/frappe/books.git synced 2024-11-08 14:50:56 +00:00

Merge pull request #821 from frappe/fix_ytd_chart_issues_divide_by_0

Fix ytd chart issues divide by 0
This commit is contained in:
Isaac-GC 2024-01-24 17:21:25 -08:00 committed by GitHub
commit 9c92a4f24d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -196,7 +196,7 @@ export default {
this.padding +
this.left +
(i * (this.viewBoxWidth - this.left - 2 * this.padding)) /
(this.count - 1)
(this.count - 1 || 1) // The "or" one (1) prevents accidentally dividing by 0
);
},
z() {

View File

@ -193,7 +193,7 @@ export default {
this.padding +
this.left +
(i * (this.viewBoxWidth - this.left - 2 * this.padding)) /
(this.count - 1)
(this.count - 1 || 1) // The "or" one (1) prevents accidentally dividing by 0
);
},
ys() {