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

Message ListMessage List     Post MessagePost Message

  Adjust charts heigth by vertical scrolling
Posted by Jean-Luc on Feb-16-2016 23:38
Attachments:
Hello Peter,
I'm using VB6 on Windows 7 and ChartDir 6.0 for ASP/COM/VB.
On a form like the "Interactive Financial Chart" demo, I'd like to be able to adjust charts' relative heights as described below:
By clicking in the area between RSI chart and the main chart and scrolling down, the height of RSI chart would be increased according to mouse's position and the the height of the main chart would be reduced of the same amount. Mouse pointer would be changed in this area.
Similar behaviour expected when clicking between the main chart and the MACD chart.

Is there anything already existing to implement this?

Thanks in advance,
Jean-Luc
ChartDir demo2.jpg

  Re: Adjust charts heigth by vertical scrolling
Posted by Peter Kwan on Feb-17-2016 02:42
Hi Jean-Luc,

I have seen a few of our clients doing something similar, but I do not have the code or example myself.

The method is as follows. In the mouse down event, your code first detect if it is clicking on the gap in between the charts. Then when the mouse moves, your code can compute how far it has moved, and redraw the chart with the size adjusted by the same amount. Ideally, instead of directly redraw the chart in the mouse move event handler, your code can save the new chart size in a member variable, trigger a "ChartViewer.updateViewPort" event, and the chart be redrawn in the "ChartViewer.ViewPortChanged" event handler. This would usually make the user interface smoother.

Regards
Peter Kwan

  Re: Adjust charts heigth by vertical scrolling
Posted by Jean-Luc on Feb-21-2016 17:11
Thanks for that Peter, I will strive to do it   :-)