biigle / core

:large_blue_circle: Application core of BIIGLE
https://biigle.de
GNU General Public License v3.0
13 stars 15 forks source link

Fill empty months in timeline chart #897

Closed mzur closed 2 months ago

mzur commented 3 months ago

https://github.com/biigle/core/pull/893 changed the x-axis of the timeline chart from years to months. This makes it more likely that there are gaps between months where no annotations were created. These are currently ignored, so there may be non-consecutive months displayed on the x-axis. If a month is empty, fill it in the plot so the x-axis is consecutive again.

mzur commented 2 months ago

I see an error with the chart on biigle.de. I didn't see this locally. @dlangenk can you investigate?

dlangenk commented 2 months ago

I also see the error in the live version, but I'm pretty sure it wasn't there locally. I'll have a look.

dlangenk commented 2 months ago

I think I figured out where the error is coming from.... but It should not be there.

This is a line I changed in #893. https://github.com/biigle/core/blob/7f3cefe39bf08a0a21f523afd818038f25c88a90/resources/assets/js/projects/components/charts/timelinePlot.vue#L87

I now get this error that t.year is undefined. image

Is this a different position? But there is no occurence of year.toString in the core repo. I also confirmed that the error is only in the live version. Caching is disabled.

mzur commented 2 months ago

Seems like the error was introduced in https://github.com/biigle/core/pull/893. Somehow the JS was not up to date in the production version. The issue is resolved with the most recent release.