Makes sense! Plotly draws records in the order it encounters them in your data set. Initially the data gets split by your grouping field so your one table becomes two:
Blue
time |
mintime |
category |
value |
20-Jan |
31/01/2020 00:00 |
Blue |
- |
20-Apr |
17/04/2020 10:46 |
Blue |
6.04 |
20-May |
1/5/20 10:23 |
Blue |
18.5 |
20-Jun |
1/6/20 9:43 |
Blue |
8.43 |
20-Jul |
1/7/20 6:38 |
Blue |
17.2 |
20-Aug |
3/8/20 6:56 |
Blue |
16 |
20-Sep |
1/9/20 7:11 |
Blue |
8.56 |
Red
time |
mintime |
category |
value |
20-Feb |
14/02/2020 17:33 |
Red |
1.43 |
20-Mar |
2/3/20 12:25 |
Red |
6.33 |
20-May |
5/5/20 7:07 |
Red |
1.2 |
20-Jun |
4/6/20 7:00 |
Red |
2.19 |
20-Sep |
18/09/2020 08:58 |
Red |
1 |
Then it begins drawing bars by your X-axis field. It sees the first date is January 2020 and draws that blue bar (it’s invisible here because the value is 0). Then it checks the other group table(s) for records in January 2020. Seeing none, it goes to the next record in blue. And so on…
After this it starts going through the next group: Red. It sees a record in February 2020. This is the first time Plotly saw this date. So it adds it to the end of the chart and checks the other group(s) for records from this date. And so forth.
To fix it: select your dates and JOIN the blue and red data off of them. Then UNION the two sets. So that you have a natural, uninterrupted, repeating set of dates like so:
time |
category |
mintime |
value |
2020-Jan |
Red |
|
|
2020-Jan |
Blue |
31/01/2020 00:00 |
0 |
2020-Feb |
Red |
14/02/2020 17:33 |
1.43 |
2020-Feb |
Blue |
|
|
2020-Mar |
Red |
2/3/20 12:25 |
6.33 |
2020-Mar |
Blue |
|
|
2020-Apr |
Red |
|
|
2020-Apr |
Blue |
17/04/2020 10:46 |
6.04 |
2020-May |
Red |
5/5/20 7:07 |
1.2 |
2020-May |
Blue |
1/5/20 10:23 |
18.5 |
2020-Jun |
Red |
4/6/20 7:00 |
2.19 |
2020-Jun |
Blue |
1/6/20 9:43 |
8.43 |
2020-Jul |
Red |
|
|
2020-Jul |
Blue |
1/7/20 6:38 |
17.2 |
2020-Aug |
Red |
|
|
2020-Aug |
Blue |
3/8/20 6:56 |
16 |
2020-Sep |
Red |
18/09/2020 08:58 |
1 |
2020-Sep |
Blue |
1/9/20 7:11 |
8.56 |