-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
@@ -319,7 +319,7 @@ function hover(gd, evt, subplot) { | |||
}), | |||
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.
@@ -23,6 +23,10 @@ var dragElement = require('../../components/dragelement'); | |||
|
|||
var fx = module.exports = {}; | |||
|
|||
// 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
scatterternary
type to put on them.Also a bunch of refactoring to make this (and future) integrations easier:
axisid
,sceneid
,geoid
into a singlesubplotid
attribute type. Ternary subplots are managed by asubplot
attribute and the next step will be to use this for 3d and geo too rather than attributes calledscene
andgeo
. Potentially also for cartesian, iesubplot='x2y2'
- but I'm not going to change those ones in this PR.axis.color
as 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.color
relative to the background color it will appear on.graph_interact
some more, creating a newdragElement
component, a new cartesiandragBox
module, and a newsetCursor
function 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
scatterternary
trace trypes.contourternary
will be in a future iteration'fill'
and'fillcolor'
) aren't supported at the momentcc @etpinard @mdtusz @jackparmer