]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Bubble: Use point.size() in getMaxOverflow (#8018)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Sun, 8 Nov 2020 13:44:26 +0000 (15:44 +0200)
committerGitHub <noreply@github.com>
Sun, 8 Nov 2020 13:44:26 +0000 (08:44 -0500)
src/controllers/controller.bubble.js

index cbea599adbffa58087371490fd3be4816c9f926b..d1332efabe980196eb814767f48cf74a05f44662 100644 (file)
@@ -34,10 +34,10 @@ export default class BubbleController extends DatasetController {
        getMaxOverflow() {
                const me = this;
                const meta = me._cachedMeta;
-               let i = (meta.data || []).length - 1;
+               const data = meta.data;
                let max = 0;
-               for (; i >= 0; --i) {
-                       max = Math.max(max, me.getStyle(i, true).radius);
+               for (let i = data.length - 1; i >= 0; --i) {
+                       max = Math.max(max, data[i].size());
                }
                return max > 0 && max;
        }