-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Templates #2761
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
Templates #2761
Changes from 1 commit
b8950c5
355fb09
8ddcfd6
b5ccfbe
86e09bb
3dee25c
5cca8d3
b3da4e7
8525953
e306d1c
8e2a321
4346611
fb489aa
bc21cc8
8490804
c2bcfe3
890a324
aed44dc
6df61e0
ef4c3cc
b1c6f0a
818cac9
15931cf
8598bc9
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 |
---|---|---|
|
@@ -38,7 +38,7 @@ var isArrayOrTypedArray = Lib.isArrayOrTypedArray; | |
* - {string} msg | ||
* error message (shown in console in logger config argument is enable) | ||
*/ | ||
module.exports = function valiate(data, layout) { | ||
module.exports = function validate(data, layout) { | ||
var schema = PlotSchema.get(); | ||
var errorList = []; | ||
var gd = {_context: Lib.extendFlat({}, dfltConfig)}; | ||
|
@@ -397,6 +397,8 @@ function isInSchema(schema, key) { | |
} | ||
|
||
function getNestedSchema(schema, key) { | ||
if(key in schema) return schema[key]; | ||
|
||
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. Not part of templating, just noticed it as there's similar logic in templates and I was looking to see how you handled it here 🙈 |
||
var parts = splitKey(key); | ||
|
||
return schema[parts.keyMinusId]; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
"yaxis2":{"title":"category","range":[0,1],"domain":[0.6,1],"anchor":"x2","type":"category","showgrid":false,"zeroline":false,"showticklabels":false}, | ||
"height":400, | ||
"width":800, | ||
"margin": {"l":20,"r":20,"top":10,"bottom":10,"pad":0}, | ||
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. I didn't want to change the image so just deleted these bad attrs uncovered when testing this fix. Perhaps we should make a test that validates all our mocks, to ensure we're not accidentally encouraging mistaken usage like this? Not in this PR of course... 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.
That's a great idea 👍 |
||
"margin": {"l":20,"r":20,"pad":0}, | ||
"showlegend":false, | ||
"shapes":[ | ||
{"layer":"below","xref":"paper","yref":"paper","x0":0,"x1":0.1,"y0":0,"y1":0.1}, | ||
|
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.
good 👁️