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:
The following image represents the situation after only one click on the labels tab:
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
Bug in axes / chart editor
Re: Bug in axes / chart editor
Hi Uli,
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?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?
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";
}
You could do it as follows: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.
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,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Bug in axes / chart editor
Hi Narcis,
Best regards
Uli
Thanks, I have overlooked that there is an AxisEditor Besides AxesEditor...You could do it as follows:
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.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"
Best regards
Uli
Re: Bug in axes / chart editor
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: Then, if you open the editor and go to the Chart\Axes (Bottom Axis)\Labels, the bottom axis labels change to this: Code:
Could you please confirm this is what you've noticed?
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: Then, if you open the editor and go to the Chart\Axes (Bottom Axis)\Labels, the bottom axis labels change to this: 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();
}
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Bug in axes / chart editor
Hi Yeray,
yes, I think.
Best regards
Uli
yes, I think.
Best regards
Uli