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

Message ListMessage List     Post MessagePost Message

  refresh chart by layer
Posted by chang on Mar-03-2011 03:13
Hi,

I am currently using the FinanceChart. I want to draw a trend line with mouse. The trend line should be updated as mouse moves until I let go the mouse. Is it possible to draw the line layer only without having to read in the chart data and refreshing the entire chart as the mouse moves every time? It will make my chart much more reactive that way. Thanks for your help in advance!

  Re: refresh chart by layer
Posted by Peter Kwan on Mar-03-2011 12:00
Hi chang,

To achieve what you want, you do not need to draw a line layer on the chart. In fact, you do not need to modify the charting code at all.

For example, if you use a digital camera to create a photograph, and then draw a line on it, you do not need to modify your digital camera at all. You just need to use a separate tool (eg. Photoshop) to add a line.

I have seen people who developed their own "Windows Paint" graphics editor control (something like Windows Paint that allows people to draw lines, text boxes, shapes and other things on top of an image). They then use it to draw things on the charts generated by ChartDirector.

Writing a "Windows Paint" like control may take some time. In some simple cases, people may just overwrite the OnPaint event of a control to paint on the controls. See:

http://msdn.microsoft.com/en-us/library/b818z6z6.aspx

Hope this can help.

Regards
Peter Kwan

  Re: refresh chart by layer
Posted by chang on Mar-03-2011 23:43
Thanks Peter. Helps!