-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Multi-axis-type sploms #2899
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
Multi-axis-type sploms #2899
Changes from 1 commit
dd563bb
9e1869d
9da5a1b
f3c73db
b3d27bd
9039a8e
ab7d9c6
39b71bb
57ddadb
15efc72
1823904
390f292
adb0004
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -359,6 +359,36 @@ describe('Test splom trace defaults:', function() { | |
}); | ||
}); | ||
|
||
describe('Test splom trace calc step:', function() { | ||
var gd; | ||
|
||
function _calc(opts, layout) { | ||
gd = {}; | ||
|
||
gd.data = [Lib.extendFlat({type: 'splom'}, opts || {})]; | ||
gd.layout = layout || {}; | ||
supplyAllDefaults(gd); | ||
Plots.doCalcdata(gd); | ||
} | ||
|
||
it('should skip dimensions with conflicting axis types', function() { | ||
_calc({ | ||
dimensions: [{ | ||
values: [1, 2, 3] | ||
}, { | ||
values: [2, 1, 2] | ||
}] | ||
}, { | ||
xaxis: {type: 'category'}, | ||
yaxis: {type: 'linear'} | ||
}); | ||
|
||
var cd = gd.calcdata[0][0]; | ||
|
||
expect(cd.t._scene.matrixOptions.data).toBeCloseTo2DArray([[2, 1, 2]]); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is good, but I have various questions about what happens downstream from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good call, done in -> 390f292 |
||
}); | ||
}); | ||
|
||
describe('@gl Test splom interactions:', function() { | ||
var gd; | ||
|
||
|
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.
Seems likely to confuse people if they encounter this issue... do you want to include a
Log
message, or perhaps find a way to surface this inPlotly.validate
?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.
As this is part of the calc step (which is outside the scope of
Plotly.validate
) and that we can't easily move this to the defaults step (as axis defaults are coerced after trace defaults), I chose to only log something in 1823904Note that I chose I was first planning on using
Lib.warn
instead ofLib.log
, but currently the image server bails whenever a mock results in aLib.warn
, so the mock added in 390f292 would fail to generate an image. I hope you're ok with just aLib.log
here.