Getting Ternary Series to work

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Errol
Newbie
Newbie
Posts: 35
Joined: Mon Jul 02, 2018 12:00 am

Getting Ternary Series to work

Post by Errol » Tue Feb 12, 2019 2:09 am

Good afternoon
I am trying to get the Ternary Series to compile. I have attached my code, based on the example in Features. No errors are reported but it throws up an error in TeCanvas, to do with TextOut. I would be grateful if you could take a look at this.
Thanks and regards
Errol

Code: Select all

unit TernarySeries;

{$I TeeDefs.inc}

interface

uses
  {$IFNDEF LINUX}
  Winapi.Windows, Winapi.Messages,
  {$ENDIF}
  System.SysUtils, System.Classes, System.Variants,
  {$IFDEF CLX}
  QGraphics, QControls, QForms, QDialogs, QExtCtrls, QStdCtrls, QComCtrls,
  {$ELSE}
  Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.StdCtrls, Vcl.ComCtrls,
  {$ENDIF}
  Base, TeEngine, Series, TeeProcs, Chart, TeeTools, TeeSurfa, TeeTernary,
  VclTee.TeeGDIPlus;

type
  TTernarySeriesForm = class(TBaseForm)
    Chart1: TChart;
    Panel1: TPanel;
    Button1: TButton;
    Series1: TTernarySeries;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Chart1BeforeDrawAxes(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  TernarySeriesForm: TTernarySeriesForm;

implementation

{$IFNDEF CLX}
{$R *.DFM}
{$ELSE}
{$R *.xfm}
{$ENDIF}

Uses EditChar, TeeConst;

procedure TTernarySeriesForm.Button1Click(Sender: TObject);
begin
  EditSeries(Self,Series1);
end;

procedure TTernarySeriesForm.FormCreate(Sender: TObject);
begin
  inherited;
  Series1.FillSampleValues(10);
  Series1.UseColorRange:=false;

  Series1.Pointer.Style:=psCircle;
  Series1.Pointer.Transparency:=20;

  Series1.TernaryStyle:=tsBubble;
  Series1.TernaryLegendStyle:=tlsBubbleWeight;

  Chart1.Legend.Title.Text.Add(TeeMsg_TernaryMarkRadius + ', ' + TeeMsg_TernaryMarkWeight);
  Chart1.Legend.Title.Visible:=true;
end;

procedure TTernarySeriesForm.Chart1BeforeDrawAxes(Sender: TObject);
begin
  Chart1.Legend.Title.Visible := Series1.ColorEachPoint;
end;

initialization
  RegisterClass(TTernarySeriesForm);
end.

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Getting Ternary Series to work

Post by Yeray » Mon Feb 18, 2019 10:34 am

Hello,

I find no errors with the attached project in RAD 10.3 Rio and TeeChart v2018.26.
testTernary.zip
(2.09 KiB) Downloaded 1018 times
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Errol
Newbie
Newbie
Posts: 35
Joined: Mon Jul 02, 2018 12:00 am

Re: Getting Ternary Series to work

Post by Errol » Tue Feb 19, 2019 4:29 am

Hello Yeray

Thank you for your comment and suggestions. I apologise for not sending the complete project. However, I managed to get it to run by adding VCLTee to Unit scope names in Delphi Options | Library.

Unfortunately, I am unable to run the program you provided. I am using Delphi XE10.1 Berlin and have just downloaded and installed TeeChart 2018.26. The error I get is shown here
TernarySeries_RunError.jpg
TernarySeries_RunError.jpg (42.36 KiB) Viewed 16474 times
.

Any assistance gratefully received.

Best regards

Errol

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Getting Ternary Series to work

Post by Yeray » Tue Feb 19, 2019 11:27 am

Hello Errol,

That error seems to suggest you don't have the latest TeeChart packages installed in Berlin because the HoverElement property was introduced in v2018.26.
Anyway, you should be able to manually edit the .dfm and remove the line where the HoverElement property is used. then you should be able to load the form without problems.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Errol
Newbie
Newbie
Posts: 35
Joined: Mon Jul 02, 2018 12:00 am

Re: Getting Ternary Series to work

Post by Errol » Wed Feb 20, 2019 3:43 am

Good afternoon Yeray

Thank you for your reply. You are quite right - during installation I was distracted when asked to run TeeRecompile and somehow assumed it had executed. Many apologies. However, I still have problems:
1. When I run TeeRecompile I initially get this error.
SDK_hpp_Header_files_missing.jpg
Windows header files missing
SDK_hpp_Header_files_missing.jpg (207.55 KiB) Viewed 16462 times
I ignored this as I am not using any C++ projects (and the link provided is not helpful as I do not have a current subscription for Delphi XE10.1).
However, I still get an error when running your projects, as shown below:
[dcc32 Fatal Error] VCLTee.TeeHtml.pas(933): F2039 Could not create output file 'C:\Program Files (x86)\Steema Software\Steema TeeChart Pro VCL FMX Source Code 2018.26\Source\VCL\VCLTee.TeeHtml.dcu
If I manually copy VCLTee.TeeHtml.dcu from Steema TeeChart Pro VCL FMX Source Code 2018.26\Compiled\Delphi24.win32\Lib to \Source\VCL then this error is replaced by another missing dcu.
If I specify Steema Software\Steema TeeChart Pro VCL FMX Source Code 2018.26\Source\VCL as the folder to Copy binary files to, then your test program compiles and runs. It is not obvious that I have to do this, as there is no documentation on TeeCompile at all (INSTALL.TXT is not present).
2. Somewhere in the process of installing the latest version of TeeChart, something has broken in my regular programs. I get the following error when loading forms that use VCLTee components.
Form_Error1.jpg
Error opening form that uses VCLTee units
Form_Error1.jpg (49 KiB) Viewed 16462 times
Have you any ideas what might have gone wrong here?
Thanks and regards
Errol

Errol
Newbie
Newbie
Posts: 35
Joined: Mon Jul 02, 2018 12:00 am

Re: Getting Ternary Series to work

Post by Errol » Thu Feb 21, 2019 12:52 am

Good afternoon Yeray
I have solved the problems with some forms containing TeeChart components not opening. Evidently a component library had to be rebuilt before these forms would work. Many apologies for any inconvenience caused.
Thanks and regards
Errol

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Getting Ternary Series to work

Post by Yeray » Thu Feb 21, 2019 2:51 pm

Errol wrote:
Wed Feb 20, 2019 3:43 am
However, I still get an error when running your projects, as shown below:
[dcc32 Fatal Error] VCLTee.TeeHtml.pas(933): F2039 Could not create output file 'C:\Program Files (x86)\Steema Software\Steema TeeChart Pro VCL FMX Source Code 2018.26\Source\VCL\VCLTee.TeeHtml.dcu
If I manually copy VCLTee.TeeHtml.dcu from Steema TeeChart Pro VCL FMX Source Code 2018.26\Compiled\Delphi24.win32\Lib to \Source\VCL then this error is replaced by another missing dcu.
If I specify Steema Software\Steema TeeChart Pro VCL FMX Source Code 2018.26\Source\VCL as the folder to Copy binary files to, then your test program compiles and runs. It is not obvious that I have to do this, as there is no documentation on TeeCompile at all (INSTALL.TXT is not present).
The error indicating "could not create output file ..." suggests a lack of permissions. If you still have problems, I'd try running TeeRecompile "as administrator".
Errol wrote:
Wed Feb 20, 2019 3:43 am
2. Somewhere in the process of installing the latest version of TeeChart, something has broken in my regular programs. I get the following error when loading forms that use VCLTee components.
Image
Have you any ideas what might have gone wrong here?
If you still have problems, I would try to reinstall TeeChart using the "..\Compiled" Relative Destination as per default, and "as administrator" to avoid permissions limitations.
Errol wrote:
Thu Feb 21, 2019 12:52 am
I have solved the problems with some forms containing TeeChart components not opening. Evidently a component library had to be rebuilt before these forms would work. Many apologies for any inconvenience caused.
Great! Don't hesitate to let us know if you still find problems with it.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply