Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1108] Chart > HeatMap 개발 - min 값 조정 및 사이즈 계산 버그 수정 #1109

Merged
merged 1 commit into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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