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.