Page 1 of 1

Getting a ? in the axis title for a superscript unicode char

Posted: Wed Apr 27, 2011 4:46 pm
by 9641422
Hi,

I want a superscript number in the axis title of the graph.

for example : writing meter cube (with 3 in superscript)

I was able to do get 3 in superscript with the help from one of your post by using a superscript unicode character "\u00b3" for 3.
but, when I do it for superscript number 6 & 9 using their respective superscript unicode characters \u2076 & \u2079. I get a question mark (?) on the axis title instead.

Can you please tell why is this happening and how can fix this.

Thanks,

Re: Getting a ? in the axis title for a superscript unicode char

Posted: Thu Apr 28, 2011 11:03 am
by 10050769
Hello Amol,

Could you send us a simple project so we can reproduce exactly your problem here?

Thanks,

Re: Getting a ? in the axis title for a superscript unicode char

Posted: Thu Apr 28, 2011 5:41 pm
by 9641422
Please see the attachment "Example.JPG" for an output of the following code that I see on my PC.

Code: Select all

// GRAPH 1

bAxis=axes.GetRight();
CAxisTitle	btitle=bAxis.GetTitle();
if(theApp.iOutOPUnit==0 && (flag==1))
btitle.SetCaption("Gas Rate (10\u00b3 sm\u00b3/d)"); //exponent 3 works fine with a unicode character \u00b3 in caption, can be seen circled in Graph 1 in //the attachment

//GRAPH 2
bAxis=axes.GetLeft();
btitle=bAxis.GetTitle();
if(theApp.iOutOPUnit==0 && (flag1==2))
btitle.SetCaption("Oil Water Cumulative (10\u2076 sm\u00b3)"); // exponent 6 shows a "?" with unicode charater \u2076 in caption as seen circled in Graph 2 in attachment Example.JPG
Any help will be really appreciated

Thanks,

Re: Getting a ? in the axis title for a superscript unicode char

Posted: Fri Apr 29, 2011 10:57 am
by 10050769
Hello Amol,
Please, could you tell us which version of TeeChart are you using? On the other hand, I have made next simple example using last TeeChart.Net version an works as I expected here:

Code: Select all

    public Form1()
        {
            InitializeComponent();
            InitializeChart();
        }
        private void InitializeChart()
        {
            Steema.TeeChart.Styles.Line line = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            line1.FillSampleValues();
            line.FillSampleValues();
            line1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Right;
            tChart1.Axes.Left.Title.Visible = true;
            tChart1.Axes.Left.Title.Text = "Gas Rate (10\u00b3 sm\u00b3/d)";
            tChart1.Axes.Right.Title.Visible = true;
            tChart1.Axes.Right.Title.Font.Size = 12;
            tChart1.Axes.Right.Title.Text = "Oil Water Cumulative (10\u2076 sm\u00b3)";
            
        }
Could you tell if previous code works fine to you?

Thanks,

Re: Getting a ? in the axis title for a superscript unicode char

Posted: Mon May 02, 2011 3:53 pm
by 9641422
Hi Sandra,

Thanks for the reply. I am using version 7 of Teechart. Will try using the code that you've sent and let you know if it works.

Thanks,