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

Message ListMessage List     Post MessagePost Message

  Changing width of the ViewPort control
Posted by Igor on Jun-20-2016 22:53
I have ViewPortControl and ChartViewer in my QT app and I would like to change dynamically width of ViewPortControl and width/height of ChartViewer (with scaling). What methods can help me?

Thanks in advance &
best regards.

  Re: Changing width of the ViewPort control
Posted by Peter Kwan on Jun-21-2016 02:56
Hi Igor,

In charting, resizing usually means drawing another chart with more or less details, such as with more or less grid lines and labels when enlarging or shrinking the chart,  while keeping the various object size (text size, line width, margins, etc) unchanged.

To implement resizing, the usual method is just to redraw the chart with a larger or smaller size. For example, if the chart is resized when the window is resized, you may just call "drawChart" in the resize event handler. In the drawChart method, instead of using a fixed size for the charts, you may use a size that is deriving the size from the window.

Hope this can help.

Regards
Peter Kwan