Random Total Values Appearing In Pie Chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
STC
Newbie
Newbie
Posts: 23
Joined: Wed Mar 10, 2004 5:00 am

Random Total Values Appearing In Pie Chart

Post by STC » 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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 13, 2006 11:11 am

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?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

STC
Newbie
Newbie
Posts: 23
Joined: Wed Mar 10, 2004 5:00 am

Post by STC » Fri Oct 13, 2006 11:22 am

I am using v7 Pro

STC
Newbie
Newbie
Posts: 23
Joined: Wed Mar 10, 2004 5:00 am

Post by STC » Fri Oct 13, 2006 11:27 am

I remember trying to update to version 7.6 a while ago and it gave us massive problems

We are using Report Builder 10 with TeeChart but cannot upgrade from Delphi 6

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 13, 2006 11:33 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

STC
Newbie
Newbie
Posts: 23
Joined: Wed Mar 10, 2004 5:00 am

Post by STC » Fri Oct 13, 2006 11:37 am

I cant quite remember now, I think it was something to do with entry points in the BPL files

Is the only way of fixing this installing 7.07 of TeeChart? I am just concerned about my whole development environment being screwed and having to spend ages rebuilding it!

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 13, 2006 11:39 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

STC
Newbie
Newbie
Posts: 23
Joined: Wed Mar 10, 2004 5:00 am

Post by STC » Fri Oct 13, 2006 11:50 am

I have posted it to the newsgroup

However, my Outlook Express does not show the message or attachment

Please confirm whether or not you can see it

Cheers

Paul

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 13, 2006 12:01 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

STC
Newbie
Newbie
Posts: 23
Joined: Wed Mar 10, 2004 5:00 am

Post by STC » Fri Oct 13, 2006 2:22 pm

Hello

This is the error I get

The procedure entry point @TeeProcs@TCustomTeePanel@SetBorderStyle$qqr22Forms@TFormBorderStyle could not be found in the dynamic link library Tee76.bpl

Any ideas?

Cheers

Paul

STC
Newbie
Newbie
Posts: 23
Joined: Wed Mar 10, 2004 5:00 am

Post by STC » Fri Oct 13, 2006 4:15 pm

Hello

Got it all compiling now

Now it works in design time but not at runtime

I have modified the example provided earlier and reposted to the news group

Please can you run the demo and tell me what I am doing wrong

The chart pies do not update?

Cheers

Paul

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 13, 2006 4:31 pm

Hi Paul,

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
Image Image Image Image Image Image
Instructions - How to post in this forum

STC
Newbie
Newbie
Posts: 23
Joined: Wed Mar 10, 2004 5:00 am

Post by STC » Fri Oct 13, 2006 4:41 pm

This works fine now in that demo program

Now for the big problem - This still does not work within my Report Builder report

Have you got Report Builder?

STC
Newbie
Newbie
Posts: 23
Joined: Wed Mar 10, 2004 5:00 am

Post by STC » Fri Oct 13, 2006 4:47 pm

I am using Report Builder 10.04 but the issue also happens on 10.02, and probably earlier releases

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Oct 16, 2006 7:55 am

Hi STC,

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply