Random Total Values Appearing In Pie Chart
Posted: Thu Oct 12, 2006 3:27 pm
Hello
I am using TChart 7 with Delphi 6 (Cannot upgrade Delphi)
I have a very strange problem where I have a pie chart with 3 slices. The values for these slices are :
27312
8597
2720
When I look at the pie chart all the percentages have been calculated as a percentage of 65491
Where has this number come from? The 3 numbers above add up to 38629
I can get this number by doubling the first number (27312) and then adding the others, but why is this happening?
The source code for my form is below
PAS File
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;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
end.
DFM
object Form1: TForm1
Left = 176
Top = 209
Width = 870
Height = 640
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Chart1: TChart
Left = 88
Top = 48
Width = 400
Height = 250
Title.Text.Strings = (
'TChart')
View3DOptions.Elevation = 315
View3DOptions.Orthogonal = False
View3DOptions.Perspective = 0
View3DOptions.Rotation = 360
TabOrder = 0
PrintMargins = (
15
18
15
18)
object Series1: TPieSeries
Marks.Callout.Brush.Color = clBlack
Marks.Style = smsValue
Marks.Visible = True
Gradient.Direction = gdRadial
OtherSlice.Legend.Visible = False
PieValues.Name = 'Pie'
PieValues.Order = loNone
Data = {
04030000000000000000ACDA4001410000000080CAC04001420000000000BCA1
4000}
end
end
end
Cheers
Paul
I am using TChart 7 with Delphi 6 (Cannot upgrade Delphi)
I have a very strange problem where I have a pie chart with 3 slices. The values for these slices are :
27312
8597
2720
When I look at the pie chart all the percentages have been calculated as a percentage of 65491
Where has this number come from? The 3 numbers above add up to 38629
I can get this number by doubling the first number (27312) and then adding the others, but why is this happening?
The source code for my form is below
PAS File
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;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
end.
DFM
object Form1: TForm1
Left = 176
Top = 209
Width = 870
Height = 640
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Chart1: TChart
Left = 88
Top = 48
Width = 400
Height = 250
Title.Text.Strings = (
'TChart')
View3DOptions.Elevation = 315
View3DOptions.Orthogonal = False
View3DOptions.Perspective = 0
View3DOptions.Rotation = 360
TabOrder = 0
PrintMargins = (
15
18
15
18)
object Series1: TPieSeries
Marks.Callout.Brush.Color = clBlack
Marks.Style = smsValue
Marks.Visible = True
Gradient.Direction = gdRadial
OtherSlice.Legend.Visible = False
PieValues.Name = 'Pie'
PieValues.Order = loNone
Data = {
04030000000000000000ACDA4001410000000080CAC04001420000000000BCA1
4000}
end
end
end
Cheers
Paul