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

Message ListMessage List     Post MessagePost Message

  Regarding Zooming & scrolling
Posted by Sai on Nov-07-2012 22:06
I am writting application in MFC and using ChartDirector library.
My Xaxis contains Strings and Y axis contains number. I want to know how do I zoom my chart & how do I add scrolling to my chart

  Re: Regarding Zooming & scrolling
Posted by Peter Kwan on Nov-08-2012 00:30
Attachments:
Hi Sainath,

Zooming and scrolling is very simple for a label based x-axis. You just need to pass the selected data to the chart. There is no need to compute the x-axis scale, as they are labels. (Labels are considered to be like names. They are for human reading and have no meaning to the code.)

I have attached an example based on the "Zooming and Scrolling with Track Line (1) (MFC)" sample code, modified to use a label based x-axis. To try them, please put the above two files in the directory for the
"Zooming and Scrolling with Track Line (1) (MFC)" sample code, replacing the existing files there. Then you can use Visual Studio to compile and try the code.

Hope this can help.

Regards
Peter Kwan
zoomscrolltrackDlg.cpp
zoomscrolltrackDlg.cpp

18.92 Kb
zoomscrolltrackDlg.h
zoomscrolltrackDlg.h

2.03 Kb

  Re: Regarding Zooming & scrolling
Posted by Sai on Nov-08-2012 21:18
Thanks a lot Peter:)