You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem: When you group more than once trace, the legend is confusing. It shows repeated groups without a good indication of which trace they belong to:
More buggily, as @chriddyppoints out, if you change trace group names in the legend while in edit mode, they revert because there's nowhere in the schema for the input to go. One solution would be to add a names field for custom group names, e.g.:
I like @alexcjohnson's suggestion: nameformat: "kale - %g" that substitutes the group name into %g. The only problem is that we still don't have a place for edit mode input, though that could just be disabled.
But yeah, that wouldn't allow editing via the legend, that would have to break out of the substitution format and convert it to the groupvals/groupnames version.
Agreed, but to clarify, I'd favor just converting the one that was edited into groupvals/groupnames and consider those overrides. To get rid of it, you'd delete the text and it'd revert to the automatically named format.
I'd just convert the one that was edited into groupvals/groupnames and consider those overrides. To get rid of it, you'd delete the text and it'd revert to the automatically named format.
That could work. I wonder if there's some smart way we could figure out to have the first edit set nameformat (if the appropriate target value is in the name) and then subsequent edits generate overrides? Dunno though, I can think of a bunch of edge cases where that would be unhelpful so maybe not.
@cldougl I think perhaps they did. I'm not too familiar with them, but the legend naming code explicitly checks for and handles ohlc/candlestick plots.
Activity
rreusser commentedon Jul 18, 2017
I like @alexcjohnson's suggestion:
nameformat: "kale - %g"that substitutes the group name into%g. The only problem is that we still don't have a place for edit mode input, though that could just be disabled.alexcjohnson commentedon Jul 18, 2017
My first reaction would be to do something analogous to
tickvals/ticktext:A more concise but restricted way would be a custom string substitution:
But yeah, that wouldn't allow editing via the legend, that would have to break out of the substitution format and convert it to the
groupvals/groupnamesversion.rreusser commentedon Jul 18, 2017
Agreed, but to clarify, I'd favor just converting the one that was edited into
groupvals/groupnamesand consider those overrides. To get rid of it, you'd delete the text and it'd revert to the automatically named format.alexcjohnson commentedon Jul 18, 2017
That could work. I wonder if there's some smart way we could figure out to have the first edit set
nameformat(if the appropriate target value is in the name) and then subsequent edits generate overrides? Dunno though, I can think of a bunch of edge cases where that would be unhelpful so maybe not.cldougl commentedon Jul 19, 2017
did the financial types (ohlc and candlestick) have a similar problem?
rreusser commentedon Aug 1, 2017
@cldougl I think perhaps they did. I'm not too familiar with them, but the legend naming code explicitly checks for and handles ohlc/candlestick plots.