10000 Improve text fit in treemap trace by archmoj · Pull Request #4469 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Improve text fit in treemap trace #4469

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

Merged
merged 2 commits into from
Jan 7, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
no need to multiply by zero
  • Loading branch information
archmoj committed Jan 7, 2020
commit 7098a97097e9e4f2541eb1d2f348ba801b3814a9
4 changes: 2 additions & 2 deletions src/traces/bar/plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,8 @@ function toMoveInsideBar(x0, x1, y0, y1, textBB, opts) {

// compute text and target positions
var textX = (
(textBB.left + 0 * TEXTPAD) * toLeft +
(textBB.right - 0 * TEXTPAD) * toRight
textBB.left * toLeft +
textBB.right * toRight
);
var textY = (textBB.top + textBB.bottom) / 2;
var targetX = (
Expand Down
0