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 |