mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-03 06:54:02 +01:00
Fix line / non-numeric-y (#6617)
This commit is contained in:
committed by
Evert Timberg
parent
d4dc505966
commit
0de668b46f
@@ -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() {
|
||||
|
||||
34
test/fixtures/controller.line/non-numeric-y.json
vendored
Normal file
34
test/fixtures/controller.line/non-numeric-y.json
vendored
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
test/fixtures/controller.line/non-numeric-y.png
vendored
Normal file
BIN
test/fixtures/controller.line/non-numeric-y.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Reference in New Issue
Block a user