How to reproduce Line Series example from the Gallery
How to reproduce Line Series example from the Gallery
The line series example in the gallery from TeeChart Vcl 7 shows transparent series.I tried to reproduce this but was not able to find a tranparency property for line series. Is there any way to have similar looking line series in my application?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Stefan,
To which gallery are you refering to? It may be possible that those charts were generated using TeeChart for .NET as .NET framework has transparency implemented for all pens and brushes.
To which gallery are you refering to? It may be possible that those charts were generated using TeeChart for .NET as .NET framework has transparency implemented for all pens and brushes.
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 |
Hi Narcis
I refer to http://www.steema.com/products/teechart/gallery.html
You can reach this site when you click in the VCL section on gallery. So I expect that the samples shown there, can be reproduced with the VCL version.
If Transparency for LineCharts is not possible with the VCL version, you should maybe consider adding that for the next version, it is a really usefull feature to make charts with multiple lineseries better looking. Or at least mark it in the gallery as only possible with .NET
I refer to http://www.steema.com/products/teechart/gallery.html
You can reach this site when you click in the VCL section on gallery. So I expect that the samples shown there, can be reproduced with the VCL version.
If Transparency for LineCharts is not possible with the VCL version, you should maybe consider adding that for the next version, it is a really usefull feature to make charts with multiple lineseries better looking. Or at least mark it in the gallery as only possible with .NET
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Stefan,
This is TeeChart's generic gallery, thus transparency can not be achieved with TLineSeries in VCL version. However, the code below shows you how to reproduce an example pretty close to what's shown on that gallery (without transparency). Just add a TChart to a form and paste this code to it.
This is TeeChart's generic gallery, thus transparency can not be achieved with TLineSeries in VCL version. However, the code below shows you how to reproduce an example pretty close to what's shown on that gallery (without transparency). Just add a TChart to a form and paste this code to it.
Code: Select all
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TeeComma, ExtCtrls, TeeProcs, TeEngine, Chart, Series, TeeTools,
TeeOpenGL, TeCanvas, StdCtrls;
type
TForm1 = class(TForm)
Chart1: TChart;
TeeCommander1: TTeeCommander;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
i: Integer;
Series1,Series2,Series3: TLineSeries;
BackGrid: TGridBandTool;
begin
Series1:=TLineSeries.Create(Self);
Series2:=TLineSeries.Create(Self);
Series3:=TLineSeries.Create(Self);
Chart1.AddSeries(Series1);
Chart1.AddSeries(Series2);
Chart1.AddSeries(Series3);
Series1.Color:=RGB(150,150,255);
Series2.Color:=RGB(0,0,150);
Series3.Color:=RGB(235,235,235);
BackGrid:=TGridBandTool.Create(self);
for i:=0 to Chart1.SeriesCount-1 do
With Chart1.Series[i] do
begin
ParentChart:=Chart1;
Title:='line'+IntToStr(i+1);
FillSampleValues(20);
Pen.Color:=clLtGray;
end;
With Chart1 do
begin
Title.Visible:=false;
Color:=clWhite;
BackWall.Pen.Hide;
Chart1.Chart3DPercent:=25;
end;
With Chart1.LeftWall do
begin
Color:=RGB(237,243,214);
Size:=5;
Pen.Hide;
end;
With Chart1.BottomWall do
begin
Size:=5;
Pen.Hide;
end;
With Chart1.LeftAxis do
begin
Title.Caption:='Quantity';
Title.Font.Size:=11;
Title.Font.Style:=Title.Font.Style + [fsBold];
LabelsFont.Style:=Chart1.LeftAxis.LabelsFont.Style + [fsBold];
LabelsFont.Size:=9;
Increment:=50;
Grid.Visible:=false;
end;
With Chart1.BottomAxis do
begin
Grid.Style:=psSolid;
LabelsFont.Style:=Chart1.LeftAxis.LabelsFont.Style + [fsBold];
LabelsFont.Size:=9;
end;
With BackGrid do
begin
Axis:=Chart1.LeftAxis;
With Band1 do
begin
Color:=clLtGray;
Transparency:=60;
end;
With Band2 do
begin
Color:=clWhite;
Transparency:=60;
end;
end;
With Chart1.Legend do
begin
Shadow.Color:=clLtGray;
Shadow.Size:=4;
Font.Style:=Chart1.Legend.Font.Style+[fsBold];
Transparency:=80;
Shadow.Transparency:=80;
Font.Color:=clGray;
VertSpacing:=5;
VertMargin:=5;
HorizMargin:=10;
Chart1.Legend.Symbol.Width:=25;
end;
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 |