Rolling Count of Objects by date


#1

I would like to produce a cumulative sum of all objects in the system of a particular type.

Say i have a type “Foo”, several of which have been created. I can run the following query to get the dates at which each individual FOO object was created:

Foo.fetch({include: "meta.created"})

Is there a way for me to produce a timeseries of the number of objects in the system?


#2

Timeseries.fromObjs - for example,

Timeseries.fromObjs(
ObjArry.fromArry(Foo.fetch({include: “meta.created”}).objs),
{
start: “2018-10-01”,
end: “2018-11-01”,
interval: “DAY”
},
{
treatment: “COUNT”,
startPath: “meta.created”
}
)


#3

I acutally used treatment “ROLLINGCOUNT”