I have the following data structure and I'm displaying information in the form of a few charts. I would like to have a time chart that displays Days on the X axis and just the top min_val for that day of the Y.
date type value min_val_day
01/12/13 10:00:00 A 10 10
01/12/13 12:00:00 A 20 10
02/12/13 10:00:00 A 15 15
02/12/13 11:00:00 A 28 15
I do not want to reduceCount or reduceSum the values, I would like the result to be the actual value in my table. So 01/12/13 would show the Y axis value as 10, 02/12/13 would be 15.
I'm sure this is simple but I cannot get my head around it! This is what I'm using now and it's not right as it's reduceSum
var mindayDim = facts.dimension(function (d) {return d3.time.day(d.date); });
var mindayDimGroup = mindayDim.group().reduceSum(function (d) { return d.min_val_day; });
Thanks for any help!