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

Multiple scatter plot fixes #956

Merged
merged 6 commits into from
Sep 21, 2016
Merged

Multiple scatter plot fixes #956

merged 6 commits into from
Sep 21, 2016

Conversation

etpinard
Copy link
Contributor

fixes #952

but also I noticed that Plotly.restyle(gd, 'mode', '') is broken on master for scatter traces (since PR #802). I think I got all the cases fixed on this branch.

@rreusser

- by moving the line data.join out of the hasLines block
- by moving the marker and text data.joins out of the
  hasMarkers / hasText switch board
- now works as intended for <text> nodes
- so that <text> are properly translate on range relayout calls

join.each(function(d) {
var sel = d3.select(this).select('text');
Drawing.translatePoint(d, sel, xa, ya);
Copy link
Contributor

Choose a reason for hiding this comment

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

A small thing but should or could we enable transitions here? I can imagine it being a matter of just following the fancy d3 transitions-work-like-everything-else pattern that the points follow. I left this out previously (though it had other update problems.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That will be for a future minor version bump (ref #933 (comment))


function assertScatterModeSizes(lineSize, pointSize, textSize) {
var gd3 = d3.select(gd),
lines = gd3.selectAll('g.scatter.trace .js-line'),
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice. Yeah. I was debating adding a bunch of d3 tests since technically it's testing internal behavior that's subject to change without affecting the look of the plots. But realistically, I think this is best.

@rreusser
Copy link
Contributor

I say 💃🏻

@etpinard etpinard mentioned this pull request Sep 21, 2016
5 tasks
@etpinard etpinard merged commit e5ff05b into master Sep 21, 2016
@etpinard etpinard deleted the scatter-mode-exiting branch September 21, 2016 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

data text position is not refreshed on zoom or pan
2 participants