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

Message ListMessage List     Post MessagePost Message

  Maintaining the drawings on the draw area when chart objects are deleted and created again
Posted by vas on Feb-18-2014 17:18
hi
    I have a chart obj., i called makechart() method to get draw area, On this draw area i
have plotted two circles. Is there any way to maintain the drawings on the draw area ,
when the chart dlg is resized (ie. delete the chart obj. &  create new chart obj with new
dimensions)


For new chart object is there a way other than calling makechart() to get draw area & plot
the same circles  ?

Regards
vas

  Re: Maintaining the drawings on the draw area when chart objects are deleted and created again
Posted by Peter Kwan on Feb-19-2014 00:33
Hi vas,

Unluckily, the only method would be to redraw the circles again.

From experience, if the code is structured correctly, then no additional code is needed,
because you can use the same code that draws the circle in the first place. The only
requirement is that your system needs to maintain the "state" of the chart - it needs to
know what is on the chart (the data, type of indicators, circles, etc) so the same code can
be used to redraw them.

You may have noticed that in the Interactive Financial Chart sample code, the "state" of
the chart (the data, and the controls) are all stored as member variables. The drawChart
method simply draws the chart based on these member variables. If you have custom
circles as well, you would need to store the information about these custom objects as well,
so that the drawChart can draw them (and redraw them).

Hope this can help.

Regards
Peter Kwan