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:
commit
9c92a4f24d
@ -196,7 +196,7 @@ export default {
|
|||||||
this.padding +
|
this.padding +
|
||||||
this.left +
|
this.left +
|
||||||
(i * (this.viewBoxWidth - this.left - 2 * this.padding)) /
|
(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() {
|
z() {
|
||||||
|
@ -193,7 +193,7 @@ export default {
|
|||||||
this.padding +
|
this.padding +
|
||||||
this.left +
|
this.left +
|
||||||
(i * (this.viewBoxWidth - this.left - 2 * this.padding)) /
|
(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() {
|
ys() {
|
||||||
|
Loading…
Reference in New Issue
Block a user