MSChart CustomLabel with superscript

25 views Asked by At

Consider the value on Y-Axis is 10^-5 and I want to format it to 10-5 with the following code:

var yFormatted = "10^-5";
var yFormatted_Split = yFormatted.Split('^');
var pow = yFormatted_Split[0];
var exponent = yFormatted_Split[1];
var superscript = $"\xB{exponent}";

yFormatted = $"{pow}{superscript}";

chart_RawData_IVCurve.ChartAreas[0].AxisY.CustomLabels.Add(pt.YValues[0] - 0.1, pt.YValues[0] + 0.1, yFormatted);

Seems like not working, does MSCHART CustomLabels supports unicode? Or my unicode for superscript is incorrect?

Thanks.

0

There are 0 answers