Getting Ternary Series to work

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Errol
Newbie
Newbie
Posts: 22
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: 8587
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) Not downloaded yet
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 Image Please read our Bug Fixing Policy

Post Reply