Skip to content

Commit e1840cf

Browse files
committed
Fix bug with bar plots having negative bars
1 parent 34e4cec commit e1840cf

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vueplotlib",
3-
"version": "1.11.3",
3+
"version": "1.11.4",
44
"private": false,
55
"scripts": {
66
"serve": "vue-cli-service serve --open ./examples-src/index.js",

src/two.js

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ class TwoRectangle {
1010
this.width = width;
1111
this.height = height;
1212

13+
if(this.height < 0) {
14+
// To fix bug with bar plots that have bars representing negative values.
15+
this.height = this.height * -1;
16+
}
17+
1318
this.stroke = "#000";
1419
this.fill = "#000";
1520
this.linewidth = 1;

0 commit comments

Comments
 (0)