GeezerVison is showing github.com — Linux: "Load all data and redraw plot" button does not turn red · Issue #2001 · sqlitebrowser/sqlitebrowser
Linux: "Load all data and redraw plot" button does not turn red #2001DescriptionDetails for the issue
What did you do?
I have got a 410 MB database file of about 380,000 rows.
Among other columns, it contains a monotonically increasing timestamp ISOZEIT (in the range of 2016-12-05 15:15:00 to 2017-12-05 15:09:00, covering the range quite equally) and an integer value FFP_NR without missings.
I now sort the timestamp field (just to be sure) and create a plot with the timestamp as X and the value as Y.
What did you expect to see?
The X axis range should correspond to to the timestamp range, and all FFP_NR values should be plotted (Update 2019-09-21:) the "load all data" button should become visually emphasized.
What did you see instead?
The X axis range starts with "zero" (1970-01-01):

When I zoom into the correct X axis range, I notice that only the FFP_NR values of the beginning are displayed:

When I now slowly scroll down the Browse Data view, I see that sometimes more data is loaded from disk. This data is then also added to the plot. Here's the plot at halfway scrolling through (again with X zoom):

After fully scrolling through the data, the plot finally looks correct:

Useful extra information
What operating system are you using?
Linum Mint 19.2.
What is your DB4S version?
3.11.299-0~2578~201909162232~ubuntu18.04.1 from the Testing PPA.
Did you also
Activitychanged the title [-]Plot is missing data[/-] [+]Plot is missing data from disk[/+] on Sep 19, 2019MKleusberg commented on Sep 21, 2019 This is actually expected. Let me explain first why it's this way, then how to solve it.
The problem is that for very large tables we don't want to load all the data at once because it could take several minutes and consume more memory than the computer has. That's why only the first block of data is loaded. If you scroll down to get close to the end of that first block, the next block is loaded and so on. This way loading a table is reasonably fast. The plot takes its data from the table view. Now, if the table is only partially loaded (that's your case of course) there are two possibilities: 1) Just show the data which is already loaded, 2) Load all the data and then show it. We decided to go with option 1). The reason why we didn't choose option 2) is (if I remember correctly) that we didn't want to cause a potentially very long operation by something which from the user's point of view is just a mere visualisation of what is already there.
There are two ways to solve this. The first one is to click the button at the bottom left. It loads all data:

The other way is to avoid the partial loading of tables entirely. For this you have to click Edit -> Preferences, open the Database tab, and set the "Prefetch block size" value to a number greater than the number of rows in your table. chrisjlocke commented on Sep 21, 2019
The first one is to click the button at the bottom left. It loads all data.
No, no. The other left.... ;) Reacted by Martin Kleusberg and Robert Pollak mgrojo commented on Sep 21, 2019 This button at the bottom "left" 😉 should become red when there is data still to be fetched. This is the hint to know that the plot is incomplete. jondo commented on Sep 21, 2019 @chrisjlocke, thank you for the detailed explanation. I must confess I have never noticed this button before (and if I had, I would have interpreted the symbol as a simple "redraw", not for loading missing data).
So, I agree with @mgrojo: There should be some notification that the plot is incomplete.
Also, there is still the bug that the incomplete plot should not have those (0/0) Points added, which cause the wrong X axis range. changed the title [-]Plot is missing data from disk[/-] [+]Incomplete plot (missing data from disk) should be indicated and drawn correctly[/+] on Sep 21, 2019mgrojo commented on Sep 21, 2019 I think I've expressed it incorrectly, sorry. What I meant is that the button is expected to become red, the code is there in the software for making that. Haven't it worked for you? jondo commented on Sep 21, 2019 Ah! I don't think that worked. (I think I would have noticed the color change.) Will test on Monday. jondo commented on Sep 23, 2019 I am now testing with 3.11.299-0~2584~201909222301~ubuntu18.04.1.
The "Load all data" button has a tooltip saying "Warning: Not all data has been fetched from the table yet due to the partial fetch mechanism.", but the button never becomes red. Instead, it becomes inactive after pressing (and the chart gets completed).
Could this behavior be connected with the fact that I am using the MATE edition of Linux Mint? jondo commented on Sep 25, 2019 Should I split the "wrong lines to origin (0/0)" topic into a separate issue? mgrojo commented on Dec 7, 2020 @jondo, sorry about the late reply, but I think this last mentioned topic is now fixed. Could you confirm?
Regarding the red background of the button, it is not working for me either when I have the environment variable QT_QPA_PLATFORMTHEME set to "gtk2". Maybe a better way to give this feedback should be thought out. jondo commented on Dec 8, 2020 @mgrojo, thank you for the message. Yes, I see no more "wrong lines to origin (0/0)" in version 3.12.0-0~2756~202008212354~ubuntu18.04.1. (But still the button isn't red.) changed the title [-]Incomplete plot (missing data from disk) should be indicated and drawn correctly[/-] [+]MATE desktop: "Load all data and redraw plot" button does not turn red[/+] on Dec 8, 2020mgrojo commented on Dec 8, 2020 What says the About dialog about the Qt version? Is QT_QPA_PLATFORMTHEME set in your environment? jondo commented on Dec 8, 2020 The About dialog says Qt Version 5.9.5, and QT_QPA_PLATFORMTHEME is set to qt5ct. jondo commented on Dec 8, 2020 I have now additionally tested on another machine with Linux Mint 20 Cinnamon and could reproduce the "button not turning red" there.
The button tooltip correctly says
Warning: not all data has been fetched from the table yet due to the partial fetch mechanism.
This is now 3.12.0-0~2756~202008212354~ubuntu20.04.1 from the PPA. The About dialog says Qt Version 5.12.8, and QT_QPA_PLATFORMTHEME is again set to qt5ct. changed the title [-]MATE desktop: "Load all data and redraw plot" button does not turn red[/-] [+]Linux: "Load all data and redraw plot" button does not turn red[/+] on Dec 8, 2020mgrojo commented on Dec 8, 2020 It seems a problem in Qt with some theme settings. Can you try unsetting the QT_QPA_PLATFORMTHEME environment variable? jondo commented on Dec 9, 2020 That's it! Unsetting QT_QPA_PLATFORMTHEME makes the button correctly appear with red background.
Now I see instead of the wrong .
I guess this is something for the Qt issue tracker?
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|