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

full default contents of hoverlabel not appearing in _fullData or _fullLayout #2964

Closed
nicolaskruchten opened this issue Sep 3, 2018 · 4 comments

Comments

@nicolaskruchten
Copy link
Contributor

If I just create any random figure without specifying anything to do with hoverlabel and look at _fullData[0].hoverlabel or _fullLayout.hoverlabel, I see font.family, font.size and namelength but none of the default values for the color keys like bgcolor or bordercolor or font.color. This makes it hard to add these fields to the react-chart-editor.

I expect that the colours for the _fullLayout variant should be null by default, which would mean "delegate to the individual traces" right? That'll be hard to manage in the editor but we'll find a way :)

While testing this I also found some cases where the hoverlabel text doesn't automatically contrast with the bgcolor in a sufficient way ... setting layout.hoverlabel.bgcolor = "white" gives this, where issue 1 is that the bottom overlabel doesn't have black text and issue 2 is that the trace-name portion of the label doesn't have black text. Setting layout.hoverlabel.font.color = "black" only corrects issue 1.

image

@etpinard
Copy link
Contributor

etpinard commented Sep 6, 2018

In general, we can't just punch the "computed" hoverlabel colors during the defaults (and hence in fullData w/o hacks). One case that comes to mind: a scatter trace with array marker.color will have hover labels that match the marker.color values.

@nicolaskruchten
Copy link
Contributor Author

I'm not sure I understand the implications of what you're saying here... why "just"? what would be the alternative? :)

@etpinard
Copy link
Contributor

etpinard commented Sep 7, 2018

Ooops. I meant to write: we can't just punch the "computed" hoverlabel colors during the defaults (now edited above).

what would be the alternative? :)

Probably mutate gd.data once more.

@etpinard
Copy link
Contributor

etpinard commented Sep 7, 2018

Split into #2834 (comment) and #2981

Closing.

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

2 participants