-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
scatter marker color gradients #1620
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
Changes from 1 commit
541460a
ff6c910
105ce9b
a074259
1b0a6bb
d1c6b51
e3af5eb
ec4d9ee
21650c7
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 |
---|---|---|
|
@@ -15,6 +15,9 @@ var Lib = require('../../lib'); | |
// arrayOk attributes, merge them into calcdata array | ||
module.exports = function arraysToCalcdata(cd, trace) { | ||
|
||
// so each point knows which index it originally came from | ||
for(var i = 0; i < cd.length; i++) cd[i].i = i; | ||
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. @etpinard to my comment earlier today about not using BUT once we have that, we could get rid of the rest of these I'm not going to do that now, but could be a nice 🚀 at some point. 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 👁️ here and nice fix. But, I think the solution would be to make |
||
|
||
Lib.mergeArray(trace.text, cd, 'tx'); | ||
Lib.mergeArray(trace.hovertext, cd, 'htx'); | ||
Lib.mergeArray(trace.customdata, cd, 'data'); | ||
|
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.
I wonder if it might be better to add a ref to those gradient defs in
fullData[i]
then to look forgd
? Or even better refactor thoseDrawing
method to expectfullLayout
as argument.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.
I'll leave it for now - I agree this is suboptimal but neither of these alternatives seems particularly simpler to me. If I had to pick one I'd probably go for the first actually... stashing the
<defs>
in each trace could come in handy elsewhere too.