Skip to content

Better geo streaming #324

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

Merged
merged 3 commits into from
Mar 10, 2016
Merged

Better geo streaming #324

merged 3 commits into from
Mar 10, 2016

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Mar 9, 2016

@mdtusz

This PR fixes a few issues that occur while streaming scattergeo and (to a lesser degree) choropleth traces. See the added tests. All of those cases were broken before these patches.

Most of the issues were a result of our implementation of the d3 update pattern. Whereas cartesian traces are purged on every Plotly.plot call, geo traces used the classic d3 update pattern but did not account for a few details. Namely, that scatter traces have multiple modes.

etpinard added 3 commits March 9, 2016 15:04
- remove <g class="points"> (no need for an extra nested layer)
- rm all inner node in <g class="trace scattergeo"> so
  that order line/marker/text ordering is kept
@etpinard etpinard added bug something broken status: reviewable labels Mar 9, 2016
})
.on('mouseup', handleMouseOver); // ~ 'zoomend'

paths.exit().remove();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

previously, existing choropleth nodes were not removed.

@bpostlethwaite
Copy link
Member

💃 from me!

@mdtusz
Copy link
Contributor

mdtusz commented Mar 10, 2016

Yep. If you're happy with the purge strategy then 💃 from me too.

@etpinard
Copy link
Contributor Author

If you're happy with the purge strategy

Yeah. I'm ok with it for now. I ran some quick benchmarks, selectAll('*').remove() seems to be on the same order of magnitude than fancier update methods. More test cases would be needed to confirm this, but that'll be for another day.

etpinard added a commit that referenced this pull request Mar 10, 2016
@etpinard etpinard merged commit 3bcd249 into master Mar 10, 2016
@etpinard etpinard deleted the flat-scattergeo branch March 10, 2016 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants