Hello !
I use TChart 7.12 VCL. You can produce the error with the TChart-Editor:
Insert a TBarseries fill it with 3 samples. The x-Points are:
0. Bar -0.5 .. 0.5
1.Bar 0.5 .. 1.5
3. Bar 1.5 .. 2.5
Thats ok, but when you widen the x-Axis range maybe to -3 .. 10
the bar have different width and position.
I could not figure out whats the rule for this.
0. Bar -1.8 .. 0.8
1. Bar 0.8 .. 0.5
2. Bar 0.5 .. 3.8 !!!!!!!
So the last bar is always very large.
The %BarWith is 100.
For SideMargins off you get -2 to -1 to 0 to 4
I expected the bars should be centered at 0, 1, 2, 3 etc. with width 1.
Is this a bug or must I configure something ???
Bye
Andreas Weichert
TBarseries wrong barwidth on not automatic axis
Re: TBarseries wrong barwidth on not automatic axis
Hi Andreas,
Several changes have been made to Bar series since v7.12 and this has been improved.
For example the following code gives the following result in v8.06:
The result is still not perfect but I think is better than in v7. If you want to test it further note that you can download the fully functional evaluation version for free.
Several changes have been made to Bar series since v7.12 and this has been improved.
For example the following code gives the following result in v8.06:
Code: Select all
uses series;
procedure TForm1.FormCreate(Sender: TObject);
var bar1: TBarSeries;
begin
Chart1.View3D:=false;
bar1:=TBarSeries.Create(self);
Chart1.AddSeries(bar1);
bar1.FillSampleValues(3);
bar1.BarWidthPercent:=100;
bar1.SideMargins:=false;
Chart1.Axes.Bottom.SetMinMax(-3,10);
end;
The result is still not perfect but I think is better than in v7. If you want to test it further note that you can download the fully functional evaluation version for free.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: TBarseries wrong barwidth on not automatic axis
Thank you for the answer.
The result looks perfect for me - that is what I expected.
Ok I will update.
The result looks perfect for me - that is what I expected.
Ok I will update.