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

Sub-categories now use output instead of input values for labels #61

Open
GoodnessJSON opened this issue Feb 26, 2023 · 2 comments
Open

Comments

@GoodnessJSON
Copy link

GoodnessJSON commented Feb 26, 2023

Hi there,

I have a sample Sankey example such as the below:

Expenditures [200] Shopping

Shopping [150] Homewares
Shopping [150] Electronics

Originally the label for shopping would show as 200 since that is the INPUT. Recently however it seems this behaviour has changed and the label now displays the automatic sum from the OUTPUT, so it now displays 300. Would it be possible to make this a configuration option to choose whether the input or output value is displayed?

This would be invaluable for certain use-cases where you're more focussed on a strictly defined input and the outputs are less reliable.

@nowthis
Copy link
Owner

nowthis commented Mar 1, 2023

The logic for deciding what value to use to label a node has not changed; a node is always sized to the maximum amount of its inflows & outflows, and the value shown in a label always uses that amount.

I think what may be different is the default placement of the labels -- that has changed recently. You can get back the old labeling style fairly easily, though.

Here's what it looks like today with your sample input and the newer default label placement:
labels-before

By default, labels now appear before their nodes. English speakers read left-to-right; this gives people a label as the first thing they need to process rather than presenting them with some blank rectangles first (& hoping they notice the labels on the other side of the nodes).

You can customize the label placement under "Labels & Units" > "Position". To restore the appearance which used to be the default, you would:

  1. Set "Place the first labels:" to "After the node".
  2. If you also want the last labels to be 'inside' their nodes instead of after them, then move the "Place labels on the other side" slider leftward to make the end labels appear before their nodes. (That slider controls the column at which this label-flipping starts; it defaults to no flipping at all.)

With those two changes, this is what those same inputs look like:
labels-inside

Is that the output you're looking for?

If not, do you have an example of an older diagram behaving as you describe? I'm not sure what else the issue might be.

@rshorst
Copy link

rshorst commented Mar 24, 2023

I have been searching around everywhere and can't seem to find this case. It would be helpful to have an option that did not add up the totals of homewares and electronics, but instead visualized them as part of a set whole of expenditures. so Expenditures is set at 200 and 150/200 goes to homewares and another 150/200 goes to electronics... does that make sense?

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

No branches or pull requests

3 participants