Can it be that my computer is to 'fast' or 'slow' for the grDraw functions?
Based on a query (results in an array) I fill the same Charts with new data (from the array per area) and generate these Charts so I can export it as an image.
Both charts (1x Barchart, 1x Polarchart) are on the same window.
I have already put in a wait (waitRedraw) of 1s after my grDraw
so Processes is:
BarChart
DeleteAll
AddData
BarColor
Chart.Title
Chart.Draw
waitRedraw 1s
Chart.SaveBMP
PolarArea
DeleteAll
Add CategoryLabel
AddData
Chart.Title
Chart.Draw
waitRedraw 1s
Chart SaveBMP
When I do it in debug (with hold at the point saveBMP) or with a manual confirm after each generating (so after generating I give a popup an ask do you want the next one) the correct values/titles are shown
When I let the program run as a kind of batch process (uses same code just no manual confirm after each generated set of charts) at a certain point the program doesn't update f.e. the title in time (so the title of the old chart is repeated or empty if I reset all vars before)
Used HW
Physical Machine
Intel I9 - 2,8 ghz
RAM 64 Gb
NVIDIA Quadro P400
off-course I can make my wait statement longer only when I install it on another PC it can be unnecessary
or is there a way I can optimize this in the code
kind regards,
RdJ
Windev 2024/Webdev 2024
Edited 1 time(s). Last edit at 11/30/2023 10:31AM by rdj.