mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
Improved getMaxOverflow (#6874)
This commit is contained in:
parent
e48a402935
commit
29801da9f5
@ -149,11 +149,11 @@ module.exports = DatasetController.extend({
|
||||
_getMaxOverflow: function() {
|
||||
const me = this;
|
||||
const meta = me._cachedMeta;
|
||||
const border = me._showLine && meta.dataset.options.borderWidth || 0;
|
||||
const data = meta.data || [];
|
||||
if (!data.length) {
|
||||
return false;
|
||||
return border;
|
||||
}
|
||||
const border = me._showLine && meta.dataset.options.borderWidth || 0;
|
||||
const firstPoint = data[0].size();
|
||||
const lastPoint = data[data.length - 1].size();
|
||||
return Math.max(border, firstPoint, lastPoint) / 2;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user