![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | White space between the slices in concentric Pie/Donut | ||
|---|---|---|---|
| Product: | VCL TeeChart | Reporter: | yeray alonso <yeray> |
| Component: | Series | Assignee: | Steema Issue Manager <issuemanager> |
| Status: | IN_PROGRESS --- | ||
| Severity: | minor | CC: | david |
| Priority: | --- | ||
| Version: | 140923 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| URL: | http://www.teechart.net/support/viewtopic.php?f=3&t=15202 | ||
| Chart Series: | Pie | Delphi / C++ Builder RAD IDE Version: | Delphi 7 |
Problem due to canvas antialias. Same issue happens with Firemonkey. A possible workaround is to fill the circle behind the series: ... Chart1.Draw; end; procedure TForm1.Chart1BeforeDrawSeries(Sender: TObject); var p : TPieSeries; begin p:=TPieSeries(Chart1[0]); Chart1.Canvas.Brush.Style:=bsSolid; Chart1.Canvas.Brush.Color:=clBlack; Chart1.Canvas.Ellipse(p.CircleRect); end; Another solution is to set the series Pen color to be the same color as the series data color. The pen antialias will cover the missing pixels. Both workarounds would work when all the series and all the values have the same color, but not when having different colors. Ie:
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
var i, j: Integer;
begin
Chart1.Title.Visible:=false;
Chart1.View3D:=false;
Chart1.Legend.Visible:=false;
Chart1.Hover.Visible:=false;
for i:=0 to 3 do
with Chart1.AddSeries(TPieSeries) as TPieSeries do
begin
MultiPie:=mpConcentric;
Marks.Visible:=false;
Pen.Visible:=false;
for j:=0 to 9 do
Add(10,'',clNone);
end;
Chart1[0].ValueColor[0]:=OperaPalette[0];
Chart1[1].ValueColor[0]:=OperaPalette[0];
Chart1[0].ValueColor[2]:=OperaPalette[1];
Chart1[1].ValueColor[2]:=OperaPalette[1];
Chart1[2].ValueColor[2]:=OperaPalette[1];
Chart1[0].ValueColor[3]:=OperaPalette[2];
Chart1[1].ValueColor[3]:=OperaPalette[2];
Chart1[2].ValueColor[3]:=OperaPalette[2];
Chart1[3].ValueColor[3]:=OperaPalette[2];
Chart1[0].ValueColor[5]:=OperaPalette[3];
Chart1[1].ValueColor[5]:=OperaPalette[3];
Chart1[0].ValueColor[7]:=OperaPalette[4];
Chart1[1].ValueColor[7]:=OperaPalette[4];
Chart1[2].ValueColor[7]:=OperaPalette[4];
Chart1[0].ValueColor[8]:=OperaPalette[5];
Chart1[1].ValueColor[8]:=OperaPalette[5];
end;
|
Having Concentric TPieSeries/TDonutSeries without Pen, there's a little white space drawn between the slices uses Series, TeeDonut; procedure TForm1.FormCreate(Sender: TObject); var i, j: Integer; begin Chart1.View3D:=false; Chart1.Legend.Visible:=false; for i:=0 to 9 do //with Chart1.AddSeries(TPieSeries) as TPieSeries do with Chart1.AddSeries(TDonutSeries) as TDonutSeries do begin MultiPie:=mpConcentric; Marks.Visible:=false; Pen.Visible:=false; for j:=0 to 9 do Add(10,'',clBlack); end; end;