Time based charts are buggy

Expected behavior

Show correct values on Time based charts when Daily view

Actual behavior

Charts are not showing the correct value (always less than the sum value). Guess there is some float point mistake. It started today or yesterday I guess.

Failure Logs

Please include any relevant log snippets, if necessary.


Please provide any relevant information about your setup.

  • Express Version: “express”: “~4.16.3”, “forest-express-mongoose”: “^5.2.0”,
  • Database Dialect: Mongo
1 Like

My time-based charts were broken yesterday for some reason. And now it shows only 0 or 1 per time frame instead of actual count.

We have the same issue here since 17 or 18 of June. Could you please advise on how to resolve this ? Thanks


Hi :wave: thank you for your feedback. I try to reproduce on my end without success.
For more context, can you fill this questions please?

  • Which database do you use?
  • Do you use sum or count view?
  • If you use sum view, what is the value type?


  1. MongoDB
  2. count


@Arnaud_Moncel I got it. On sum cases it’s getting only the last (older) value.

Ex: 19/06/2020 value: 10; 19/06/2020 value: 11.5; 19/06/2020 value: 22.5

Result of sum: 22.5

I haven’t changed anything since last 20 days I guess. Therefore, I think there is something on your side on.

Could you reproduce it with more than one data in the set to make the sum?

BTW, really nice product. I’m loving it.

Same here:

  1. MongoDB
  2. Count

I’m afraid I won’t be able to reproduce, do you use filters?

Hey guys @Florian_Le_Merrer @fssantos @Artem_Nazarenko :wave:

Thank you for reporting this issue!

Similarly to @Arnaud_Moncel I was not able to reproduce this issue easily :thinking:

Can one of you provide me his model definition used for the buggy chart and the chart definition (a screenshot of the Forest chart editing view for instance, to see the filters, the timeframe…)?
Hopefully I’ll be able to reproduce with those elements :pray:


Hi @adriguy,

Here is my model:

const schema = mongoose.Schema({
  'accessToken': String,
  'achievements': [Number],
  'contactInfo': Boolean,
  'createdAt': Date,
  'deviceToken': String,
  'division': Number,
  'firstName': String,
  'firstNameEdited': String,
  'gender': Number,
  'lastName': String,
  'lastNameEdited': String,
  'picture': String,
  'pictureEdited': String,
  'role': String,
  'socialId': String,
  'vkontakteSocialId': String,
  'facebookSocialId': String,
  'appleSocialId': String,
  'googleSocialId': String,
  'socialToken': String,
  'updatedAt': Date,
  'wpp': Number,
  'youtube': {
    'access_token': String,
    'refresh_token': String,
    'scope': String,
    'token_type': String,
    'expiry_date': Number,
}, {
  timestamps: false,

I mentioned now there is timestamp: false in my schema definition. I tried to change it to true and got the same broken chart.

Also I started to use timestamps created_at and updated_at not from the very beginning. So I have some documents in my DB with empty created_at. Maybe it can affect the chart somehow? But charts worked at the beginning and stopped working suddenly without any changes from my side.


@Artem_Nazarenko thanks for sharing this. I am still not reproducing it using your model…

Could you please share how do you generate your createdAt and updatedAt timestamps (and what are their format)?
Why don’t you just use the mongoose option timestamps: true rather than defining those fields yourself?


Here is a timeline of what happened:

  1. Before I started to use Forest I created schemas for my backend without the option timestamps: true. Because of it first documents on my platform were created without createdAt / updatedAt fields

  2. After some time I realised that I need to add this option to my schemas. So after I added it all new documents are created with these fields createdAt / updatedAt.
    Now I have a mix of documents in my database: most of them are with createdAt field, but some of them without it.

In my DB createdAt is stored like this:
"createdAt" : ISODate(“2020-06-10T05:50:04.817Z”),

  1. Then I started to use Forest and charts worked well. But Forest (lumber?) auto-generated schemas based on my database with timestamps: false. Don’t know why. This schema I sent to you was generated by Forest and deployed separately from my backend on another server.

  2. And recently charts stopped working.

Best Regards,

Hi everyone,

New challenger here, but I’m not able to reproduce either (Tested with MongoDB, Count, fa-express-mongoose 5.2.0, with some records having created at, some that does not) … :confused:

Could one of you share a screen of the associated HTTP call related to the failing charts ? To ease the search of the original issue, that would really help to make sure that the HTTP call related to the charts data contains expected results.

Moreover, could you @Florian_Le_Merrer & @fssantos confirm that you are running a similar setup ?
Also please provide any informations that could be relevant for the issue (I know most of you already did, but still, any piece of informations might help to find the issue), that would greatly help :pray:

1 Like

Hello same problem here, it only does it on one of my projects, the others work well. I tried to update forest and mongosse but nothing helps

Hello, here is an example of response that the panel receives


I’m digging through this. I found a potential issue that could lead to this behavior but I’m still not able to reproduce. Will keep you updated if I found something

Ok, we finally manage to reproduce the issue :pray:
The team will work on a fix, and will post once resolved & released!

Thanks for the help here! :smiley:


Thank you very much for digging into it.

Do you have an idea of an estimated timeframe for resolution ? It is a matter of days or weeks ?

Thanks again

Hey :wave: @Florian_Le_Merrer, @fssantos, @Artem_Nazarenko, @nicobas a fix was released.
Let us know if your issue persist.