-
Notifications
You must be signed in to change notification settings - Fork 4
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
support multiple values per point #44
Comments
Let's specify expected behavior if the user does
Perhaps nothing sensible can possibly happen, but we should have definition for this case. |
@dmehra, the generated series would be
(assuming its |
What's the name of an individual series in the resulting timechart? Is "name: max, type: type1" the name? |
@dmehra, yes. Another option would be something like
or just
But these are introducing new concepts. |
All views in JuttleViz that have an understanding of a
valueField
allow only one of them per point.When working with data in juttle, it is pretty common to end up with points that have multiple values each.
For example,
In this case each point ends up with three values. The current expected way of sending this data into a
timechart
is to first callsplit
:This breaks each point into one point containing one of the values in the
value
field and original field name in thename
field. It now has one value per point just liketimechart
expects.The downside of having to call
split
before sending the points toview timechart
is you end up sending a lot more points/data from the juttle-engine to your browser.The proposal is to add multi-valueField support to
timechart
and the rest of the applicable views.Default Behavior
Right now, if no
-valueField
is specified, the views look for the first numeric field they can find in the first point, and use that. The new behavior here would be that if theres more than one numeric field, it'll do the equivalent of callingsplit
internally, creating a separate point for each value, assigning the value intovalue
and the original value's field name intoname
. If there already existed a field calledname
in the point, it would get clobbered, but I think thats somewhat of an edge case. If points already contain a field calledname
, then it prolly is the name of the metric/value and there is only one value in the point to begin with.Customizing the Behavior
If by chance a points have more numeric fields than a user wants to plot, they can still explicitly specify
-valueField 'sum'
or multiple-valueFields ['sum', 'min']
. It would be good to just standardize on-valueFields
, but that would be a pretty major breaking change so to begin, we should introduce-valueFields
alongside-valueField
.The text was updated successfully, but these errors were encountered: