Bug in axes / chart editor

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Uli
Newbie
Newbie
Posts: 80
Joined: Thu Apr 22, 2010 12:00 am

Bug in axes / chart editor

Post by Uli » Wed Jul 14, 2010 1:19 pm

Hi,

just found another bug in chart editor. It makes work extremly hard. The first image shows the initial state after showing the axis editor and selecting the x axis:
test5.JPG
test5.JPG (48.26 KiB) Viewed 6546 times
The following image represents the situation after only one click on the labels tab:
test6.jpg
test6.jpg (49.07 KiB) Viewed 6548 times
Obviously, by only changing the active tab page the formate string has been changed. That's terribly and highly confusing for the end user!

I assume you will get the same situation by using an empty project and data values in the same x values range.

What to do?

BTW: Is there a possibility to select the active axis by code? For instance, double click on the x axis should open the editor with x axis ready to format. Preferably, the other axis could be invisible.

Uli

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

Re: Bug in axes / chart editor

Post by Yeray » Thu Jul 15, 2010 10:07 am

Hi Uli,
Uli wrote:Obviously, by only changing the active tab page the formate string has been changed. That's terribly and highly confusing for the end user!

I assume you will get the same situation by using an empty project and data values in the same x values range.

What to do?
I'm trying to reproduce it with the following code but I can't. I'm probably missing some relevant setting, do you see what?

Code: Select all

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;

            Steema.TeeChart.Styles.FastLine fast1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);

            Random r=new Random();
            fast1.Add(-1.276*0.0000001, r.Next(100));
            for (int i = 1; i < 10000; i++)
            {
                fast1.Add(fast1.XValues[i-1] + 0.01, fast1.YValues[i-1] + r.Next(10) - 4.5);
            }

            tChart1.Axes.Bottom.Labels.ValueFormat="#E+00";
        }
Uli wrote:BTW: Is there a possibility to select the active axis by code? For instance, double click on the x axis should open the editor with x axis ready to format. Preferably, the other axis could be invisible.
You could do it as follows:

Code: Select all

        void tChart1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (tChart1.Axes.Bottom.Clicked(e.X,e.Y))
            {
                Steema.TeeChart.Editors.AxisEditor editor1 = new Steema.TeeChart.Editors.AxisEditor();
                editor1.Axis = tChart1.Axes.Bottom;
                editor1.ShowDialog();
            }
        }
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

Uli
Newbie
Newbie
Posts: 80
Joined: Thu Apr 22, 2010 12:00 am

Re: Bug in axes / chart editor

Post by Uli » Thu Jul 15, 2010 11:59 am

Hi Narcis,
You could do it as follows:
Thanks, I have overlooked that there is an AxisEditor Besides AxesEditor...
I'm trying to reproduce it with the following code but I can't. I'm probably missing some relevant setting, do you see what?

Code: Select all

tChart1.Axes.Bottom.Labels.ValueFormat="#E+00"
Without the code line above you will get a x axis which looks like in test6.jpg. In order to come to an axis scale as in test5.jpg you can use in the axis editor an empty format string or "g". If you choose the empty string the things occur as described in my former message. So I did yesterday. I just figured out that with "g" the things are OK. So the chart editor should use "g" in the case of an empty format string.

Best regards

Uli

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

Re: Bug in axes / chart editor

Post by Yeray » Fri Jul 16, 2010 7:46 am

Hi Uli,

What I've reproduced and added to the defect list to be fixed in future releases (TF02015032) is the following:

With the code below, you can see something like when the application starts:
first.png
first.png (39.16 KiB) Viewed 6520 times
Then, if you open the editor and go to the Chart\Axes (Bottom Axis)\Labels, the bottom axis labels change to this:
second.png
second.png (41.35 KiB) Viewed 6519 times
Code:

Code: Select all

        private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;

            Steema.TeeChart.Styles.FastLine fast1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);

            Random r = new Random();
            fast1.Add(-1.276 * 0.0000001, r.Next(100));
            for (int i = 1; i < 10000; i++)
            {
                fast1.Add(fast1.XValues[i - 1] + 0.01, fast1.YValues[i - 1] + r.Next(10) - 4.5);
            }

            tChart1.Axes.Bottom.Labels.ValueFormat = "";

            tChart1.DoubleClick += new EventHandler(tChart1_DoubleClick);
        }

        void tChart1_DoubleClick(object sender, EventArgs e)
        {
            Steema.TeeChart.Editor edit1 = new Steema.TeeChart.Editor(tChart1);
            edit1.ShowModal();
        }
Could you please confirm this is what you've noticed?
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

Uli
Newbie
Newbie
Posts: 80
Joined: Thu Apr 22, 2010 12:00 am

Re: Bug in axes / chart editor

Post by Uli » Tue Jul 20, 2010 5:36 am

Hi Yeray,

yes, I think.

Best regards

Uli

Post Reply