mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-21 23:56:52 +01:00
Make offsetGridLines consistent and add new offset scale option (#4545)
Add a new `offset` option to scales to add extra space at edges and remove the `includeOffset` argument from `getPixelForValue()` and `getPixelForTick()`. The bar controller now automatically calculates the bar width to avoid overlaps. When `offsetGridLines` is true, grid lines move to the left by one half of the tick interval, and labels don't move.
This commit is contained in:
committed by
Simon Brunel
parent
7e6b46253d
commit
7dc71d009b
@@ -312,15 +312,6 @@ module.exports = function(Chart) {
|
||||
}
|
||||
}, me);
|
||||
|
||||
if (types.length > 1) {
|
||||
for (var i = 1; i < types.length; i++) {
|
||||
if (types[i] !== types[i - 1]) {
|
||||
me.isCombo = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return newControllers;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user