I'm having trouble rendering a stack in a line chart.
I have a reduction which calculates three averages. I can show one of these Avg in the .group, but it doesn't work in stack
timeConstChart
.dimension(datesDim)
.group(evalConsReduced,"Buena", function(d){return d.value.buenaAvg}) // works
.stack(evalConsReduced,"Regular",function (d) {return d.value.regularAvg}) // <- Doesn't work
.stack(evalConsReduced,"Mala",function (d) {return d.value.malaAvg}) // <- Doesn't work neither
.x(d3.time.scale().domain([minDate,maxDate]))
.y(d3.time.scale().domain([0,100]));
The weird part is if I ignore the group's "return d.value.buenaAvg", I can get the result from d.value.regularAvg
Note: This is my first time using crossfilter but I can already tell my reduce functions are not optimal and they can be improved. Any directions here will also be appreciated.