Rello / analytics

Analytics - Open source data warehouse and reporting for Nextcloud
GNU Affero General Public License v3.0
116 stars 32 forks source link

broken graph with two data loads since version 4.11.0 #373

Closed mf8hd closed 5 months ago

mf8hd commented 1 year ago

I have a dataset with two data loads, both HTML grabbers with "timestamp of dataload" set to yes. Dataset

In Analytics version 4.10.0 the line graph look good, but since the update to version 4.11.0 the graph looks like this: Line Graph

When I change the graph style to "bar graph" it looks like this: Bar Graph

I think there is something wrong with the cronological sort order of the second data row. The data point of the second data row, that are shown after the last data point of the first data row should fill in the gabs of the second data row. Bar Graph X Axis

I have reset the data collection after the update to version 4.11.0, but nothing changed.

Rello commented 1 year ago

Hi, thank you for the report. I will check where the sorting got lost...

Rello commented 1 year ago

Hi, can you export the report and drop me the file here: https://home.scherello.de/owncloud/s/FdwAJ52FkxTa7cm

I tried and I could not reproduce. what is the time format you are adding?

mf8hd commented 1 year ago

The report works fine if i use chart type "timeline" but does not work if i use chart type "line". (I uploaded the reports and sample data.). If thats the intended behaviour then it's ok with me.

Thank you for your great work!

Rello commented 1 year ago

Hi, this is the point: bar chart will not work unless you load the data with exact the same timestamp. then they can be grouped. but this will not work in this case because the data loads run with some seconds apart. See this example. I added a line manually with the same timestamp and it works to combine both Bildschirmfoto 2023-10-18 um 19 24 25

using the normal line will also not solve the problem, because it will look plain at the values and not evaluate them as datetime. then it will plot them in the sequence received. but what should work is the timeline chart. can you confirm this?

one hint: with using {"scales": {"xAxes": {"time": {"unit" : "day"}}}} in the chartoptions will make the x-axis look better...