problem of shiffted axes synchronizing two charts
problem of shiffted axes synchronizing two charts
Hi,
I have a problem with the TeeChart component, I reproduced it in a simple prototype (see code joined).
I have two TeeCharts I want to synchronize in term of scaling.
When I zoom / unzoom in one of them, I apply the same zoom to the other one,
For this I call
{
tChart1.Axes.Left.SetMinMax(tChart2.Axes.Left.Minimum, tChart2.Axes.Left.Maximum);
tChart1.Axes.Bottom.SetMinMax(tChart2.Axes.Bottom.Minimum, tChart2.Axes.Bottom.Maximum);
}
In functions linked to TChart.zoomed event.
In general it works, but in some cases after a zoom, the left axes of my two charts are shifted. The scales are correctly synchronized, but the positions where left axes are displayed are not exactly the same.
Could you tell me if it is a known problem and how to solve it.
Thanks a lot,
Anne-Lise
//here is my code
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
for(int index=1;index<1000;index++)
{
fastLine1.Add(0.0001*index,0.0001*index);
fastLine2.Add(0.0001 * index,0.0001*index);
}
}
private void tChart1_Zoomed(object sender, EventArgs e)
{
Synchronize(tChart1);
}
private void Synchronize(Steema.TeeChart.TChart chart)
{
Bitmap bmp = chart.Bitmap;
if(chart==tChart1)
{
tChart2.Axes.Left.SetMinMax(tChart1.Axes.Left.Minimum, tChart1.Axes.Left.Maximum);
tChart2.Axes.Bottom.SetMinMax(tChart1.Axes.Bottom.Minimum, tChart1.Axes.Bottom.Maximum);
}
else
{
tChart1.Axes.Left.SetMinMax(tChart2.Axes.Left.Minimum, tChart2.Axes.Left.Maximum);
tChart1.Axes.Bottom.SetMinMax(tChart2.Axes.Bottom.Minimum, tChart2.Axes.Bottom.Maximum);
}
}
private void tChart2_Zoomed(object sender, EventArgs e)
{
Synchronize(tChart2);
}
}
I have a problem with the TeeChart component, I reproduced it in a simple prototype (see code joined).
I have two TeeCharts I want to synchronize in term of scaling.
When I zoom / unzoom in one of them, I apply the same zoom to the other one,
For this I call
{
tChart1.Axes.Left.SetMinMax(tChart2.Axes.Left.Minimum, tChart2.Axes.Left.Maximum);
tChart1.Axes.Bottom.SetMinMax(tChart2.Axes.Bottom.Minimum, tChart2.Axes.Bottom.Maximum);
}
In functions linked to TChart.zoomed event.
In general it works, but in some cases after a zoom, the left axes of my two charts are shifted. The scales are correctly synchronized, but the positions where left axes are displayed are not exactly the same.
Could you tell me if it is a known problem and how to solve it.
Thanks a lot,
Anne-Lise
//here is my code
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
for(int index=1;index<1000;index++)
{
fastLine1.Add(0.0001*index,0.0001*index);
fastLine2.Add(0.0001 * index,0.0001*index);
}
}
private void tChart1_Zoomed(object sender, EventArgs e)
{
Synchronize(tChart1);
}
private void Synchronize(Steema.TeeChart.TChart chart)
{
Bitmap bmp = chart.Bitmap;
if(chart==tChart1)
{
tChart2.Axes.Left.SetMinMax(tChart1.Axes.Left.Minimum, tChart1.Axes.Left.Maximum);
tChart2.Axes.Bottom.SetMinMax(tChart1.Axes.Bottom.Minimum, tChart1.Axes.Bottom.Maximum);
}
else
{
tChart1.Axes.Left.SetMinMax(tChart2.Axes.Left.Minimum, tChart2.Axes.Left.Maximum);
tChart1.Axes.Bottom.SetMinMax(tChart2.Axes.Bottom.Minimum, tChart2.Axes.Bottom.Maximum);
}
}
private void tChart2_Zoomed(object sender, EventArgs e)
{
Synchronize(tChart2);
}
}
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Anne-Lise,
Thanks in advance.
Could you please let us know the exact steps I should follow to reproduce the issue here?In general it works, but in some cases after a zoom, the left axes of my two charts are shifted. The scales are correctly synchronized, but the positions where left axes are displayed are not exactly the same.
Could you tell me if it is a known problem and how to solve it.
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 |
Hi Narcis,
The problem is not clearly reproducible, you can try to change the series by the following one:
for (int index = 1; index < 100; index++)
{
fastLine1.Add(index, index);
fastLine2.Add(index, index);
}
It seems more easy to reproduce it.
Make a lot of consecutive zoom, and you will have it.
I can send you a screen copy if you want.
Anne-Lise
The problem is not clearly reproducible, you can try to change the series by the following one:
for (int index = 1; index < 100; index++)
{
fastLine1.Add(index, index);
fastLine2.Add(index, index);
}
It seems more easy to reproduce it.
Make a lot of consecutive zoom, and you will have it.
I can send you a screen copy if you want.
Anne-Lise
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Anne-Lise,
Thanks for the information.
Yes please as can't reproduce the issue here. Which TeeChart version are you using?
You can post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Thanks for the information.
Code: Select all
I can send you a screen copy if you want.
You can 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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Anne-Lise,
Can you please try to reproduce the issue using build 3.2.2945.19736/7/8?
Thanks in advance
Can you please try to reproduce the issue using build 3.2.2945.19736/7/8?
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Anne-Lise,
I'm still unable to reproduce the problem here using this code:
Could you please send us the screenshot you mentioned so that we can see the problem? If we can not reproduce it we will send you the application we use so that you can test it at your end.
Thanks in advance.
I'm still unable to reproduce the problem here using this code:
Code: Select all
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Styles.FastLine fastLine1;
private Steema.TeeChart.Styles.FastLine fastLine2;
private void InitializeChart()
{
fastLine1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
fastLine2 = new Steema.TeeChart.Styles.FastLine(tChart2.Chart);
for (int index = 1; index < 1000; index++)
{
fastLine1.Add(index, index);
fastLine2.Add(index, index);
}
tChart1.Zoomed += new EventHandler(tChart1_Zoomed);
tChart2.Zoomed += new EventHandler(tChart2_Zoomed);
tChart1.UndoneZoom += new EventHandler(tChart1_UndoneZoom);
tChart2.UndoneZoom += new EventHandler(tChart2_UndoneZoom);
}
void tChart2_UndoneZoom(object sender, EventArgs e)
{
Synchronize(tChart2);
}
void tChart1_UndoneZoom(object sender, EventArgs e)
{
Synchronize(tChart1);
}
private void tChart1_Zoomed(object sender, EventArgs e)
{
Synchronize(tChart1);
}
private void tChart2_Zoomed(object sender, EventArgs e)
{
Synchronize(tChart2);
}
private void Synchronize(Steema.TeeChart.TChart chart)
{
Bitmap bmp = chart.Bitmap;
if (chart == tChart1)
{
tChart2.Axes.Left.SetMinMax(tChart1.Axes.Left.Minimum, tChart1.Axes.Left.Maximum);
tChart2.Axes.Bottom.SetMinMax(tChart1.Axes.Bottom.Minimum, tChart1.Axes.Bottom.Maximum);
}
else
{
tChart1.Axes.Left.SetMinMax(tChart2.Axes.Left.Minimum, tChart2.Axes.Left.Maximum);
tChart1.Axes.Bottom.SetMinMax(tChart2.Axes.Bottom.Minimum, tChart2.Axes.Bottom.Maximum);
}
}
}
}
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Anne-Lise,
Yes, I posted this information earlier on this thread, can you please look at my previous meesages? You can use our public newsgroups or the upload page.
Thanks in advance.
Yes, I posted this information earlier on this thread, can you please look at my previous meesages? You can use our public newsgroups or the 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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Anne-Lise,
I've checked that I'm using 100 values in my code and still couldn't reproduce the problem here. I've posted the .exe of the project I'm testing at the newsgrups. Could you please try reproducing the issue with it?
Thanks in advance!
I've checked that I'm using 100 values in my code and still couldn't reproduce the problem here. I've posted the .exe of the project I'm testing at the newsgrups. Could you please try reproducing the issue with it?
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Anne-Lise,
Thanks for the information. Can you please confirm that you are using 3.2.2945.19736 which is for Visual Studio .NET 2003 or are you using build 3.2.2945.19737 for Visual Studio 2005? My application was built in VS2003 but I can compile it with any other Visual Studio version if necessary.
Thanks for the information. Can you please confirm that you are using 3.2.2945.19736 which is for Visual Studio .NET 2003 or are you using build 3.2.2945.19737 for Visual Studio 2005? My application was built in VS2003 but I can compile it with any other Visual Studio version if necessary.
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 |
Narcis,
I use a version for visual 2005.
Yesterday I installed the last version (the 24 of january one but for visual 2005) and I reproduced the problem you can see on screen shot.
After this I reinstall the version we use here (3.2.2894.29190) to be compatible with our source and continue to develop.
If you can compile your project for visual 2005, I think I can try to reproduce the problem with it.
Thank you,
Anne-Lise
I use a version for visual 2005.
Yesterday I installed the last version (the 24 of january one but for visual 2005) and I reproduced the problem you can see on screen shot.
After this I reinstall the version we use here (3.2.2894.29190) to be compatible with our source and continue to develop.
If you can compile your project for visual 2005, I think I can try to reproduce the problem with it.
Thank you,
Anne-Lise