Skip to content

Better polar setConvert + a few misc polar touch ups #2895

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 18 commits into from
Aug 15, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions src/plots/polar/polar.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,32 @@ proto.updateLayers = function(fullLayout, polarLayout) {
join.order();
};

/* Polar subplots juggle with 6 'axis objects' (!), these are:
*
* - polarLayout.radialaxis (aka radialLayout in this file):
* - polarLayout.angularaxis (aka angularLayout in this file):
* used for data -> calcdata conversions (aka d2c) during the calc step
*
* - this.radialAxis
* extends polarLayout.radialaxis, adds mocked 'domain' and
* few other keys in order to reuse Cartesian doAutoRange and doTicksSingle,
* used for calcdata -> geometric conversions (aka c2g) during the plot step
* + setGeometry setups ax.c2g for given ax.range
* + setScale setups ax._m,ax._b for given ax.range
*
* - this.angularAxis
* extends polarLayout.angularaxis, adds mocked 'range' and 'domain' and
* a few other keys in order to reuse Cartesian doTicksSingle,
* used for calcdata -> geometric conversions (aka c2g) during the plot step
* + setGeometry setups ax.c2g given ax.rotation, ax.direction & ax._categories,
* and mocks ax.range
* + setScale setups ax._m,ax._b with that mocked ax.range
*
* - this.xaxis
* - this.yaxis
* setup so that polar traces can reuse plot methods of Cartesian traces
* which mostly rely on 2pixel methods (e.g ax.c2p)
*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks! 📚

proto.updateLayout = function(fullLayout, polarLayout) {
var _this = this;
var layers = _this.layers;
Expand Down