Hello,
I added a blue line and a red line to the chart. When the points of the two lines are the same, the red line will cover the blue line. How can I make the blue line display to the top layer without changing the order of addition. Is there a z-index like attribute?
How to change the display level of the line
How to change the display level of the line
- Attachments
-
- 1.PNG (12.98 KiB) Viewed 10044 times
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: How to change the display level of the line
Hello,
The Series class has a ZOrder property, but this only works when the Chart is in 3D mode. This means that the only way to achieve this, as things stand, is to swap the order of the Series in the Series collection, as in the following example:Elite wrote: ↑Mon Oct 26, 2020 3:10 amI added a blue line and a red line to the chart. When the points of the two lines are the same, the red line will cover the blue line. How can I make the blue line display to the top layer without changing the order of addition. Is there a z-index like attribute?
Code: Select all
private void InitializeChart(TChart chart)
{
var line1 = new Line(chart.Chart);
var line2 = new Line(chart.Chart);
//chart.Aspect.View3D = true;
for (var i = 0; i < 10; i++)
{
line1.Add(i, 5);
line2.Add(i, 5);
}
}
private void button1_Click(object sender, EventArgs e)
{
//var firstZ = _tChart[0].ZOrder;
//_tChart[0].ZOrder = _tChart[1].ZOrder;
//_tChart[1].ZOrder = firstZ;
//_tChart.Invalidate();
var series = _tChart[0];
_tChart[0] = _tChart[1];
_tChart[1] = series;
_tChart.Invalidate();
}
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: How to change the display level of the line
Why is there no ZOrder property in 2d mode,Will it be implemented in a future version?
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: How to change the display level of the line
Hello,
Basically because we consider 2D mode as having two axes (x,y), and 3D mode as having three (x,y,z).
I have added this feature request to our issue tracker with id=2382, meaning that an implementation of it will be considered for inclusion in a future version.
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |