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

Message ListMessage List     Post MessagePost Message

  How to adjust plot area base on data
Posted by zudeng on Jan-16-2018 18:00
Attachments:
Hi All,

I often set the plotarea at (50, 50), but sometimes data if very large so 50 pixel not enough to display the large data label in y axis.

Like attachment, correct label should be "119.8689", but it looks like "19.8689"

Is there any way to adjust plotarea base on current data or fullRange?

Thanks,
zudeng
pic-example.png

  Re: How to adjust plot area base on data
Posted by Peter Kwan on Jan-16-2018 23:21
Hi zudeng,

You can use setPlotArea to provide an initial position and size for the plot area (you can use (50, 50) for your case). After entering all the data and configuring the chart, you can use XYChart.packPlotArea to adjust the plot area so that the axis labels will stay inside a given region. See:

http://www.advsofteng.com/doc/cdcpp.htm#XYChart.packPlotArea.htm

An example is at:

http://www.advsofteng.com/doc/cdcpp.htm#markbar.htm

Hope this can help.

Regards
Peter Kwan

  Re: How to adjust plot area base on data
Posted by zudeng on Jan-17-2018 19:01
Hi Peter,

That's what I want, thank you very much!

zudeng