-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
adding layout.colorway #2156
Conversation
To add the baseline corresponding to your new mock, see If you're having issues with our docker image-test container, let us know. |
valType: 'colorlist', | ||
dflt: colorAttrs.defaults, | ||
role: 'style', | ||
editType: 'calc', |
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.
Comment for future development: note here that only pie
traces require this to be editType: 'calc'
. For most trace types, editType: 'plot'
would have sufficed and even editType: 'style'
might have been good enough for cartesian traces. Oh well, we might have to add-trace-type-specific editType
flags for layout attributes down the road to improve performance.
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.
@cixzhang looks great. I'm glad you were able to generate the baseline.
I noticed a few things while making what I thought would be a final review.
Sorry for not noticing them sooner 😏
"labels": ["a","b","c","c","c","a","d","e","f","f","g","h"], | ||
"type": "pie", | ||
"domain": {"x": [0, 0.4]}, | ||
"xaxis": "x2", |
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.
xaxis
and yaxis
don't do anything for pie traces. Would you mind 🔪 them?
"domain": [0.4, 1] | ||
}, | ||
"yaxis": { | ||
"anchor": "y2" |
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.
anchor
for y-axes expects x-axis ids, so this thing here gets ignored. 🔪
@@ -141,6 +141,22 @@ exports.valObjectMeta = { | |||
else propOut.set(dflt); | |||
} | |||
}, | |||
colorlist: { |
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 colorlist valType
?
A very lovely addition ❤️ Thanks very much @cixzhang 🎉 |
For #2136
This PR adds the
layout.colorway
attribute which takes a list of colors to use as the default set of colors for all traces. By default, it should use the existingColor.defaults
.