Package com.jbstrap.ui.components.charts
Class BubbleSeries
java.lang.Object
com.jbstrap.ui.components.charts.Series
com.jbstrap.ui.components.charts.AxesBaseSeries
com.jbstrap.ui.components.charts.BubbleSeries
- All Implemented Interfaces:
AdvancedMarker<BubbleSeries>,ColorizedSeries<BubbleSeries>
public class BubbleSeries
extends AxesBaseSeries
implements AdvancedMarker<BubbleSeries>, ColorizedSeries<BubbleSeries>
Series object displayed on bubble charts.
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionBubbleSeries(String title) Creates a series object displayed on bubble charts.BubbleSeries(String title, String dataColumn) Creates a series object displayed on bubble charts and sets the name of the data column.BubbleSeries(String title, String dataColumn, String weightColumn) Creates a series object displayed on bubble charts and sets the name of columns containing the data and data weight values. -
Method Summary
Modifier and TypeMethodDescriptionprotected SeriesAdds a new record to the list grid.Adds new data to the chart.protected SeriesAdds new data to the chart.static BubbleSeriesfromSeries(Series series) Creates a bubble series object based on an other Series object.Gets the data weight column name.setDataWeightColumnName(String dataWeightColumnName) Sets the data weight column name.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, 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
-
Z
- See Also:
-
-
Constructor Details
-
BubbleSeries
Creates a series object displayed on bubble charts.- Parameters:
title- Series title (required)- Throws:
NullPointerException- Thrown if the specified series name isnull
-
BubbleSeries
Creates a series object displayed on bubble charts and sets the name of the data column.- 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
-
BubbleSeries
Creates a series object displayed on bubble charts and sets the name of columns containing the data and data weight values.- Parameters:
title- Series title (required)dataColumn- The name of the data column that contains the displayed series in the DataDescriptorweightColumn- The name of the column containing data weight in the DataDescriptor- Throws:
NullPointerException- Thrown if the specified series name isnull
-
-
Method Details
-
fromSeries
Creates a bubble series object based on an other Series object.- Parameters:
series- The series object used to create the bubble series All of the specified series object’s settings are taken over by the bubble series. If the specified series does not have the attributes necessary for the bubble series, the bubble series is created using default values.- Returns:
- The created bubble series object
-
setDataWeightColumnName
Sets the data weight column name. On the bubble chart, the size of the bubble associated with the data is set according to the weight of the data. If the data has a bigger weight, the bubble is larger, if the data weight is smaller, the bubble diameter is smaller on the chart.- Parameters:
dataWeightColumnName- Data weight column name in the DataDescriptor- Returns:
- Series object
-
getDataWeightColumnName
Gets the data weight column name.- Returns:
- Data weight column name or
null, if the column name is not specified or the chart does not use a DataDescriptor
-
addData
Adds new data to the chart.- Parameters:
x- X axis value You cannot specify a value that isnull.y- Y axis data valuez- Data weightlabel- Data point label Ifnullis specified, no data labels are displayed.color- Bubble color Ifnullis specified, the bubble color is automatically calculated using the series color.- Returns:
- Series object
- Throws:
NullPointerException- Thrown if the X axis value isnullNullPointerException- Thrown if the Y axis component in the record is not a number or the type of the X axis component does not correspond to the chart’s specified axis type
-
addData
protected Series addData(Object x, Number y, Number z, String label, String color, boolean refreshData) Adds new data to the chart.- Parameters:
x- X axis value You cannot specify a value that isnull.y- Y axis data valuez- Data weightlabel- Data point label Ifnullis specified, no data labels are displayed.color- Bubble color Ifnullis specified, the bubble color is automatically calculated using the series color.refreshData- A Boolean value indicating whether the chart should be updated upon adding a new data value If not specified ortrue, the chart is updated. Otherwise it is not updated. If you want to add multiple data values to the chart at the same time, it is advisable to do so without updating the chart and only perform the update after adding the last data value. Upon adding the last data value, the chart should be updated manually to avoid excessive data usage.- Returns:
- Series object
- Throws:
NullPointerException- Thrown if the X axis value isnullNullPointerException- Thrown if the Y axis component in the record is not a number or the type of the X axis component does not correspond to the chart’s specified axis type
-
addData
Adds a new record to the list grid.- Overrides:
addDatain classSeries- Parameters:
record- The record to be added to the seriesrefreshData- A Boolean indicating whether the interface should be updated upon adding a new record Iftrueis specified, the interface is automatically updated upon adding a new record. The chart receives all data again. Iffalseis specified, the update does not take place. It is advisable to use this method when adding multiple records to the chart consecutively and perform an update only after adding the last record.- Returns:
- Series object
- Throws:
NullPointerException- Thrown if the X axis component in the record isnullNullPointerException- Thrown if the Y axis component in the record is not a number or the type of the X axis component does not correspond to the chart’s specified axis type
-