Hi Techsoft,
The chart will update if your code draw the chart with updated data.
Have you verified that your code was executed after you had modified your database? If
you change the database, but do not execute the charting code, the chart will not be
modified. Note that accessing the PHP page from a browser does not necessarily mean the
code will be executed. For example, if your code is using the same URL for the new and
old chart, the browser can use browser cache instead of executing the PHP page. To verify
if this is the cause of the problem, please include a timestamp in the chart (eg. as part of
the chart title) that can show the current hh:nn:ss. You can then use the timestamp to
verify if your code is being executed.
If the issue is caused by browser cache, you may try:
(a) Not to use the same URL for the new and old charts. For example, you may append the
current time URL as a dummy query parameter. In this case, the URL created at different
time will be different because of the different query parameter.
(b) Configure the PHP page to be non-cachable. You may google for ?PHP cache control?
for details.
Hope this can help.
Regards
Peter Kwan |