RecordCount property of the dataset does not respect filter.
Unfortunately, Delphi developers declared that this will not change.
Implemented a quick-and-dirty workaround in r37040.
Now your demo display is correct. However, the chart will still
run through the whole dataset to extract filtered points.
Thank you very much, gonna test it out.
For large datasets, it is much more efficient to use SQL for filtering.
It most certainly is, but I expect to execute about 25 - 30 SQL queries (once it's all done) each time a software user switches between different user profiles. I use SQLite3, and data access costs time, thus, I need to shift some of the work to Lazarus. After all, it's just a school project, and I don't expect it to release it to public any time soon.
P.S. What FPC/Lazarus verison are you using?
The demo you posted did not compile under FPC 2.6.
I am using 2.4.2. I thought it would upgrade automaticly, when I installed latest Lazarus version. Apparently, it didn't. Gonna figure it out now.
P.P.S. User code is not supposed do call ChartSeries.Draw directly.
(In your case, you should not even call Chart.Refresh. Chart will be notified
of changes by the dataset and refresh itself).
Oh? Well when I didn't call those two, nothing happened to the chart. I'll see how it works with the lastest Laz revision.
Thank you very much for your help, Ask. Hopefully no more obstacles to come
.