Page 1 of 2

Random Total Values Appearing In Pie Chart

Posted: Thu Oct 12, 2006 3:27 pm
by 9231248
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

Posted: Fri Oct 13, 2006 11:11 am
by narcis
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?

Posted: Fri Oct 13, 2006 11:22 am
by 9231248
I am using v7 Pro

Posted: Fri Oct 13, 2006 11:27 am
by 9231248
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

Posted: Fri Oct 13, 2006 11:33 am
by narcis
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.

Posted: Fri Oct 13, 2006 11:37 am
by 9231248
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!

Posted: Fri Oct 13, 2006 11:39 am
by narcis
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.

Posted: Fri Oct 13, 2006 11:50 am
by 9231248
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

Posted: Fri Oct 13, 2006 12:01 pm
by narcis
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.

Posted: Fri Oct 13, 2006 2:22 pm
by 9231248
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

Posted: Fri Oct 13, 2006 4:15 pm
by 9231248
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

Posted: Fri Oct 13, 2006 4:31 pm
by narcis
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;

Posted: Fri Oct 13, 2006 4:41 pm
by 9231248
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?

Posted: Fri Oct 13, 2006 4:47 pm
by 9231248
I am using Report Builder 10.04 but the issue also happens on 10.02, and probably earlier releases

Posted: Mon Oct 16, 2006 7:55 am
by narcis
Hi STC,

Have you been able to reproduce this problem in a simple application with TeeChart not being embedded in Report Builder?