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

Message ListMessage List     Post MessagePost Message

  Chart title with dotted Underline
Posted by Dams on May-21-2012 15:22
Is there anyway to add Chart title with dotted underline. I am using the following syntax for setting the underline
TextBox tb2 = c.addTitle("<*underline=1*> Title Here");
But i want how to add dotted underline. Please help me.

  Re: Chart title with dotted Underline
Posted by Peter Kwan on May-22-2012 01:31
Hi Dams,

After some test, I have come up with the following code, in which the text and the underline can be configured independently:

//add text at the top center to act as title
ChartDirector.TextBox t = c.addText(c.getWidth() / 2, 0, "Title Here", "bold", 10, 0x000000, Chart.Top);
t.setMargin(0);

//add underline to the text
c.addText(c.getWidth() / 2, 0, "<*underline=1*><*advanceTo=" + t.getWidth() + "*>", "bold", 10, c.dashLineColor(0xff0000), Chart.Top);

Hope this can help.

Regards
Peter Kwan

  Re: Chart title with dotted Underline
Posted by Dams on May-22-2012 13:36
Its working. Thank you very much