8000 Add `automargin` to pie traces with outside text labels by etpinard · Pull Request #4278 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Add automargin to pie traces with outside text labels #4278

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 3 commits into from
Oct 23, 2019
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
Next Next commit
use var gs in pie/plot.js
  • Loading branch information
etpinard committed Oct 15, 2019
commit eef1049c21a5a138e022d88e509a596adc3ec5ac
5 changes: 3 additions & 2 deletions src/traces/pie/plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ var isValidTextValue = require('../../lib').isValidTextValue;

function plot(gd, cdModule) {
var fullLayout = gd._fullLayout;
var gs = fullLayout._size;

prerenderTitles(cdModule, gd);
layoutAreas(cdModule, fullLayout._size);
layoutAreas(cdModule, gs);

var plotGroups = Lib.makeTraceGroups(fullLayout._pielayer, cdModule, 'trace').each(function(cd) {
var plotGroup = d3.select(this);
Expand Down Expand Up @@ -228,7 +229,7 @@ function plot(gd, cdModule) {
if(trace.title.position === 'middle center') {
transform = positionTitleInside(cd0);
} else {
transform = positionTitleOutside(cd0, fullLayout._size);
transform = positionTitleOutside(cd0, gs);
}

titleText.attr('transform',
Expand Down
0