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

Message ListMessage List     Post MessagePost Message

  chart.packPlotArea() cuts scale label.
Posted by Peter Keresztes on Feb-01-2012 23:46
Attachments:
Hello!

It seems that packPlotArea() does not work as I have expected. It cuts the label at the bottom left corner.
My code to set the effective plot area is:

chart.packPlotArea( chartMarginLeft, chartMarginTop + getTitleBoxHeight(), chart.getWidth() - getLegendBoxWidth() - chartMarginRight, chart.getHeight() - getTitleBoxHeight());

Setting a larger left margin could solve that problem, but I'd like to avoid that since it is a waste of plot area.

Please can you give me a hint how this can be solved?

Thx,
Peter
chart.jpg

  Re: chart.packPlotArea() cuts scale label.
Posted by Peter Kwan on Feb-02-2012 01:38
Hi Peter,

Unluckily, there is a limitation to the packPlotArea that it cannot prevent the horizontal axis labels to overflow on the left or right sides, or vertical axis labels to overflow on the top or bottom sides.

For your case, I suggest you may simply rotate the labels by 90 degrees (instead of 45 degrees). In this way, the labels on the horizontal axis cannot overflow on the left and right sides, and packPlotArea will handle the bottom side.

If you must rotate the labels by 45 degrees, you may consider setting a larger left margin. It may not waste too much plot area space, so long as the margin is not excessively large. If packPlotArea can handle horizontal overflow for horizontal axis labels, it would set a larger left margin to avoid overflow too.

Regards
Peter Kwan