More custom axes with same min/max are not drawn equally!
More custom axes with same min/max are not drawn equally!
Hello,
I just upgraded from V7 to V2010, and now I'm angry.
To list all the errors I've found would take too long time,
and lead the focus away from the most critical things at the moment.
They are:
1:
Crash when selecting font tab in the chart editor.
The different fonts can be changed with the Delphi Object Inspector without problems.
See attached screen shot.
2:
When showing more custom axes with the same range (min/max), the first one appears to be "shorter" than the rest.
This results e.g. in grid lines not being positioned perfectly on top of each other.
See attached screen shot.
I'm using Delphi 2006 and TChart v2010
Thanks in advance for any help!
I just upgraded from V7 to V2010, and now I'm angry.
To list all the errors I've found would take too long time,
and lead the focus away from the most critical things at the moment.
They are:
1:
Crash when selecting font tab in the chart editor.
The different fonts can be changed with the Delphi Object Inspector without problems.
See attached screen shot.
2:
When showing more custom axes with the same range (min/max), the first one appears to be "shorter" than the rest.
This results e.g. in grid lines not being positioned perfectly on top of each other.
See attached screen shot.
I'm using Delphi 2006 and TChart v2010
Thanks in advance for any help!
- Attachments
-
- NOT OK
- More series with overlay.JPG (45.68 KiB) Viewed 12146 times
-
- OK
- One series OK.JPG (38.58 KiB) Viewed 12141 times
-
- CRASH
- Crash when choosing font tab.JPG (128.67 KiB) Viewed 12135 times
Re: More custom axes with same min/max are not drawn equally!
Hi ChartIt,
So maybe you are setting a different SetMinMax to one axis and the others?
Please, try to change the code above so the problem can be reproduced here, or arrange a simple example project for the same purpose.
This is a known problem we've already fixed for the next maintenance release (TV52014813)ChartIt wrote:1:
Crash when selecting font tab in the chart editor.
The different fonts can be changed with the Delphi Object Inspector without problems.
See attached screen shot.
I'm trying to reproduce it with the following code but the grid lines are well aligned.ChartIt wrote:2:
When showing more custom axes with the same range (min/max), the first one appears to be "shorter" than the rest.
This results e.g. in grid lines not being positioned perfectly on top of each other.
See attached screen shot.
Code: Select all
uses series;
procedure TForm1.FormCreate(Sender: TObject);
var i, j: Integer;
begin
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
for i:=0 to 3 do
begin
Chart1.AddSeries(TFastLineSeries);
Chart1[i].Add(Random(10) + 100);
for j:=1 to 25 do
Chart1[i].Add(Chart1[i].YValue[j-1] + Random(5) - 2.4);
if (i = 0) then
begin
Chart1[i].VertAxis:=aRightAxis;
Chart1.Axes.Right.SetMinMax(75,125);
Chart1.Axes.Right.LabelsFont.Color:=Chart1[i].Color;
end
else
begin
Chart1.CustomAxes.Add;
Chart1[i].CustomVertAxis:=Chart1.CustomAxes[i-1];
Chart1[i].CustomVertAxis.OtherSide:=true;
Chart1[i].CustomVertAxis.PositionUnits:=muPixels;
Chart1[i].CustomVertAxis.PositionPercent:=-i*45;
Chart1[i].CustomVertAxis.Axis.Visible:=false;
Chart1[i].CustomVertAxis.SetMinMax(75,125);
Chart1[i].CustomVertAxis.LabelsFont.Color:=Chart1[i].Color;
end;
end;
Chart1.MarginRight:=20;
end;
Please, try to change the code above so the problem can be reproduced here, or arrange a simple example project for the same purpose.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: More custom axes with same min/max are not drawn equally!
Hi,
Thanks for your reply.
With this code you should be able to see the issue:
procedure TForm1.FormCreate(Sender: TObject);
var i, j: Integer;
begin
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
for i:=0 to 3 do
begin
Chart1.AddSeries(TFastLineSeries);
Chart1.Add(Random(10) + 100);
for j:=1 to 25 do
Chart1.Add(Chart1.YValue[j-1] + Random(5) - 2.4);
if (i = 0) then
begin
Chart1.CustomAxes.Add;
Chart1.CustomVertAxis:=Chart1.CustomAxes;
Chart1.CustomVertAxis.OtherSide:=true;
Chart1.CustomVertAxis.PositionUnits:=muPixels;
Chart1.CustomVertAxis.PositionPercent:=-i*45;
Chart1.CustomVertAxis.Axis.Visible:=false;
Chart1.CustomVertAxis.SetMinMax(0,4);
Chart1[i].CustomVertAxis.LabelsFont.Color:=Chart1[i].Color;
Chart1[i].CustomVertAxis.Increment := (Chart1[i].CustomVertAxis.Maximum - Chart1[i].CustomVertAxis.Minimum)/10;
end
else
begin
Chart1.CustomAxes.Add;
Chart1[i].CustomVertAxis:=Chart1.CustomAxes[i];
Chart1[i].CustomVertAxis.OtherSide:=true;
Chart1[i].CustomVertAxis.PositionUnits:=muPixels;
Chart1[i].CustomVertAxis.PositionPercent:=-i*45;
Chart1[i].CustomVertAxis.Axis.Visible:=false;
Chart1[i].CustomVertAxis.SetMinMax(0,400);
Chart1[i].CustomVertAxis.LabelsFont.Color:=Chart1[i].Color;
Chart1[i].CustomVertAxis.Increment := (Chart1[i].CustomVertAxis.Maximum - Chart1[i].CustomVertAxis.Minimum)/10;
end;
end;
Chart1.MarginRight:=20;
end;
When making the Chart big you should see a double grid line, this time in the middle (at 2/200).
Could it be a rounding issue when I'm calculating the Increment?
In the meanwhile I've found another critical issue:
I can't change the cursor by code, it only works with the Chart Editor.
A new project with a fresh TChart, and the following code:
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Cursor := crHourGlass;
end;
doesn't change anything.
Do I have to call any function after changing the cursor to get it updated?
With v7 I didn't experience this.
Best Regards
Thanks for your reply.
With this code you should be able to see the issue:
procedure TForm1.FormCreate(Sender: TObject);
var i, j: Integer;
begin
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
for i:=0 to 3 do
begin
Chart1.AddSeries(TFastLineSeries);
Chart1.Add(Random(10) + 100);
for j:=1 to 25 do
Chart1.Add(Chart1.YValue[j-1] + Random(5) - 2.4);
if (i = 0) then
begin
Chart1.CustomAxes.Add;
Chart1.CustomVertAxis:=Chart1.CustomAxes;
Chart1.CustomVertAxis.OtherSide:=true;
Chart1.CustomVertAxis.PositionUnits:=muPixels;
Chart1.CustomVertAxis.PositionPercent:=-i*45;
Chart1.CustomVertAxis.Axis.Visible:=false;
Chart1.CustomVertAxis.SetMinMax(0,4);
Chart1[i].CustomVertAxis.LabelsFont.Color:=Chart1[i].Color;
Chart1[i].CustomVertAxis.Increment := (Chart1[i].CustomVertAxis.Maximum - Chart1[i].CustomVertAxis.Minimum)/10;
end
else
begin
Chart1.CustomAxes.Add;
Chart1[i].CustomVertAxis:=Chart1.CustomAxes[i];
Chart1[i].CustomVertAxis.OtherSide:=true;
Chart1[i].CustomVertAxis.PositionUnits:=muPixels;
Chart1[i].CustomVertAxis.PositionPercent:=-i*45;
Chart1[i].CustomVertAxis.Axis.Visible:=false;
Chart1[i].CustomVertAxis.SetMinMax(0,400);
Chart1[i].CustomVertAxis.LabelsFont.Color:=Chart1[i].Color;
Chart1[i].CustomVertAxis.Increment := (Chart1[i].CustomVertAxis.Maximum - Chart1[i].CustomVertAxis.Minimum)/10;
end;
end;
Chart1.MarginRight:=20;
end;
When making the Chart big you should see a double grid line, this time in the middle (at 2/200).
Could it be a rounding issue when I'm calculating the Increment?
In the meanwhile I've found another critical issue:
I can't change the cursor by code, it only works with the Chart Editor.
A new project with a fresh TChart, and the following code:
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Cursor := crHourGlass;
end;
doesn't change anything.
Do I have to call any function after changing the cursor to get it updated?
With v7 I didn't experience this.
Best Regards
Re: More custom axes with same min/max are not drawn equally!
Hi ChartIt,
I can't see the double grid line you mention, even with the chart maximized or zooming.
Anyway, you can hide all the grid lines except of one of them. Here it is the example:
http://www.teechart.net/support/viewtop ... sor#p29360
I can't see the double grid line you mention, even with the chart maximized or zooming.
Anyway, you can hide all the grid lines except of one of them. Here it is the example:
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
var i, j: Integer;
begin
Chart1.Align:=alClient;
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
for i:=0 to 3 do
begin
Chart1.AddSeries(TFastLineSeries);
Chart1[i].Add(Random(10) + 100);
for j:=1 to 25 do
Chart1[i].Add(Chart1[i].YValue[j-1] + Random(5) - 2.4);
Chart1.CustomAxes.Add;
Chart1[i].CustomVertAxis:=Chart1.CustomAxes[i];
with Chart1[i].CustomVertAxis do
begin
OtherSide:=true;
PositionUnits:=muPixels;
PositionPercent:=-i*45;
Axis.Visible:=false;
LabelsFont.Color:=Chart1[i].Color;
if (i = 0) then
SetMinMax(0,4)
else
begin
SetMinMax(0,400);
Grid.Visible:=false;
end;
Increment := (Maximum - Minimum)/10;
end;
end;
Chart1.MarginRight:=20;
end;
procedure TForm1.Chart1Zoom(Sender: TObject);
var i: Integer;
begin
for i:=0 to Chart1.CustomAxes.Count-1 do
with Chart1.CustomAxes[i] do
SetMinMax(CalcPosPoint(Chart1.Zoom.Y1), CalcPosPoint(Chart1.Zoom.Y0));
end;
procedure TForm1.Chart1UndoZoom(Sender: TObject);
var i: Integer;
begin
for i:=0 to Chart1.CustomAxes.Count-1 do
if i = 0 then
Chart1.CustomAxes[i].SetMinMax(0,4)
else
Chart1.CustomAxes[i].SetMinMax(0,400);
end;
Please, take a look at this thread, there are some solutions proposed:ChartIt wrote:In the meanwhile I've found another critical issue:
I can't change the cursor by code, it only works with the Chart Editor.
http://www.teechart.net/support/viewtop ... sor#p29360
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: More custom axes with same min/max are not drawn equally!
Hi,
1:
See enclosed screen shot with my example.
Hiding the grid lines only solves the problem visual, but not the fact that the axes might be scaled different.
2:
Why is the function Chart.Cursor available if it's not working??
3:
New issue (or old??):
Sometimes heavy flickering of the chart when scrolling and changing values of points!
(Think this is solved in next release)
4:
New issue (or old??):
Chart sometimes not repainting when other windows have been on top of it!
(Think this is solved in next release)
I'm getting more and more frustrated
1:
See enclosed screen shot with my example.
Hiding the grid lines only solves the problem visual, but not the fact that the axes might be scaled different.
2:
Why is the function Chart.Cursor available if it's not working??
3:
New issue (or old??):
Sometimes heavy flickering of the chart when scrolling and changing values of points!
(Think this is solved in next release)
4:
New issue (or old??):
Chart sometimes not repainting when other windows have been on top of it!
(Think this is solved in next release)
I'm getting more and more frustrated
- Attachments
-
- Grid lines overlap.JPG (93.56 KiB) Viewed 12087 times
Re: More custom axes with same min/max are not drawn equally!
Hi ChartIt,
If you still have troubles with it, don't hesitate to let us know.
Here it is the project in Delphi 2006 + TeeChart v2010 that works fine for me here. Anyway, as you said, a pixel difference could be because of a rounding that has to be done when passing from values (doubles) to pixels (integers). I think there isn't too much we can do here apart from hiding grids.ChartIt wrote:1:
See enclosed screen shot with my example.
Hiding the grid lines only solves the problem visual, but not the fact that the axes might be scaled different.
Yes, this is a known issue already in the wish list to be revised in future releases.ChartIt wrote: 2:
Why is the function Chart.Cursor available if it's not working??
Depending on the number of points you have in your chart, the drawing process will be faster or slower. I'd recommend you to try to implement as many tips as possible from the Real-time Charting article.ChartIt wrote:3:
New issue (or old??):
Sometimes heavy flickering of the chart when scrolling and changing values of points!
(Think this is solved in next release)
If you still have troubles with it, don't hesitate to let us know.
Yes, this has been solved for the next maintenance release.ChartIt wrote:4:
New issue (or old??):
Chart sometimes not repainting when other windows have been on top of it!
(Think this is solved in next release)
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: More custom axes with same min/max are not drawn equally!
Hi,
1:
With Min/Max of 0/4 and 0/400 and then divided by 10 shouldn't lead to any rounding errors,
but never mind, I'll live with it.
3:
I have only the amount of values in the chart corresponding to the chart width in pixels (approx. 700), and have already implemented all relevant parts from that article.
Furthermore the problem didn't show up with TeeChart v7.
Any news about that maintenance release?
Regards
1:
With Min/Max of 0/4 and 0/400 and then divided by 10 shouldn't lead to any rounding errors,
but never mind, I'll live with it.
3:
I have only the amount of values in the chart corresponding to the chart width in pixels (approx. 700), and have already implemented all relevant parts from that article.
Furthermore the problem didn't show up with TeeChart v7.
Any news about that maintenance release?
Regards
Re: More custom axes with same min/max are not drawn equally!
Hi ChartIt,
We are working on the next maintenance so it can be published asap.
The flickering problem you are suffering may also be fixed with the same bugfix that solved the repainting problem mentioned just above. If you want, you could send us a simple example project we can run as-is to reproduce the problem here and we'll confirm you if it has been solved in the actual sources or not.
We are working on the next maintenance so it can be published asap.
The flickering problem you are suffering may also be fixed with the same bugfix that solved the repainting problem mentioned just above. If you want, you could send us a simple example project we can run as-is to reproduce the problem here and we'll confirm you if it has been solved in the actual sources or not.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: More custom axes with same min/max are not drawn equally!
Hi,
I've found out that the flickering occurs after saving the chart as bitmap (SaveToBitmapFile).
See enclosed test program:
1:
Press btnStart - no flickering occurs.
2:
Press btnStop.
3:
Press btnSaveBmp.
4:
Press btnStart - flickering occurs.
I've found out that the flickering occurs after saving the chart as bitmap (SaveToBitmapFile).
See enclosed test program:
1:
Press btnStart - no flickering occurs.
2:
Press btnStop.
3:
Press btnSaveBmp.
4:
Press btnStart - flickering occurs.
- Attachments
-
- Project1.zip
- (426.68 KiB) Downloaded 529 times
Re: More custom axes with same min/max are not drawn equally!
Hi ChartIt,
Yes, I can confirm that it should be solved with the next maintenance release. I could reproduce the flickering with the first v2010 and not with the actual sources.
Yes, I can confirm that it should be solved with the next maintenance release. I could reproduce the flickering with the first v2010 and not with the actual sources.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: More custom axes with same min/max are not drawn equally!
OK, thanks.
Do you have a work around for my current version??
Do you have a work around for my current version??
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: More custom axes with same min/max are not drawn equally!
Hi ChartIt,
I can't think of a workaround for now but a "non-stable" pre-release version will be published imminently.
I can't think of a workaround for now but a "non-stable" pre-release version will be published imminently.
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 |