New SeriesRegion tool for TeeChart Java

The majority of TeeChart versions already include a tool called SeriesRegion; the time for TeeChart Java to make a step forward has arrived!

To make this tool available you only have to include the according import:

import com.steema.teechart.tools.SeriesRegion;

Then, to use it you only need a chart and a series to link it:

Line line1 = new Line(chart1.getChart());
line1.fillSampleValues(20);

SeriesRegion seriesRegionTool1 = new SeriesRegion(chart1.getChart());
seriesRegionTool1.setSeries(line1);

Other properties this tool includes are AutoBound, UseOrigin, Origin, LowerBound, UpperBound and DrawBehindSeries. You can use the getters and setters to retrieve or set their values. Here a short description of their purpose:

  • AutoBound: If true, region left and right bounds are equal to series minimum and maximum x value.
  • Origin: Region bottom or upper limit. Used only if UseOrigin is true.
  • UseOrigin: If true, region bottom or upper limit is defined by Origin.
  • LowerBound: Defines region left (series not mandatory values) lower bound.
  • UpperBound: Defines region right (series not mandatory values) upper bound.
  • DrawBehindSeries: If true, draw region behind series. If false, draw region over series.

Also note you can access its Brush and Pen like with the other tools inheriting from Tool class.

Playing with this tool and its properties, you can get something like in the image below, extracted from the Features Demo:

SeriesRegion

This tool and the respective demos will be included with the next maintenance release of TeeChart Java (both Swing and SWT) and TeeChart Java for Android.

Yeray Alonso

Developer and coffee master at Steema Software

Leave a Reply

Your email address will not be published. Required fields are marked *