How do I know which series is about to be drawn?
I though that it would be passed. I actually thought that I had seen it some where that it was, but I cannot seem to find that reference.
Thanks
Adrian
OnBeforeDrawSeries
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Adrian,
This event is called before the chart paints all series, as you can see in TeeChart's help:
BeforeDrawSeries event is called just before the Series points are painted.
WARNING:
Do not change Series properties that would force the Series to be repainted.
This may cause recursion and endless repainting !
What are you exactly trying to achieve with that? We can try to give you an alternative to achieve what you need.
This event is called before the chart paints all series, as you can see in TeeChart's help:
BeforeDrawSeries event is called just before the Series points are painted.
WARNING:
Do not change Series properties that would force the Series to be repainted.
This may cause recursion and endless repainting !
What are you exactly trying to achieve with that? We can try to give you an alternative to achieve what you need.
Best Regards,
Narcís Calvet / 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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Adrian,
Will this depend on the series visible on the Chart? Could you please be more explicit about what are you trying to achive?
BTW: Have you thought about using TeeChart's OnAfterDraw event? A TChart1.Environment.InternalRepaint call may be sometimes necessary to trigger the event.
I am trying to have a background for each axis that I can turn on and off at will.
Will this depend on the series visible on the Chart? Could you please be more explicit about what are you trying to achive?
BTW: Have you thought about using TeeChart's OnAfterDraw event? A TChart1.Environment.InternalRepaint call may be sometimes necessary to trigger the event.
Best Regards,
Narcís Calvet / 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 |
I have multiple axes that I move around independently of each other. I wish to put a background on each. I have been trying to use the ColorBand, which would work sufficently for part of the application, but I would also want to display a box underneath series higer in the z order but above other series lower in the z order.Will this depend on the series visible on the Chart? Could you please be more explicit about what are you trying to achive?
Example:
Code: Select all
I'm showing this in a code block as it uses a monospaced font.
<--- Back of screen Front of screen --->
Lower z-order Higher z-order
Panel axis-a series-a box-b axis-b series-b axis-c series-c
^ ^ ^ ^ ^ ^ ^ ^
| | | | | | | |
OBDC OBDS OBDS OBDA OBDS OBDA OBDS OADC
- OBDC - OnBeforeDrawChart
OBDA - OnBeforeDrawAxis
OBDS - OnBeforeDrawSeries
OADC - OnAfterDrawChart
I want box-b to be drawn after series-a but before axis-b. However, what I am getting from you is that the z-order is as follows:
Code: Select all
I'm showing this in a code block as it uses a monospaced font
<--- Back of screen Front of screen --->
Lower z-order Higher z-order
Panel axis-a axis-b axis-c series-a series-b series-c
^ ^ ^ ^
| | | |
OBDC OBDA OBDS OADC
I have thought of it but it will cause unwanted overlapping. Unless I cannot find any other way, I will have to rethink how this will be displayed. Do you have any other suggestions?BTW: Have you thought about using TeeChart's OnAfterDraw event? A TChart1.Environment.InternalRepaint call may be sometimes necessary to trigger the event.
Thanks,
Adrian
Hi Adrian,
In that case, a trick could be to use a Shape series (with rectangle style), you can add it just before the series you want to keep on top (or change order when you want).I have multiple axes that I move around independently of each other. I wish to put a background on each. I have been trying to use the ColorBand, which would work sufficently for part of the application, but I would also want to display a box underneath series higer in the z order but above other series lower in the z order.
Pep Jorge
http://support.steema.com
http://support.steema.com