We recently upgraded our systems from using your ActiveX version to the .NET version and found the following graphical error:
http://img291.imageshack.us/my.php?imag ... rorpx8.png
I can get the graphical error to disappear if I set the Frame.Visibility to false while I'm in debug mode, but if I set it in actual code (like in the InitializeComponent method) the graphical error is still present. I know that the Frame property is depricated and we don't actually use that property, I just noticed that the error disappeared when I changed its value. It could be because the chart is triggered to refresh once that value has been changed but that's what I'm hoping on that you guys will know
I'm running .NET 2.0 on Windows XP/x86 using VS2005 as dev environment by the way.
Cheers,
Erik
Graphical Error on sides of chart
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Erik,
Could you please send us a simple example project we can run "as-is" to reproduce the problem here and let us know the exact TeeChart version you are using?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Could you please send us a simple example project we can run "as-is" to reproduce the problem here and let us know the exact TeeChart version you are using?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
I figured out what was causing the graphical error, namely:
When looking at the points its getting from the chart, they seem to be ok, but line is still drawn from x=0 to the left axis position for some reason, any hints on why?
Code: Select all
private void barChart_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
barChart.Graphics3D.MoveTo(barChart.Axes.Left.Position, barChart.Axes.Left.CalcYPosValue(0));
barChart.Graphics3D.LineTo(barChart.Axes.Right.Position, barChart.Axes.Left.CalcYPosValue(0));
}
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi CAfIT,
Ok, now I see which is the problem here. You have 2 options:
1. Setting series' VertAxis to both default vertical axes:
2. Use bottom axis end position:
Ok, now I see which is the problem here. You have 2 options:
1. Setting series' VertAxis to both default vertical axes:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Styles.Line line1;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.Pointer.Visible = true;
line1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Both;
for (int i = 0; i < 10; i++)
{
line1.Add(0);
}
tChart1.AfterDraw += new Steema.TeeChart.PaintChartEventHandler(tChart1_AfterDraw);
}
void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
g.MoveTo(tChart1.Axes.Left.Position, tChart1.Axes.Left.CalcYPosValue(0));
g.LineTo(tChart1.Axes.Right.Position, tChart1.Axes.Left.CalcYPosValue(0));
}
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Styles.Line line1;
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.Pointer.Visible = true;
//line1.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Both;
for (int i = 0; i < 10; i++)
{
line1.Add(0);
}
tChart1.AfterDraw += new Steema.TeeChart.PaintChartEventHandler(tChart1_AfterDraw);
}
void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
g.MoveTo(tChart1.Axes.Left.Position, tChart1.Axes.Left.CalcYPosValue(0));
//g.LineTo(tChart1.Axes.Right.Position, tChart1.Axes.Left.CalcYPosValue(0));
g.LineTo(tChart1.Axes.Bottom.IEndPos, tChart1.Axes.Left.CalcYPosValue(0));
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |