Ternary Series Assigning a Color

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
DataInspector
Newbie
Newbie
Posts: 1
Joined: Fri Aug 14, 2020 12:00 am

Ternary Series Assigning a Color

Post by DataInspector » Fri Jul 30, 2021 9:21 pm

How do you assign a single color per series on a ternary plot? Do I need to set it programmatically, or can I sent it to choose colors in the editor.

My code now looks like this

Code: Select all

  NameOld := NameNew;
  TriPlotSeries := TTernarySeries.Create(Self);
  TriPlotSeries.ParentChart := ChartTriPlot;
  TriPlotSeries.Title := NameNew;
  TriPlotSeries.pointer.Style := psDonut;
  TriPlotSeries.pointer.Size := 10;
  TriPlotSeries.Pointer.Visible := True;
  TriPlotSeries.VertexTitles[0].Text := cxLookupComboBoxTriAnal1.EditText;
  TriPlotSeries.VertexTitles[1].Text := cxLookupComboBoxTriAnal2.EditText;
  TriPlotSeries.VertexTitles[2].Text := cxLookupComboBoxTriAnal3.EditText;

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

Re: Ternary Series Assigning a Color

Post by Yeray » Mon Aug 02, 2021 11:31 am

Hello,

Creating 3 ternary series, each one using it's own color, by code:

Code: Select all

uses TeeTernary;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Chart1.Walls.Back.Hide;

  for i:=0 to 2 do
    with TTernarySeries(Chart1.AddSeries(TTernarySeries)) do
    begin
      FillSampleValues;
      ColorEachPoint:=False;
      UseColorRange:=False;
      UsePalette:=False;
    end;
end;
Creating 3 ternary series, each one using it's own color, at design-time.
- Disable the Back wall visibility:
bds_2021-08-02_13-27-46.png
bds_2021-08-02_13-27-46.png (14.26 KiB) Viewed 5998 times
- Disable ColorEach for all the 3 Ternary series:
bds_2021-08-02_13-27-55.png
bds_2021-08-02_13-27-55.png (15.28 KiB) Viewed 5998 times
Here is what I get:
Project1_2021-08-02_13-30-42.png
Project1_2021-08-02_13-30-42.png (18.95 KiB) Viewed 5998 times
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