Recent

Author Topic: order of plotting series  (Read 2882 times)

mtanner

  • Sr. Member
  • ****
  • Posts: 287
order of plotting series
« on: August 30, 2018, 09:23:28 am »
By order I mean which series appears on top of another series, not the order of points within a series. I have a chart with an area series (filled) and a line series. I  want the line to appear on top of the area, but I'm not clear how to do this. Is it controlled by the order of definition or activation of the series, or is there a parameter to control this?APPEAR

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: order of plotting series
« Reply #1 on: August 30, 2018, 09:32:25 am »
Each series has a ZPosition property.
The series are drawn in order of deceasing ZPosition value.
So set the series' ZPosition to 0 for the one you want to be on top, and the one immediately below to 1, etc. depending how many series you have showing on the chart.
What TAChart calls ZPosition is more often termed "z order".

mtanner

  • Sr. Member
  • ****
  • Posts: 287
Re: order of plotting series
« Reply #2 on: August 30, 2018, 10:41:05 am »
Thanks, although I think you mis-stated the rule. When I try it Z=1 appears over the top of Z=0.

wp

  • Hero Member
  • *****
  • Posts: 11854
Re: order of plotting series
« Reply #3 on: August 30, 2018, 10:50:56 am »
ZPosition is correct. But it defines the order in which the elements (series, axes, etc) are drawn. The drawing order is from smallest to highest. Consider Z as a coordinate increasing from the screen towards you. So, if you want a particular series to be on top of another one give it the larger ZPosition.

I would not used 0: Elements with ZPosition are drawn in the order in which they were created.

 

TinyPortal © 2005-2018