-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Ternary axis layer #1952
Ternary axis layer #1952
Conversation
- to do so, rm <g axlines> and construct plot-layer data based on ax.layer - make sure layer order is updated on ternary.plot using selection.order() - grab layer ref from `this.layers` when possible, to undo useless querySelector calls.
I still have to add a few jasmine tests. I'm opening this PR early to tag it under the |
|
||
_this.plotContainer.selectAll('.backplot,.grids') | ||
.call(Drawing.setClipUrl, clipId); | ||
toplevel.order(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dunno if selection.order
wasn't in d3 back when I started using it or I just couldn't find it... but we need to use this maaaany more places in our code!
'aaxis', 'baxis', 'caxis', 'axlines' | ||
]; | ||
|
||
var plotLayers = ['draglayer', 'plotbg', 'backplot', 'grids']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The handful of lines below are a little bit verbose. If anyone knows a cleaner / better way to do this, let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dunno if it's worthwhile - shorter but not necessarily cleaner - but you could do something like
var plotOverLayers = ['frontplot'];
['a','b','c'].forEach(function(axLetter) {
var axName = axLetter + 'axis';
var isBelow = ternaryLayout[axName].layer === 'below';
(isBelow ? plotLayers : plotOverLayers).push(axName, axLetter + 'line');
});
[].push.apply(plotLayers, plotOverLayers);
Looks like CircleCI is down for the moment. Nonetheless, |
cc @geocosmite |
The So lets keep it as is. No more comments, the one above is arguably not even an improvement 🙈 |
Implements #1871 for ternary subplots