Superscript/subscript

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
keith20mm
Newbie
Newbie
Posts: 6
Joined: Fri Jan 20, 2012 12:00 am

Superscript/subscript

Post by keith20mm » Thu Feb 02, 2012 7:47 pm

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?

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Superscript/subscript

Post by Yeray » Mon Feb 06, 2012 11:56 am

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).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply