ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Refresh chart
Posted by Chuck on Feb-01-2020 02:09
Hi Peter,

What is the most efficient (complete) way to refresh a Chart?

I have multiple charts (same symbol different timeframes) that I create Trendlines on and then copy the Trendline to each Chart. I’m having trouble with the newly copied Trendlines displaying initially... what can you recommend?

Thank you,
Chuck

  Re: Refresh chart
Posted by Peter Kwan on Feb-02-2020 16:37
Hi Chuck,

I assume you have changed something in the chart, and you want to update the display.

When you add things to the chart, you code would need to tell ChartDirector to update the display. It is because ChartDirector cannot know if your code have finished adding things to the chart, or if there are more things to be added. So your code must tell ChartDirector when it can update the display.

You can update the display either by assigning a new chart to the WinChartViewer, or by calling viewer.updateDisplay().

You may refer to our realtime chart sample code, such as "Realtime Chart with Track Line (Windows)", which demonstrates updating the chart display using these methods.

Regards
Peter Kwan

  Re: Refresh chart
Posted by Chuck on Feb-03-2020 02:34
Thank you Peter.