Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
24 changes: 6 additions & 18 deletions src/component/axis/AxisBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,30 +547,18 @@ function fixMinMaxLabelShow(
ignoreEl(firstLabel);
ignoreEl(firstTick);
}
else if (isTwoLabelOverlapped(firstLabel, nextLabel)) {
if (showMinLabel) {
ignoreEl(nextLabel);
ignoreEl(nextTick);
}
else {
ignoreEl(firstLabel);
ignoreEl(firstTick);
}
else if (isTwoLabelOverlapped(firstLabel, nextLabel) && !showMinLabel) {
ignoreEl(firstLabel);
ignoreEl(firstTick);
}

if (showMaxLabel === false) {
ignoreEl(lastLabel);
ignoreEl(lastTick);
}
else if (isTwoLabelOverlapped(prevLabel, lastLabel)) {
if (showMaxLabel) {
ignoreEl(prevLabel);
ignoreEl(prevTick);
}
else {
ignoreEl(lastLabel);
ignoreEl(lastTick);
}
else if (isTwoLabelOverlapped(prevLabel, lastLabel) && !showMaxLabel) {
ignoreEl(lastLabel);
ignoreEl(lastTick);
}
}

Expand Down
118 changes: 118 additions & 0 deletions test/axis-showLabel.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading