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

Correct bug when color and values correspond to the same color in treemap or sunburst #2591

Merged
merged 10 commits into from
Jun 26, 2020

Conversation

emmanuelle
Copy link
Contributor

Closes #2567

@nicolaskruchten nicolaskruchten added this to the 4.8.2 milestone Jun 25, 2020
@emmanuelle emmanuelle changed the title Hover bug Correct but when color and values correspond to the same color in treemap or sunburst Jun 25, 2020
@nicolaskruchten nicolaskruchten changed the title Correct but when color and values correspond to the same color in treemap or sunburst Correct bug when color and values correspond to the same color in treemap or sunburst Jun 25, 2020
@nicolaskruchten
Copy link
Contributor

Note: this also fixes a new problem introduced in #2544

aggfunc_color = "sum"
new_value_col_name = args["values"] + "_total"
df[new_value_col_name] = df[args["values"]]
args["values"] = new_value_col_name
Copy link
Contributor

Choose a reason for hiding this comment

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

so like this, the <col>_total appears in the hoverlabel as the value. This is what we want? Not sure what would be better...

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we want <col>_sum instead? or <col>_weighted_average for the other one? not sure

Copy link
Contributor

Choose a reason for hiding this comment

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

<col>_color for the other one maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm fine changing total to sum. I put total like branchvalues='total'. We could also put a suffix for the colors column but if we want to minimize the occurrence of such suffixes, we'd better put it on the values column (only in the case where it's the same as the colors column).

Copy link
Contributor

Choose a reason for hiding this comment

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

ok let's do sum and merge this thing :)

@nicolaskruchten
Copy link
Contributor

💃 when changed to sum

Oh and a changelog entry please?

@emmanuelle
Copy link
Contributor Author

will merge after the CI runs

@emmanuelle emmanuelle merged commit 96a9101 into master Jun 26, 2020
@nicolaskruchten nicolaskruchten deleted the hover-bug branch July 20, 2020 14:35
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

Successfully merging this pull request may close these issues.

sunburst bug when color and values correspond to the same column
2 participants