求助:大侠,伸把手。如何改变饼图中的默认颜色?(100分)

  • 主题发起人 主题发起人 tjlqp
  • 开始时间 开始时间
T

tjlqp

Unregistered / Unconfirmed
GUEST, unregistred user!
统计饼图的默认饼色为红/绿/......当只有两块时如何令其为蓝/黄?我没招,只好求助。tjlqp@sina.com这里有礼了。
 
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TeEngine, Series, ExtCtrls, TeeProcs, Chart;

type
TForm1 = class(TForm)
Chart1: TChart;
Series1: TPieSeries;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.AddPie(0.2,'',clblue);
Series1.AddPie(0.7,'',clFuchsia);
end;

end.
 
object Form1: TForm1
Left = 192
Top = 107
Width = 544
Height = 375
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object Chart1: TChart
Left = 136
Top = 40
Width = 400
Height = 250
AllowPanning = pmNone
AllowZoom = False
BackWall.Brush.Color = clWhite
BackWall.Brush.Style = bsClear
BackWall.Pen.Visible = False
Title.Text.Strings = (
'TChart')
AxisVisible = False
ClipPoints = False
Frame.Visible = False
View3DOptions.Elevation = 315
View3DOptions.Orthogonal = False
View3DOptions.Perspective = 0
View3DOptions.Rotation = 360
View3DWalls = False
TabOrder = 0
object Series1: TPieSeries
Marks.ArrowLength = 8
Marks.Visible = True
SeriesColor = clRed
OtherSlice.Text = 'Other'
PieValues.DateTime = False
PieValues.Name = 'Pie'
PieValues.Multiplier = 1
PieValues.Order = loNone
end
end
end
 
Series1.AddPie(0.7,'',clFuchsia);
 
好,有空我试试。敢问您的邮箱....?
 
虽然没试,但我相信你的热情.
 
hfghfghfg@sohu.com
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
657
import
I
D
回复
0
查看
1K
DelphiTeacher的专栏
D
后退
顶部