05-06-2013 08:05 AM
Roberto and Luis,
Both solutions are interesting and allow a better understanding about UI refreshing in CVI.
Thank you very much for your help and suggestions !
05-06-2013 08:19 AM
@Luis
I seem to understand that this problem is related to legend update, and since in this case the legend does not changes from plot to plot, I wuould try to use a separate "inactive" graph just for legend display, and do not update the "active" graph legend in UpdateGraph ().
I mean, imagine two identical graphs one on top of the other: the lower one is updated only once at program start with a number of PlotPoint just to have the legend populated; the upper graph, without the legend, is updated periodically.
This way the system is not charged with the overhead of destroying and rebuilding an identical legend every time, and possibily the flickering effect is reduced or eliminated..
05-06-2013 08:40 AM
Hi Roberto,
I was tempted to also have some kind of fake legend. I was considering some type of canvas control in the shape of a legend. And because I wanted to avoid the messiness of needing to do customized drawing to this fake legend, I decided against it. Also, I couldn't be sure that in the real world example, the legend text wasn't changing with each update. But as I think about it some more, the text probably won't change just because there's new data in the graph, and so, as long as that's the case, then having an inactive graph with a legend under the real graph should work just fine.
Luis