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

Message ListMessage List     Post MessagePost Message

  how to set margin between a title and the chart
Posted by Michael on Mar-31-2013 14:20
HI,

I have a title but it is touching the plot area.

How can I set a gap / margin so the title will float about 10 px above the plot area?

thx

  Re: how to set margin between a title and the chart
Posted by Peter Kwan on Apr-01-2013 22:50
Hi Michael,

If you use addTitle to add the title to the top, by default, the title is touching the top. You should not move the title upwards as it will then move outside the chart. So for your case (assuming you cannot change the title font), you may move the plot area downwards.

Several sample code in ChartDirector uses Box.getHeight to get the height of the title, and set the plot area position according. For example, the "Gradient Bar Chart" sample code sets the plot area so that it is 25 pixels from the title (by setting the plot area top position to title.getHeight() + 25). May be you can use it as a reference.

Hope this can help.

Regards
Peter Kwan