Patterns to fill pie areas
Patterns to fill pie areas
How can we DEFINE and select the patterns to fill pie areas using TeeChart Pro 7.0. The printer we use forces monochromatic images and we need to define 13 different styles to fill (shading patterns and cross-hatch patterns).
We need an answer as soon as possible because our customer wants to print tomorrow.
We need an answer as soon as possible because our customer wants to print tomorrow.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi SIRIUS,
I'm afraid it's not possible to define different brush style/pattern for each pie slice in a pie series.
I'm afraid it's not possible to define different brush style/pattern for each pie slice in a pie series.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi SIRIUS,
Sorry but a colleague pointed me out that it is possible to set a different pattern for each slice as shown in the code below. However, it's not possible to set different patterns and colors at the same time.
Sorry but a colleague pointed me out that it is possible to set a different pattern for each slice as shown in the code below. However, it's not possible to set different patterns and colors at the same time.
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.FillSampleValues();
Series1.ColorEachPoint:=false;
end;
function TForm1.Series1BeforeAdd(Sender: TChartSeries): Boolean;
begin
if Series1.Count>0 then
if Series1.Count=1 then
begin
Series1.UsePatterns := true;
Chart1.Canvas.Brush.Color := clblue;
Chart1.Canvas.Brush.Style := bsDiagCross;
end;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Sirius,
You can set slices with different patterns using code below but you can't specify which pattern will be used.
You can set slices with different patterns using code below but you can't specify which pattern will be used.
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.FillSampleValues(10);
Series1.ColorEachPoint := false;
Series1.UsePatterns := true;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
We have verified that after six patterns your sw repeats the same styles. We need to show a pie with 13 different styles in a monochromatic way (no color) and with styles mentioned below:
- Solid color white
- Cross
- Cross small
- Diagonal
- Gray (20%)
- Back diagonal
- Gray (40%)
- Gray (10%)
- Gray (60%)
- Gray (80%)
- Cross diagonal
- Diagonal small
- Solid black
Is that possible or even more to increase up to 20 different styles for a pie with 20 slices ?
- Solid color white
- Cross
- Cross small
- Diagonal
- Gray (20%)
- Back diagonal
- Gray (40%)
- Gray (10%)
- Gray (60%)
- Gray (80%)
- Cross diagonal
- Diagonal small
- Solid black
Is that possible or even more to increase up to 20 different styles for a pie with 20 slices ?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Sirius,
The only option would be being a TeeChart source code customer and modify where brushes are assigned. The problem is that graphics.pas there are less brush styles defined than what you request:
The only option would be being a TeeChart source code customer and modify where brushes are assigned. The problem is that graphics.pas there are less brush styles defined than what you request:
Code: Select all
TBrushStyle = (bsSolid, bsClear, bsHorizontal, bsVertical,
bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross);
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Please, see the pdf in our url http://www.siriusnet.com.br/Steema/Pie_ ... ponent.pdf
Hi Sirius,
Excuse us for the delay. We've been doing some tests and finally noticed that this solution works fine in 2D pies but not for 3D. So we'll try to solve it for further releases.
Excuse us for the delay. We've been doing some tests and finally noticed that this solution works fine in 2D pies but not for 3D. So we'll try to solve it for further releases.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Sirius,
As an update, we have added support for using brush images in 3D too so in next v8 maintenance release code below will work fine.
As an update, we have added support for using brush images in 3D too so in next v8 maintenance release code below will work fine.
Code: Select all
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TeEngine, Series, ExtCtrls, TeeProcs, Chart, TeeComma;
type
TForm1 = class(TForm)
Chart1: TChart;
Series1: TPieSeries;
TeeCommander1: TTeeCommander;
procedure FormCreate(Sender: TObject);
procedure Chart1AfterDraw(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
type
TPieSeriesAccess=class(TPieSeries);
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.FillSampleValues(10);
Series1.UsePatterns := true;
Series1.ColorEachPoint := false;
end;
procedure TForm1.Chart1AfterDraw(Sender: TObject);
var b : TBitmap;
begin
Chart1.Canvas.Brush.Color := clRed;
Chart1.Canvas.Brush.Style := bsFDiagonal;
TPieSeriesAccess(Series1).DrawPie(2);
b := TBitmap.Create();
b.LoadFromFile('C:\temp\Copy.bmp');
Chart1.Canvas.Brush.Bitmap := b;
TPieSeriesAccess(Series1).DrawPie(8);
Chart1.Canvas.Brush.Color := clyellow;
Chart1.Canvas.Brush.Style := bsSolid;
TPieSeriesAccess(Series1).DrawPie(5);
end;
end.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Define the pie size (diameter)
Thanks for the answer about the previous question.
We need to build pies with the same diameter even if the labels used for the areas and the areas sizes are differents. How can do it ? See the following figures and
We need to build pies with the same diameter even if the labels used for the areas and the areas sizes are differents. How can do it ? See the following figures and
Hi Sirius,
Are your different pies in different charts or in the same?
Having multiple pies in the same chart, all them should have the same radius.
Anyway, have you tried these properties?
Finally, you may be interested in looking at the demo at All features/Chart styles/Standard/Pie/Multiple Pies
Are your different pies in different charts or in the same?
Having multiple pies in the same chart, all them should have the same radius.
Anyway, have you tried these properties?
Code: Select all
Series1.CustomXRadius := 50;
Series1.CustomYRadius := 50;
Series1.Circled := true;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
I apologize for the mistake attaching the figures.
The figure of the pies generated using your sw is the following one:
where we can see that in oder to place the labels, the pie size is reduced. The customer wants that all pies have the same radio in an independet way of the label sizes.
We will try with your explanation.
Thanks a lot.
The figure of the pies generated using your sw is the following one:
where we can see that in oder to place the labels, the pie size is reduced. The customer wants that all pies have the same radio in an independet way of the label sizes.
We will try with your explanation.
Thanks a lot.