|
How to resize chart dynamically |
Posted by Sai on Nov-08-2012 21:20 |
|
I wanted to resize the chart but I am getting dimension which I set initially.
XYChart *c = new XYChart(NewWidth, NewHeight, 0xffffff, 0xaaaaaa);
Is there any API to change dimension dynamically. |
Re: How to resize chart dynamically |
Posted by Sai on Nov-08-2012 21:26 |
|
Just extension to above thread I am writing application in MFC. |
Re: How to resize chart dynamically |
Posted by Peter Kwan on Nov-09-2012 00:10 |
|
Hi Sainath,
By "resizing", I assume you mean reszing a chart like in the Windows Performance Monitor (enter "perfmon"), In the Windows Performance Monitor, when the chart is resized, the font size and the line width will not change - the font size and the line width stays the same. Instead, the labels on the axis will change to show more or less details. This is what most people expect when a chart resizes.
In ChartDirector, if the chart has not yet been drawn (it is not set to the CChartViewer and no "makeChart" method is called), you may use BaseChart.setSize to change the chart size. However, if you have already drawn the chart, then you would need to create a new chart object to draw the chart in another size to show more or less details.
Regards
Peter Kwan |
Re: How to resize chart dynamically |
Posted by Sai on Nov-09-2012 21:39 |
|
Thanks Peter. I had forgot to call updateViewPort(1,1).
God Bless You:) |
|