-
-
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
(WIP) Filter and GroupBy Transforms #859
Conversation
…ster `filter` with plotly
@chriddyp would you mind testing this out in the plot.ly workspace? |
@@ -129,6 +158,30 @@ function getFilterFunc(opts) { | |||
return function(v) { return v < value; }; | |||
case '>': | |||
return function(v) { return v > value; }; |
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.
does this work for datetime strings too?
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.
will try to get an example up, but yes it does work with datetime strings. It does not seem to work though with Date
and datetime strings.
Sounds good. I'm thinking the filter functions should respect the (maybe autotyped) axis types for data arrays that have a corresponding axis (e.g. I'm thinking that the var data = [{
x: ['A', 'B', 'D'],
transforms: [{
type: 'filter',
operation: '>',
value: 'B'
}]
}]
Plotly.plot(gd, data);
gd._fullData[0].x // => ['D']
That sounds a bit odd. Why would anyone filter a trace with no
|
made obsolete by #936 |
This pull makes the
filter
transform an actual part of Plotly and builds on the very finetransform
work by @etpinard. The first filters available will be=
,>
,<
,in
,notin
,within
,notwithin
(name changes welcome).groupby
to this pull