Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2231 - Duplicated Axes when having multiple Ternary series
Summary: Duplicated Axes when having multiple Ternary series
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: 27.190530
Hardware: PC Windows
: --- enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL: https://www.steema.com/support/viewto...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-30 09:54 EDT by yeray alonso
Modified: 2019-09-19 09:11 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2019-08-30 09:54:47 EDT
Just add two TTernarySeries to a chart and you'll see two sets of axes are being drawn:

uses TeeTernary;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.AddSeries(TTernarySeries).FillSampleValues;
  Chart1.AddSeries(TTernarySeries).FillSampleValues;
end;
Comment 1 yeray alonso 2019-09-03 02:22:27 EDT
A workaround is to hide the VertexTitle and Axes once the first Ternary Series has been drawn using BeforeDrawValues event.
Ie:

uses TeeTernary;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  for i:=0 to 2 do
    with TTernarySeries(Chart1.AddSeries(TTernarySeries)) do
    begin
      FillSampleValues;

      if i>0 then
      begin
        VertexTitle.Hide;
        BeforeDrawValues:=BeforeDrawSecond;
      end
      else
        BeforeDrawValues:=BeforeDrawFirst;
    end;
end;

procedure TTernarySeriesForm.BeforeDrawFirst(Sender: TObject);
begin
  Chart1.Axes.Visible:=True;
end;

procedure TTernarySeriesForm.BeforeDrawSecond(Sender: TObject);
begin
  Chart1.Axes.Hide;
end;