Package com.jbstrap.ui.components.charts
Class AreaSeries
java.lang.Object
com.jbstrap.ui.components.charts.Series
com.jbstrap.ui.components.charts.AxesBaseSeries
com.jbstrap.ui.components.charts.AreaSeries
- All Implemented Interfaces:
AdvancedMarker<AreaSeries>,ColorizedSeries<AreaSeries>
public class AreaSeries
extends AxesBaseSeries
implements AdvancedMarker<AreaSeries>, ColorizedSeries<AreaSeries>
Series object to be displayed on an area chart.
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class com.jbstrap.ui.components.charts.AxesBaseSeries
VALUE_TANGENTFields inherited from class com.jbstrap.ui.components.charts.Series
CATEGORY_COLUMN, COLOR_COLUMN, colorColumn, DATA_COLUMN, dataColumn, LABEL_COLUMN, labelColumn, MARKER_SIZE, MARKER_TYPE, param, parentChartFields inherited from interface com.jbstrap.ui.components.charts.AdvancedMarker
MARKER_FILL_COLOR, MARKER_LINE_COLOR, MARKER_LINE_WIDTH, SHOW_MARKERFields inherited from interface com.jbstrap.ui.components.charts.ColorizedSeries
COLOR -
Constructor Summary
ConstructorsConstructorDescriptionAreaSeries(String title) Creates a series object to be displayed on an area chart.AreaSeries(String title, String dataColumn) Creates a series object to be displayed on an area chart. -
Method Summary
Modifier and TypeMethodDescriptionstatic AreaSeriesfromSeries(Series series) Creates an AreaSeries object based on an other Series object.Gets the chart’s area delimiter line type.Gets the dash arrayintGets the delimiter line width.booleanChecks if the area chart is filled with a color gradient.booleanDetermine if the boundary line is visible on the area chartsetCurveType(CurveType type) Sets how the area delimiter is displayed on the area chart.setDashArray(String dashArray) Sets the line dash type.setGradient(boolean gradient) Sets if the area chart should be filled with a solid color or a gradient.setLineWidth(int lineWidth) Sets the line width of the area delimiter.setShowLine(boolean showLine) Set whether the boundary line is visible on the area chart.Methods inherited from class com.jbstrap.ui.components.charts.AxesBaseSeries
isShowCategoryValueTangent, isShowSeriesValueTangent, setShowCategoryValueTangent, setShowSeriesValueTangentMethods inherited from class com.jbstrap.ui.components.charts.Series
addData, addData, addData, addData, clear, getColorColumn, getData, getDataColumn, getLabelColumn, getMarker, getMarkerSize, getMarkerType, getParams, getTitle, getValues, isEmpty, refreshMarker, removeDataByCategory, removeDataByIndex, setColorColumn, setDataColumn, setLabelColumn, setMarkerSize, setMarkerType, setParams, setParentChartMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jbstrap.ui.components.charts.AdvancedMarker
getMarkerFillColor, getMarkerLineColor, getMarkerLineWidth, isShowMarker, setMarkerFillColor, setMarkerLineColor, setMarkerLineWidth, setShowMarkerMethods inherited from interface com.jbstrap.ui.components.charts.ColorizedSeries
getColor, setColor
-
Field Details
-
CURVE_TYPE
- See Also:
-
DASH_ARRAY
- See Also:
-
LINE_WIDTH
- See Also:
-
GRADIENT
- See Also:
-
SHOW_LINE
- See Also:
-
-
Constructor Details
-
AreaSeries
Creates a series object to be displayed on an area chart.- Parameters:
title- Series name (required)- Throws:
NullPointerException- Thrown if the specified series name isnull
-
AreaSeries
Creates a series object to be displayed on an area chart.- Parameters:
title- Series name (required)dataColumn- The name of the data column that contains the displayed series in the DataDescriptor- Throws:
NullPointerException- Thrown if the specified series name isnull
-
-
Method Details
-
setCurveType
Sets how the area delimiter is displayed on the area chart. Default value:CurveType.SMOOTH, the delimiter appears smoothed.- Parameters:
type- Line type setting Available types are listed in the enumCurveType. Ifnullis specified, the line is displayed using the default settingCurveType.SMOOTH, that is, smoothed.- Returns:
- Series object
-
getCurveType
Gets the chart’s area delimiter line type.- Returns:
- Chart area delimiter line type
-
setLineWidth
Sets the line width of the area delimiter. The default delimiter line width is 3 pixels.- Parameters:
lineWidth- Delimiter line width in pixels- Returns:
- Series object
-
getLineWidth
public int getLineWidth()Gets the delimiter line width.- Returns:
- Delimiter line width
-
setDashArray
Sets the line dash type. The method requires a number sequence (unlimited number of items) as parameter. The first item always determines the line section length, whereas the second item represents a space between two line sections. E.g. [20,20] means that a 20-pixel line section is followed by 20 pixels of space, thereby creating a dashed line.- Parameters:
dashArray- The number sequence in the String format- Returns:
- Series object
-
getDashArray
Gets the dash array- Returns:
- The dash arra or
nullif not set
-
setGradient
Sets if the area chart should be filled with a solid color or a gradient. The default fill setting is a solid fill.- Parameters:
gradient- Iftrueis specified, the area is filled with a color gradient, otherwise with a solid color- Returns:
- Series object
-
isGradient
public boolean isGradient()Checks if the area chart is filled with a color gradient.- Returns:
- If
trueis specified, the area is filled with a color gradient, otherwise with a solid color
-
setShowLine
Set whether the boundary line is visible on the area chart. The boundary line is visible by default.- Parameters:
showLine- Iftrueis set, the boundary line is visible, otherwise it is not- Returns:
- Series object
-
isShowLine
public boolean isShowLine()Determine if the boundary line is visible on the area chart- Returns:
- If
true, the boundary line is visible, otherwise it is not
-
fromSeries
Creates an AreaSeries object based on an other Series object.- Parameters:
series- The series object used to create the area series All of the specified series object’s settings are taken over by the area series. If the specified series does not have the attributes necessary for the area series, the area series is created using default values.- Returns:
- The created area series object
-