Hi
Is it possible to set the width of a bar series automatically so that they don't overlap, if not how can the %BarWidth be calculated based on the zoom level or other parameter?
Nominally I normally set this to 70% but in some cases bars are too wide when zoomed out and overlap.
Rgds
Peter
[/img]
bar series width settings
Hi Peter,
in which cases ? Setting the BarWidthPercent to any value should keep the spaces between the bars. How can I reproduce the result you're getting ?
in which cases ? Setting the BarWidthPercent to any value should keep the spaces between the bars. How can I reproduce the result you're getting ?
Pep Jorge
http://support.steema.com
http://support.steema.com
bar width code
Hi This is the code used to create the chart
procedure TStudy.Plot(Chart: TChart);
var i : integer; Series: TBarSeries;
begin
Chart.SeriesList.Clear;
Chart.ApplyZOrder := true;
for i := count-1 downto 0 do
begin
Series := TBarSeries.Create (Chart);
if count=1
then Series.Title := self.Title
else Series.Title := Items.Title;
Chart.AddSeries (Series);
Series.MultiBar := mbNone;
Series.Marks.Visible := false;
Items.Plot (Series);
end;
end;
procedure TStudy.Plot(Chart: TChart);
var i : integer; Series: TBarSeries;
begin
Chart.SeriesList.Clear;
Chart.ApplyZOrder := true;
for i := count-1 downto 0 do
begin
Series := TBarSeries.Create (Chart);
if count=1
then Series.Title := self.Title
else Series.Title := Items.Title;
Chart.AddSeries (Series);
Series.MultiBar := mbNone;
Series.Marks.Visible := false;
Items.Plot (Series);
end;
end;
fix
Hi
I found the problem was cured by setting the autobarwidth to true
Series.AutoBarSize := True;
Rgds
Peter
I found the problem was cured by setting the autobarwidth to true
Series.AutoBarSize := True;
Rgds
Peter