Page 1 of 1

Superscript/subscript

Posted: Thu Feb 02, 2012 7:47 pm
by 17061365
I'm needing to show the chart title as a string containing superscripts and/or subscripts.

I'm able to set any typical Android EditText value as:

EditText myEditText=new EditText(this);
String with="x<sub>3</sub>";
myEditText.setText(Html.fromHtml(with));
..and the editText correctly displays x with a subscript of 3.

However
chart.getHeader().setText(Html.fromHtml(with));

will not compile.

Is there some means of using the fromHtml function (Spanned CharSequence) to display the chart title?

Re: Superscript/subscript

Posted: Mon Feb 06, 2012 11:56 am
by yeray
Hi Keith,

The texts in labels, titles, marks,... in TeeChart Java are Strings and the fromHtml function is returning an Spanned.
I've added it to the wish list to be studied for next releases (TJ71016020).