-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
adding layout.colorway #2156
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
adding layout.colorway #2156
Changes from all commits
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 |
---|---|---|
|
@@ -175,5 +175,12 @@ module.exports = { | |
role: 'info', | ||
editType: 'legend', | ||
description: 'Determines whether or not a legend is drawn.' | ||
} | ||
}, | ||
colorway: { | ||
valType: 'colorlist', | ||
dflt: colorAttrs.defaults, | ||
role: 'style', | ||
editType: 'calc', | ||
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. Comment for future development: note here that only |
||
description: 'Sets the default trace colors.' | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"data": [ | ||
{"y": [8, 7, 7, 6, 5, 4, 4, 3, 2, 2, 3]}, | ||
{"y": [7, 7, 6, 5, 4, 4, 3, 2, 2, 3, 8]}, | ||
{"y": [7, 6, 5, 4, 4, 3, 2, 2, 3, 8, 7]}, | ||
{"y": [6, 5, 4, 4, 3, 2, 2, 3, 8, 7, 7]}, | ||
{"y": [5, 4, 4, 3, 2, 2, 3, 8, 7, 7, 6]}, | ||
{ | ||
"labels": ["a","b","c","c","c","a","d","e","f","f","g","h"], | ||
"type": "pie", | ||
"domain": {"x": [0, 0.4]} | ||
} | ||
], | ||
"layout": { | ||
"title": "Custom Trace Color Defaults", | ||
"colorway": [ | ||
"#DE5845", | ||
"#E83898", | ||
"#A83DD1", | ||
"#5A38E8", | ||
"#3C71DE" | ||
], | ||
"xaxis": { | ||
"domain": [0.4, 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.
Would you mind adding a
Lib.validate
test case for the new colorlistvalType
?