Page 1 of 1

Bug in axes / chart editor

Posted: Wed Jul 14, 2010 1:19 pm
by 15655996
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 6599 times
The following image represents the situation after only one click on the labels tab:
test6.jpg
test6.jpg (49.07 KiB) Viewed 6601 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

Re: Bug in axes / chart editor

Posted: Thu Jul 15, 2010 10:07 am
by yeray
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();
            }
        }

Re: Bug in axes / chart editor

Posted: Thu Jul 15, 2010 11:59 am
by 15655996
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

Re: Bug in axes / chart editor

Posted: Fri Jul 16, 2010 7:46 am
by yeray
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 6573 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 6572 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?

Re: Bug in axes / chart editor

Posted: Tue Jul 20, 2010 5:36 am
by 15655996
Hi Yeray,

yes, I think.

Best regards

Uli