Random Total Values Appearing In Pie Chart
Random Total Values Appearing In Pie Chart
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
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hello,
Using a new pie series with the data you mentioned seems to works fine for me here using v7.07 which is the latest version available at the client area. Which exact TeeChart version are you using?
Using a new pie series with the data you mentioned seems to works fine for me here using v7.07 which is the latest version available at the client area. Which exact TeeChart version are you using?
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 STC,
Which are the problems you got? You should install a TeeChart version which is compatible with the RB version you have (check with Digital Metaphors support). Also notice that to install TeeChart v7 in Delphi 6 you need all Delphi 6 updates available installed. This includes Update Pack 2, RTL Update 2 and RTL Update 3, then install TeeChart and finally install Report Builder.
Which are the problems you got? You should install a TeeChart version which is compatible with the RB version you have (check with Digital Metaphors support). Also notice that to install TeeChart v7 in Delphi 6 you need all Delphi 6 updates available installed. This includes Update Pack 2, RTL Update 2 and RTL Update 3, then install TeeChart and finally install Report Builder.
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 STC,
I can't reproduce the problem here with this version so I guess it works fine now. However, if you want, you can send us an example project we can run "as-is" to reproduce the problem here. I'll test this project with Delphi 6 and v7.07 and let you know how it goes.
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
I can't reproduce the problem here with this version so I guess it works fine now. However, if you want, you can send us an example project we can run "as-is" to reproduce the problem here. I'll test this project with Delphi 6 and v7.07 and let you know how it goes.
You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
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 Paul,
Thanks for the example. I received it, built the application with v7.07 and worked fine. I've attached the .exe I built and a screen-shot at the newsgroups in reply to your message.
I suggest you to upgrade your TeeChart version following those steps:
1. Check whith Digital Metaphors which RB version is compatible with v7.07.
2. Uninstall old RB and TeeChart version from your machine.
3. Install all Delphi 6 udpates available as I told you.
4. Install TeeChart.
5. Install Report Builder.
If you come across any problem during this process please post here the error messages you get and we will try to help you.
Thanks for the example. I received it, built the application with v7.07 and worked fine. I've attached the .exe I built and a screen-shot at the newsgroups in reply to your message.
I suggest you to upgrade your TeeChart version following those steps:
1. Check whith Digital Metaphors which RB version is compatible with v7.07.
2. Uninstall old RB and TeeChart version from your machine.
3. Install all Delphi 6 udpates available as I told you.
4. Install TeeChart.
5. Install Report Builder.
If you come across any problem during this process please post here the error messages you get and we will try to help you.
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 Paul,
Why don't populate your series like the code snippet below? It's much easier than what you do.
Why don't populate your series like the code snippet below? It's much easier than what you do.
Code: Select all
PROCEDURE TForm1.PopulateCostSplitChart;
BEGIN
Series1.AddPie(27312,'Electric');
Series1.AddPie(1711,'Water');
Series1.AddPie(8586,'Fossil');
END;
procedure TForm1.Button1Click(Sender: TObject);
begin
Series1.Clear;
PopulateCostSplitChart
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 STC,
Have you been able to reproduce this problem in a simple application with TeeChart not being embedded in Report Builder?
Have you been able to reproduce this problem in a simple application with TeeChart not being embedded in Report Builder?
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 |