Skip to content

Commit

Permalink
[#1108] Chart > HeatMap 개발 - min 값 조정 및 사이즈 계산 버그 수정 (#1109)
Browse files Browse the repository at this point in the history
Co-authored-by: Hye Yeon, Kim <hy2on@ex-em.com>
  • Loading branch information
h2yeon and hyeonbbang authored Mar 28, 2022
1 parent fb00f81 commit 67b99d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/chart/element/element.heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/chart/model/model.store.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 67b99d6

Please sign in to comment.