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

Message ListMessage List     Post MessagePost Message

  Multicharts c++ - Changing Positions of charts
Posted by Sal on Jul-21-2016 02:10
Hi Peter,

I noticed the MultiChart class has methods to get the xOffset + yOffset of a chart for the outermost container (getAbsOffsetX() + getAbsOffsetY())

Q1: due to my application requirements, I would like to shift the position of one of the charts to the right, since the charts I am showing have no immediate and common relationship in between them

It is not obvious to me..., How do I do that ?
I do not see a "set...." method

Q2: Assuming the chart has been moved...
Will the right size of the moved chart stay inside the right Container border on its own or I need to right specialized code that resizes the moved chart ?

Q3: Is there an easy way to supply a minimum vertical programmable separation in between the charts (in pixels) ?

Thanks

Sal

  Re: Multicharts c++ - Changing Positions of charts
Posted by Peter Kwan on Jul-21-2016 13:54
Hi Sal,

If you are using a MultiChart, the chart position is always specified by your code when it calls "MultiChart.addChart" to add the chart to the MultiChart. If you want to shift the chart to the right, please use a larger x-coordinate when adding the chart to the MultiChart. If you would like to move the chart downwards (so that there is a separation between the chart and the chart above), please use a larger y-coordinate when adding the chart to the MultiChart.

The size of the chart is specified by your code when you created it. For example, if you use "new XYChart(600, 400)", the size of the chart will be 600 x 400. If you move the chart to the right (or move it to anywhere), the size is still 600 x 400, as ChartDirector will always draw accurately according to the size you specified. If your MultiChart is not large enough to contain the XYChart, parts of the XYChart may fall outside the MultiChart.

If you want to use a small size for the XYChart, please use a smaller size to create the XYChart.

Hope this can help.

Regards
Peter Kwan