Hi All
I notice to make a stacked graph they create a new group for each of the http request return code keys, like so:
var status_200=dateDim.group().reduceSum(function(d) {return d.http_200;});
var status_302=dateDim.group().reduceSum(function(d) {return d.http_302;});
var status_404=dateDim.group().reduceSum(function(d) {return d.http_404;});
This seems rather hard coded approach to me, is it possible top achieve the same with one group and specify the key to use? or even better dynamically determine the stack groups based keys present in the data.
speedSumGroup = runDimension.group().reduce((p, v) => {
p[v.Expt] = (p[v.Expt] || 0) + v.Speed;
return p;
}, (p, v) => {
p[v.Expt] = (p[v.Expt] || 0) - v.Speed;
return p;
}, () => ({}));
:
:
:
for (var i = 1; i < 5; ++i) {
chart.stack(speedSumGroup, '' + i, sel_stack(i));
}