I have a line series. I would like to fill a region between X1 and X2, above Y1 and below the series. I would also like to fill another region between X3 and X4, above the series and below Y2. (Actually, there are many such regions, but for the sake of the example, suppose there are only two.)
Is it possible? I am using the latest TeeChart VCL Pro. Thank you.
Fill a region under or over a series
-
- Newbie
- Posts: 29
- Joined: Tue Oct 13, 2015 12:00 am
Re: Fill a region under or over a series
Hello,
This sounds exactly as what the TSeriesRegionTool does: The Features Demo and the documentation are shipped with the binary installation.
This sounds exactly as what the TSeriesRegionTool does: The Features Demo and the documentation are shipped with the binary installation.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 29
- Joined: Tue Oct 13, 2015 12:00 am
Re: Fill a region under or over a series
Thank you. Is it possible to limit the filling to certain discrete ranges of X? I.e. can the SeriesRegion be turned on and off at various X-values?
Re: Fill a region under or over a series
Hi,
As you can see in the demo, the TSeriesRegionTool has LowerBound and UpperBound. This is X0 and X1 if it is associated to a "vertical" series (it would be Y0 and Y1 if it was associated to a THorizLineSeries ie).
This means you can only set a region with a tool; but you can create as many regions as you wish adding more TSeriesRegionTools.
Ie, taking the example in the Features Demo and playing a bit with the editor:
As you can see in the demo, the TSeriesRegionTool has LowerBound and UpperBound. This is X0 and X1 if it is associated to a "vertical" series (it would be Y0 and Y1 if it was associated to a THorizLineSeries ie).
This means you can only set a region with a tool; but you can create as many regions as you wish adding more TSeriesRegionTools.
Ie, taking the example in the Features Demo and playing a bit with the editor:
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 29
- Joined: Tue Oct 13, 2015 12:00 am
Re: Fill a region under or over a series
Thanks again. It is working really well for me!
One further question please - do you know of an easy way to calculate the area of a SeriesRegion? I have been exploring doing it by establishing a list of points that approximates the region and then applying Green's Theorem in the plane to calculate the area. This is proving a lot of work and I wondered if you knew of an easier way or had maybe already established a function to do this?
One further question please - do you know of an easy way to calculate the area of a SeriesRegion? I have been exploring doing it by establishing a list of points that approximates the region and then applying Green's Theorem in the plane to calculate the area. This is proving a lot of work and I wondered if you knew of an easier way or had maybe already established a function to do this?
Re: Fill a region under or over a series
Hello,
Have you tried to spit the polygon and calculate the area of the rectangle and the right triangle? Ie:
Have you tried to spit the polygon and calculate the area of the rectangle and the right triangle? Ie:
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |