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

make sankey honor positioning specified by domain.x #2984

Merged
merged 2 commits into from
Sep 7, 2018

Conversation

antoinerg
Copy link
Contributor

Fixes #2878

Simple fix with a test to 🔒 this down!

@etpinard
Copy link
Contributor

etpinard commented Sep 7, 2018

❇️ Brilliant ❇️

Not a bad day for @antoinerg scoring a 💃 hattrick

@antoinerg antoinerg merged commit ff3c324 into master Sep 7, 2018
@antoinerg antoinerg deleted the 2878-sankey-domain-x branch September 7, 2018 20:39
@@ -172,7 +172,7 @@ function sankeyModel(layout, d, traceIndex) {
valueFormat: valueFormat,
valueSuffix: valueSuffix,
textFont: textFont,
translateX: domain.x[0] * width + layout.margin.l,
translateX: domain.x[0] * layout.width + layout.margin.l,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Man, sankey is so confusing... I was convinced this must be wrong but no, you got it exactly right, sankey just remapped _size into something that looks like _fullLayout and even called it layout for further obfuscation...

{
width: size.w,
height: size.h,
margin: {
t: size.t,
r: size.r,
b: size.b,
l: size.l
}
},

If you ever feel like untangling a little of this, please do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sankey has problems with domain.x
3 participants