Skip to content

Commit

Permalink
Fix line / non-numeric-y (#6617)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle authored and etimberg committed Oct 27, 2019
1 parent d4dc505 commit 0de668b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controllers/controller.line.js
Expand Up @@ -209,8 +209,9 @@ module.exports = DatasetController.extend({
if (rightValue < 0) {
return yScale.getPixelForValue(sumNeg + rightValue);
}
return yScale.getPixelForValue(sumPos + rightValue);
}
return yScale.getPixelForValue(sumPos + rightValue);
return yScale.getPixelForValue(value);
},

updateBezierControlPoints: function() {
Expand Down
34 changes: 34 additions & 0 deletions test/fixtures/controller.line/non-numeric-y.json
@@ -0,0 +1,34 @@
{
"config": {
"type": "line",
"data": {
"xLabels": ["January", "February", "March", "April", "May", "June", "July"],
"yLabels": ["", "Request Added", "Request Viewed", "Request Accepted", "Request Solved", "Solving Confirmed"],
"datasets": [{
"label": "My First dataset",
"data": ["", "Request Added", "Request Added", "Request Added", "Request Viewed", "Request Viewed", "Request Viewed"],
"fill": false,
"borderColor": "red",
"backgroundColor": "red"
}]
},
"options": {
"responsive": false,
"legend": false,
"title": false,
"scales": {
"xAxes": [{"display": false}],
"yAxes": [{
"type": "category",
"display": false
}]
}
}
},
"options": {
"canvas": {
"height": 256,
"width": 512
}
}
}
Binary file added test/fixtures/controller.line/non-numeric-y.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0de668b

Please sign in to comment.