diff --git a/src/components/chart/element/element.heatmap.js b/src/components/chart/element/element.heatmap.js index 00fa46ab0..2acef1dc8 100644 --- a/src/components/chart/element/element.heatmap.js +++ b/src/components/chart/element/element.heatmap.js @@ -108,7 +108,7 @@ class HeatMap { const xsp = chartRect.x1 + labelOffset.left; const ysp = chartRect.y2 - labelOffset.bottom; - this.size.w = Math.ceil(xArea / (this.spaces.x || (minmaxX.graphMax - minmaxX.graphMin))); + this.size.w = Math.floor(xArea / (this.spaces.x || (minmaxX.graphMax - minmaxX.graphMin))); this.size.h = Math.floor(yArea / (this.spaces.y || (minmaxY.graphMax - minmaxY.graphMin))); this.data.forEach((item) => { diff --git a/src/components/chart/model/model.store.js b/src/components/chart/model/model.store.js index a268b8346..8e1a78e48 100644 --- a/src/components/chart/model/model.store.js +++ b/src/components/chart/model/model.store.js @@ -441,7 +441,7 @@ const modules = { if (!opt.startToZero || targetMin > 0) { const targetSpace = space ? (space - 1) : (targetMax - targetMin); - const targetStep = targetInterval || Math.ceil((max - targetMin) / targetSpace); + const targetStep = Math.ceil((max - targetMin) / targetSpace); targetMin = targetMin < targetStep ? 0 : targetMin - targetStep; }