Hi Anne-Lise,
Sorry, I think the newsgroups only admit files up to 1M and the upload page had some problems. Could you please try it again?
http://www.steema.net/upload/
Thanks in advance
problem of shiffted axes synchronizing two charts
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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 project. I could finally reproduce the issue here. This mostly happens because the 2 charts don't have the same height and some times same left axis increment can't be fitted for both charts. The solution is doing something as what Marjan suggested here.
Regarding custom drawing on TeeChart, you should do that in the AfterDraw event, for example:
An easier option to achieve what you request may be using Annotation tools.
Thanks for the project. I could finally reproduce the issue here. This mostly happens because the 2 charts don't have the same height and some times same left axis increment can't be fitted for both charts. The solution is doing something as what Marjan suggested here.
Regarding custom drawing on TeeChart, you should do that in the AfterDraw event, for example:
Code: Select all
private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
g.Rectangle(new Rectangle(5, 5, 5, 5));
g.TextOut(10, 10, "chart1");
}
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,
Thank you for your support.
1-We still had an exception on g.Textout in our application as we had 2 functions plugged on the chart.AfterDraw event, and we didn't really undersatnd why this genereated an exception...We solved it by plugging one of those function on the chart.Resize event. So now we have the version for visual 2005 and it works.
2-For the axes shiffting problem, with this version we still have it.
That seems to be true that in my prototype when the 2 charts have the same height I can't reproduce the bug, but I don't understand we the chart heingt influe on the left position axes...
Althought in our application we have charts having the same height and we sill have the shiffted axes problem. Debugging or logging values we see that the Chart.Panel.LeftMargin are the same, but on the screen we have a shifft...
I can't reproduce it in a prototype for the moment...perhaps later.
Thanks,
Anne-Lise
Thank you for your support.
1-We still had an exception on g.Textout in our application as we had 2 functions plugged on the chart.AfterDraw event, and we didn't really undersatnd why this genereated an exception...We solved it by plugging one of those function on the chart.Resize event. So now we have the version for visual 2005 and it works.
2-For the axes shiffting problem, with this version we still have it.
That seems to be true that in my prototype when the 2 charts have the same height I can't reproduce the bug, but I don't understand we the chart heingt influe on the left position axes...
Althought in our application we have charts having the same height and we sill have the shiffted axes problem. Debugging or logging values we see that the Chart.Panel.LeftMargin are the same, but on the screen we have a shifft...
I can't reproduce it in a prototype for the moment...perhaps later.
Thanks,
Anne-Lise
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Anne-Lise,
This is not a TeeChart bug. What happens is that, by default, axes set their scales (min. and max. values and increment) automatically and try to fit in as many labels as possible provided they don't overlap. Since both charts have different height, their left axis length is difference and therefore same number of labels can't be displayed on them. So, under some circumstances and as an example, one chart may have integer labels (0, 1, 2, 3, ...) and the other one can have decimal labels (0, 0.5, 1, 1.5, 2, 2.5, ...) this makes second chart labels being longer and left axis being drawn more to the right than the other chart. Hope my explanation is clear now.
How can we reproduce this issue here?1-We still had an exception on g.Textout in our application as we had 2 functions plugged on the chart.AfterDraw event, and we didn't really undersatnd why this genereated an exception...We solved it by plugging one of those function on the chart.Resize event. So now we have the version for visual 2005 and it works.
2-For the axes shiffting problem, with this version we still have it.
That seems to be true that in my prototype when the 2 charts have the same height I can't reproduce the bug, but I don't understand we the chart heingt influe on the left position axes...
Althought in our application we have charts having the same height and we sill have the shiffted axes problem. Debugging or logging values we see that the Chart.Panel.LeftMargin are the same, but on the screen we have a shifft...
I can't reproduce it in a prototype for the moment...perhaps later.
This is not a TeeChart bug. What happens is that, by default, axes set their scales (min. and max. values and increment) automatically and try to fit in as many labels as possible provided they don't overlap. Since both charts have different height, their left axis length is difference and therefore same number of labels can't be displayed on them. So, under some circumstances and as an example, one chart may have integer labels (0, 1, 2, 3, ...) and the other one can have decimal labels (0, 0.5, 1, 1.5, 2, 2.5, ...) this makes second chart labels being longer and left axis being drawn more to the right than the other chart. Hope my explanation is clear now.
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,
Ok, have you tried applying the solution Marjan suggested in the forums thread I pointed?
Thanks in advance.
Ok, have you tried applying the solution Marjan suggested in the forums thread I pointed?
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 |