Package com.jbstrap.ui.components.charts
Class BarSeries
java.lang.Object
com.jbstrap.ui.components.charts.Series
com.jbstrap.ui.components.charts.AxesBaseSeries
com.jbstrap.ui.components.charts.BarSeries
- All Implemented Interfaces:
ColorizedSeries<BarSeries>
Series object to be displayed on a bar chart.
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
Fields inherited from class com.jbstrap.ui.components.charts.AxesBaseSeries
VALUE_TANGENT
Fields 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, parentChart
Fields inherited from interface com.jbstrap.ui.components.charts.ColorizedSeries
COLOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BarSeries
fromSeries
(Series series) Creates a BarSeries object based on an other Series object.int
Gets the rounding radius of bar chart corners.Gets the value position in the column.boolean
Checks if values are displayed in the columns.setBarRadius
(int radius) Sets the rounding radius of the bar chart’s corners.setBarTextPositon
(BarTextPosition barTextPosition) Sets the position of value labels on the displayed columns.setBarTextVisible
(boolean visible) Sets if the corresponding values should be displayed in a column.Methods inherited from class com.jbstrap.ui.components.charts.AxesBaseSeries
isShowCategoryValueTangent, isShowSeriesValueTangent, setShowCategoryValueTangent, setShowSeriesValueTangent
Methods 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, setParentChart
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jbstrap.ui.components.charts.ColorizedSeries
getColor, setColor
-
Field Details
-
TEXT_POSITION
- See Also:
-
TEXT_VISIBLE
- See Also:
-
BAR_RADIUS
- See Also:
-
-
Constructor Details
-
BarSeries
Creates a series object to be displayed on a bar chart.- Parameters:
title
- Series title (required)- Throws:
NullPointerException
- Thrown if the specified series name isnull
-
BarSeries
Creates a series object to be displayed on a bar chart.- Parameters:
title
- Series title (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
-
setBarTextPositon
Sets the position of value labels on the displayed columns. By default, value labels are displayed on the top of columns.- Parameters:
barTextPosition
- Value label position Available positions are listed in the enumBarTextPosition
. Ifnull
is specified, value labels are displayed on the top of columns according to the default setting.- Returns:
- Series object
-
getBarTextPosition
Gets the value position in the column.- Returns:
- Value position
-
setBarTextVisible
Sets if the corresponding values should be displayed in a column. By default, value labels are displayed.- Parameters:
visible
- Iftrue
is specified, values are displayed, otherwise not- Returns:
- Series object
-
isBarTextVisible
public boolean isBarTextVisible()Checks if values are displayed in the columns.- Returns:
- If
true
, values are displayed, otherwise not
-
setBarRadius
Sets the rounding radius of the bar chart’s corners. The default rounding setting is 0, that is, bars’ corners are not rounded.- Parameters:
radius
- Rounding radius of bars in a bar chart in pixels If 0 or a smaller value is specified, the bars do not have rounded corners.- Returns:
- Series object
-
getBarRadius
public int getBarRadius()Gets the rounding radius of bar chart corners.- Returns:
- Rounding radius in pixels
-
fromSeries
Creates a BarSeries object based on an other Series object.- Parameters:
series
- The series object used to create the bar series All of the specified series object’s settings are taken over by the bar series. If the specified series does not have the attributes necessary for the bar series, the bar series is created using default values.- Returns:
- The created bar series object
-