superscript axis labels

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
User avatar
vrmitch
Posts: 21
Joined: Thu Oct 09, 2014 6:19 pm

superscript axis labels

Post by vrmitch » Wed Apr 01, 2015 3:15 pm

Hello,

When we format axis labels to a string representing a number with a superscript exponent, the spacing and exponent can sometimes render strangely. Sometimes there will be a space between exponent characters, sometimes labels will seemingly have extra spaces after them, and in the end it just looks wonky. The BatangChe font is a quick example.

I've attached a screen snip as an example.

**Update: I should emphasize that this is with certain fonts - a lot of them actually. BatangChe is just one example.
Attachments
Screen snip of issue
Screen snip of issue
snip.PNG (3.81 KiB) Viewed 6552 times

User avatar
ArctionLasse
Posts: 26
Joined: Fri Mar 27, 2015 11:23 am

Re: superscript axis labels

Post by ArctionLasse » Thu Apr 02, 2015 7:19 am

I'm afraid that the problem is that the used font does not support all of the used characters. As a result the system falls back to using some other font, that contains the given characters. As the characters can be of different shape & size, the result can be a bit erratic. This is an internal operation of the underlying font rendering system, and can not be easily controlled.

I'd suggest that you try to find a font that has all the required characters defined.

In the case of BatangChe, the missing superscript numbers are 0, 5, 6, 7, 8 and 9. On MS Word 2010 the font used for the missing numbers seems to be MS Mincho. The numbers from 1 to 4 exist in the BatangChe font, but are defined so that they take a lot of empty space on their right side.

The existence of the characters in a given font can be easily checked using an editor like Word or Windows Character Map software.

The following image shows a sample text of super- and subscript numbers rendered by Word and LightningChart Ultimate, using the BatangChe font. The Character map shows part of the fonts unicode table at position of 0x2081, where subscript numbers ought to begin. The font contains definition only for numbers 1, 2, 3 and 4.
Attachments
Rendering results of the super- and subscript numbers on MS Word and LightningChart Ultimate.
Rendering results of the super- and subscript numbers on MS Word and LightningChart Ultimate.
charset_sample.png (96.45 KiB) Viewed 6539 times
LightningChart Support Team, LV

User avatar
vrmitch
Posts: 21
Joined: Thu Oct 09, 2014 6:19 pm

Re: superscript axis labels

Post by vrmitch » Fri Apr 03, 2015 11:58 am

You are absolutely correct! I've restructured the program to replace the scientific notation superscripts with a caret ^.

Thank you much!

Post Reply