Runtime RoundRectangle Problem
Posted: Thu Jun 17, 2010 3:35 pm
When I run the following Delphi code :
procedure TGraphForm.Display(Sender: TObject);
var Series : TChartShape;
begin
Chart.SeriesList.Clear;
Series := Chart.AddSeries(TChartShape) as TChartShape;
Series.Style := chasRectangle; Series.RoundRectangle := true;
Series.Text.Add('Test 1');
Series.Alignment := taLeftJustify; Series.VertAlign := vaTop;
Series.X0 := 100; Series.X1 := 200; Series.Y0 := 150; Series.Y1 := 250; Series.Title := 'Test 1';
end;
The rectangles show up fine, but the corners are always square.
Taking out the "Series.RoundRectangle := true;" causes the legend item to show up with rounded corners, but not the shape itself
The rounded corners work fine when set at design-time, but I have a variable number of rectangles, so I have to be able to define on-the-fly.
Any suggestions appreciated
HMA
procedure TGraphForm.Display(Sender: TObject);
var Series : TChartShape;
begin
Chart.SeriesList.Clear;
Series := Chart.AddSeries(TChartShape) as TChartShape;
Series.Style := chasRectangle; Series.RoundRectangle := true;
Series.Text.Add('Test 1');
Series.Alignment := taLeftJustify; Series.VertAlign := vaTop;
Series.X0 := 100; Series.X1 := 200; Series.Y0 := 150; Series.Y1 := 250; Series.Title := 'Test 1';
end;
The rectangles show up fine, but the corners are always square.
Taking out the "Series.RoundRectangle := true;" causes the legend item to show up with rounded corners, but not the shape itself
The rounded corners work fine when set at design-time, but I have a variable number of rectangles, so I have to be able to define on-the-fly.
Any suggestions appreciated
HMA