TeeChart FireMonkey (Windows,OSX,iOS & Android) for Embarcadero RAD Studio, Delphi and C++ Builder (XE5+)
- Posts: 129
- Joined: Mon Aug 26, 2013 12:00 am
I tried to switch Marks zorder by changing the property of ZOrder of series,
but nothing happened.
Do you have any advice?
Code: Select all
__fastcall TForm12::TForm12(TComponent* Owner)
// Add two Point series
Series1 = new TPointSeries(NULL);
Series1->ParentChart = Chart1;
Series1->Marks->Visible = true;
Series2 = new TPointSeries(NULL);
Series2->ParentChart = Chart1;
Series2->Marks->Visible = true;
for (int n = 0; n < 5; n++)
Series1->Add(n + 1, "Marks1");
Series2->Add(n + 1, "Marks2");
void __fastcall TForm12::btnChangeZOrderClick(TObject *Sender)
// I tried to bring Series1 to front by changing it's ZOrder,
// but the marks of Series1 is still behind Series2
Series1->ZOrder = 100;
- ZOrder.png (48.19 KiB) Viewed 2118 times
- Site Admin
- Posts: 8833
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
The drawing order is determined by the index of the series in the Chart SeriesList.
As you create the series, Series1 has the index 0 and Series2 has the index 1. So Series2 is drawn after Series1.
You can change this with:
SeriesUp and SeriesDown methods are calling ExchangeSeries internally. So another way to do the same in your case: