-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Ternary phase diagrams #390
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
Conversation
- add one visibility toogle test - add one delete / add trace test
| yaArray = subplots.map(function(spId) { | ||
| var ternary = (gd._fullLayout[spId] || {})._ternary; | ||
| if(ternary) return ternary.xaxis; | ||
| if(ternary) return ternary.yaxis; |
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.
@alexcjohnson fyi.
- domain[0] set to 0 means to bottom of the plot area, but svg offset are computed from the top
- make sure that len is considered 0 if a is defined but not b and c. - make sure the a, b, c are defined before trying to slice them
- scatterternary fill will be part of the next iteration
- add fall back if plot_bgcolor isn't defined
| coerce('hoverinfo', (layout._dataLength === 1) ? 'a+b+c+text' : undefined); | ||
|
|
||
| // until 'fill' and 'fillcolor' are supported | ||
| traceOut.fill = 'none'; |
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.
@alexcjohnson feel free to git revert this commit when you'll get to fills.
|
|
||
| // TODO remove this in version 2.0 | ||
| // copy on Fx for backward compatible | ||
| fx.unhover = dragElement.unhover; |
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.
|
💃 Let's do itttt |

In brief
Add ternary subplots, plus a
scatterternarytype to put on them.Also a bunch of refactoring to make this (and future) integrations easier:
axisid,sceneid,geoidinto a singlesubplotidattribute type. Ternary subplots are managed by asubplotattribute and the next step will be to use this for 3d and geo too rather than attributes calledsceneandgeo. Potentially also for cartesian, iesubplot='x2y2'- but I'm not going to change those ones in this PR.axis.coloras an attribute that sets the default for all the other colors associated with the axis. The one kind of tricky part of this isgridcolor, which has to be lightened fromaxis.colorrelative to the background color it will appear on.graph_interactsome more, creating a newdragElementcomponent, a new cartesiandragBoxmodule, and a newsetCursorfunction in libTitles.draw, instead passing a configuration object from each caller.I still need to make some test plots, but I think this is ready for review.
Limitations
scatterternarytrace trypes.contourternarywill be in a future iteration'fill'and'fillcolor') aren't supported at the momentcc @etpinard @mdtusz @jackparmer