I just by TeeChart, Version 8.06. I had the old 7.11 version
I have a big problem with BarWidth ( it's running OK in old version)
If I fixed left axis ( minimum = -100, maximum = +100) and if I have only a 'Bar' serie, the barwidth function is Ok.
If I had a new serie on the same chart ( lineseries), the barwidth function does not work !! I'll only have a small line on each bar ( with < 100) or a full bar ( barwith = 100).
I have this curious work with program and VCL editing.
BarWidth
Re: BarWidth
Hi Picasso,
Could you please send us a simple example project we can run as-is to reproduce the problem here? It seems to work fine here with a bar series with two values and a line series with two values too.
Could you please send us a simple example project we can run as-is to reproduce the problem here? It seems to work fine here with a bar series with two values and a line series with two values too.
Code: Select all
uses series;
procedure TForm1.FormCreate(Sender: TObject);
var bar1: TBarSeries;
line1: TLineSeries;
begin
bar1:=Chart1.AddSeries(TBarSeries.Create(self)) as TBarSeries;
bar1.Add(80);
bar1.Add(-70);
line1:=Chart1.AddSeries(TLineSeries.Create(self)) as TLineSeries;
line1.Add(-40);
line1.Add(35);
Chart1.Axes.Left.SetMinMax(-100,100);
bar1.BarWidthPercent:=40;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: BarWidth
Hello,
Thanks for your answer. I had try your small program and it's running OK.
The problem appears when you add, by teechart designer, a bar series. If you put BarWith to 100, strange picture on my screen. ( I do not add point on my create series)
If I do that, I'll find the same problem.
I will modify my program to add 'barseries' by program, why not, but it's less easy. I prefer use TeeChart Designer to modify the series parameters.
Regards
Thanks for your answer. I had try your small program and it's running OK.
The problem appears when you add, by teechart designer, a bar series. If you put BarWith to 100, strange picture on my screen. ( I do not add point on my create series)
If I do that, I'll find the same problem.
I will modify my program to add 'barseries' by program, why not, but it's less easy. I prefer use TeeChart Designer to modify the series parameters.
Regards
Re: BarWidth
Hi PICASSO,
I've seen that having a Bar Series and a Line Series with different number of values, the last bar is shown thinner that the others if you set BarWidthPercent to 100. So I've added it to the defect list to be fixed in future releases (TV52014752).
I've seen that having a Bar Series and a Line Series with different number of values, the last bar is shown thinner that the others if you set BarWidthPercent to 100. So I've added it to the defect list to be fixed in future releases (TV52014752).
Code: Select all
uses series;
var bar1: TBarSeries;
line1: TLineSeries;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=false;
bar1:=Chart1.AddSeries(TBarSeries.Create(self)) as TBarSeries;
line1:=Chart1.AddSeries(TLineSeries.Create(self)) as TLineSeries;
bar1.FillSampleValues(); //6 points
line1.FillSampleValues(); //25 points
line1.Pointer.Visible:=true;
bar1.BarWidthPercent:=100;
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: BarWidth
Hello
I also suffer from the bar width bug. I have a chart with two series: a line series and a bar series.
In TCustomBarSeries.DoBeforeDrawChart you determine a wrong value for IMaxBarPoints:
- the first series is the line series: it has 2000 values. Thus IMaxBarPoints is set to 2000
- the second series is a bar series. For this series the value remains unchanged even if it only has 10 values
Later then the bar width is calculated by the available space (IAxisSize div IMaxBarPoints). The result is a very small bar with width of 1...
If I remove the line series, it looks not even better because there is another bug in this method: the IMaxBarPoints value is determined from Series[t].Count. This is not correct in any case. Consider a ChartValueList with entries for 31 days (Minimum is 2010-03-01, maximum is 2010-03-31), whereas only 10 days have a value. Then count is 10, but the axis width provides space for 31 bars. You divide the space by count and as a result the bars are too wide (the bars for successive days are overlapping each other).
Unfortunately it is absolutely impossible to fix this by a descendant class as there are some private fields unavailable.
Would you mind to provide me with a sulution / workaround / bugfix?
BR
Michael
I also suffer from the bar width bug. I have a chart with two series: a line series and a bar series.
In TCustomBarSeries.DoBeforeDrawChart you determine a wrong value for IMaxBarPoints:
- the first series is the line series: it has 2000 values. Thus IMaxBarPoints is set to 2000
- the second series is a bar series. For this series the value remains unchanged even if it only has 10 values
Later then the bar width is calculated by the available space (IAxisSize div IMaxBarPoints). The result is a very small bar with width of 1...
If I remove the line series, it looks not even better because there is another bug in this method: the IMaxBarPoints value is determined from Series[t].Count. This is not correct in any case. Consider a ChartValueList with entries for 31 days (Minimum is 2010-03-01, maximum is 2010-03-31), whereas only 10 days have a value. Then count is 10, but the axis width provides space for 31 bars. You divide the space by count and as a result the bars are too wide (the bars for successive days are overlapping each other).
Unfortunately it is absolutely impossible to fix this by a descendant class as there are some private fields unavailable.
Would you mind to provide me with a sulution / workaround / bugfix?
BR
Michael
Re: BarWidth
Hi Michael,
Thank you for your comments. We'll consider them when we'll revise the bug ticket (TV52014752).
Thank you for your comments. We'll consider them when we'll revise the bug ticket (TV52014752).
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: BarWidth
Hello
Is this problem corrected ? It's became urgent to have a solution.
Is this problem corrected ? It's became urgent to have a solution.
Re: BarWidth
Hi PICASSO,
I'm afraid it hasn't been fixed yet. I've incremented it's priority.
I recommend you to be aware at this forum or subscribe to our RSS news feed for new release announcements and what's implemented on them.
I'm afraid it hasn't been fixed yet. I've incremented it's priority.
I recommend you to be aware at this forum or subscribe to our RSS news feed for new release announcements and what's implemented on them.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |