Class BubbleChart
- All Implemented Interfaces:
DataDescriptorCallback,ClickableChartData<BubbleChart>,MultiSeriesChart<BubbleChart,,BubbleSeries> SupportBrush<BubbleChart>,SupportLasso<BubbleChart>,SupportZoom<BubbleChart>
In case of multiple series, bubbles are displayed in different colors.
A bubble chart is a special chart that is capable of displaying multiple series. Series data are displayed in two dimensions. Data points are visualized as bubbles, with the bubble center being in the intersection of the X and Y axes according to the Y value. A greater data weight value means a bigger bubble size. Users can see a visualization of not only data values, but also data weight values. In case of multiple series, bubbles are displayed in different colors. The Bubble chart has its own, unique tooltip, as it can list 3 lines of information.
This feature can be especially useful if a huge amount of data is displayed. Users can zoom in on the chart and move it by using the mouse, scrolling the zoomed in area on the screen. The scrolling feature is not available if the lasso feature is enabled. You can use the brush feature for this purpose.This chart supports the brush feature. After enabling the brush feature, a miniature view of the chart appears at the bottom. Enabling the brush feature automatically enables the zoom feature, allowing the user to have a detailed view of the chart. The miniature view allows the user to move the chart to the left or right. In the miniature view, a dark area indicates which part of the chart is currently in. If the user moves the darkened area, the chart also moves with it accordingly.
The chart also supports the click event. This event is triggered if the user clicks on a specific data point.
If the event is triggered, the server side can read which record the user clicked on. This record can be used in any
business logic.
- Since:
- 4.0
- Author:
- JBStrap
- See Also:
-
Field Summary
FieldsFields inherited from class com.jbstrap.ui.components.charts.AxesBasedChart
FONT_COLOR, FORMAT, HORIZONTAL, MAX_VALUE, MIN_VALUE, POSTFIX, PREFIX, SHOW, SHOW_GRID, SHOW_LINE, SHOW_TICKS, SHOW_VALUE_LABEL, STRIPED, STRIPED_START, SUPPORTED_TOOLTIP_TYPES, TICK_TEXT_ROTATE, TITLE, X_AXIS, Y_AXISFields inherited from class com.jbstrap.ui.components.charts.SeriesBasedChart
categoryColumn, dataDescriptor, defaultFilterCriteria, filterCriteria, seriesFields inherited from class com.jbstrap.ui.components.charts.BaseChart
brushable, canvas, defaultTooltipType, handlers, NAME, params, supportedTooltipTypes, tooltipContent, tooltipType, zoomableFields inherited from interface com.jbstrap.ui.components.charts.SupportLasso
LASSO -
Constructor Summary
ConstructorsConstructorDescriptionBubbleChart(String name) Creates the bubble chart.BubbleChart(String name, DataDescriptor dataDescriptor, String categoryColumnName) Creates the bubble chart component and sets the name of the DataDescriptor and that of the X axis column. -
Method Summary
Modifier and TypeMethodDescriptionAdds a new series to the chart.Gets the name of the DataDescriptor column containing data weight values.protected voidinit()Chart initialization.voidThe method is invoked, if the async data handling operation was successful.setDataWeightName(String name) Sets the name of the column containing data weight in the DataDescriptor.Methods inherited from class com.jbstrap.ui.components.charts.AxesBasedChart
getXAxis, getXAxisDateFormat, getXAxisFontColor, getXAxisStripedStrart, getXAxisTickTextRotate, getXAxisTitle, getXAxisType, getXAxisValuePostfix, getXAxisValuePrefix, getYAxis, getYAxisFontColor, getYAxisMaxValue, getYAxisMinValue, getYAxisStripedStrart, getYAxisTitle, getYAxisValuePostfix, getYAxisValuePrefix, isXAxisShow, isXAxisShowGrid, isXAxisShowLine, isXAxisShowTicks, isXAxisShowValueLabel, isXAxisStriped, isYAxisShow, isYAxisShowGrid, isYAxisShowLine, isYAxisShowTicks, isYAxisShowValueLabel, isYAxisStriped, setXAxisDateFormat, setXAxisFontColor, setXAxisShow, setXAxisShowGrid, setXAxisShowLine, setXAxisShowTicks, setXAxisShowValueLabel, setXAxisStriped, setXAxisStripedStart, setXAxisTickTextRotate, setXAxisTitle, setXAxisType, setXAxisValuePostfix, setXAxisValuePrefix, setYAxisFontColor, setYAxisMaxValue, setYAxisMinValue, setYAxisShow, setYAxisShowGrid, setYAxisShowLine, setYAxisShowTicks, setYAxisShowValueLabel, setYAxisStriped, setYAxisStripedStart, setYAxisTitle, setYAxisValuePostfix, setYAxisValuePrefixMethods inherited from class com.jbstrap.ui.components.charts.SeriesBasedChart
_addSeries, _getSeries, _getSeriesNames, clear, fetchData, generateJSON, getCategoryColumnName, getDataColumnBySeriesName, getDataDescriptor, getDefaultFilterCriteria, getFilterCriteria, onError, refreshData, registerDataColumn, removeSeries, setDataDescriptor, setDefaultFilterCriteria, setFilterCriteriaMethods inherited from class com.jbstrap.ui.components.charts.BaseChart
getCanvas, getDefaultTooltipType, getHandlers, getName, getSupportedTooltipTypes, runJs, setParentMethods 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.ClickableChartData
addClickHandlerMethods inherited from interface com.jbstrap.ui.components.charts.MultiSeriesChart
getSeries, getSeriesNamesMethods inherited from interface com.jbstrap.ui.components.charts.SupportBrush
isBrushable, setBrushableMethods inherited from interface com.jbstrap.ui.components.charts.SupportLasso
addLassoHandler, isLassoEnabled, setLassoEnabledMethods inherited from interface com.jbstrap.ui.components.charts.SupportZoom
isZoomable, setZoomable
-
Field Details
-
Z_NAME
- See Also:
-
-
Constructor Details
-
BubbleChart
Creates the bubble chart.- Parameters:
name- Chart name It is mandatory to specify the chart name and it must be unique within theChartCanvas. Later on, you can reference the chart with the name specified here.- Throws:
NullPointerException- Thrown if the specified name isnullor it is an empty string
-
BubbleChart
Creates the bubble chart component and sets the name of the DataDescriptor and that of the X axis column.- Parameters:
name- Chart name It is mandatory to specify the chart name and it must be unique within theChartCanvas. Later on, you can reference the chart with the name specified here.dataDescriptor- The DataDescriptor that contains the chart datacategoryColumnName- The name of the DataDescriptor containing X axis data If not specified, ornullis specified, the framework starts looking for the “CATEGORY” column.- Throws:
NullPointerException- Thrown if the specified name isnullor it is an empty stringIllegalArgumentException- Thrown if the column specified in the categoryColumnName parameter is not found in the DataDescriptor or if the categoryColumnName parameter is not specified and no “CATEGORY” column is found in the DataDescriptor.
-
-
Method Details
-
init
protected void init()Description copied from class:BaseChartChart initialization.- Overrides:
initin classAxesBasedChart<BubbleChart>
-
addSeries
Adds a new series to the chart.- Specified by:
addSeriesin interfaceMultiSeriesChart<BubbleChart,BubbleSeries> - Parameters:
series- Series instance to be added- Returns:
- Chart
-
setDataWeightName
Sets the name of the column containing data weight in the DataDescriptor.- Parameters:
name- Data weight column name- Returns:
- Chart instance
-
getDataWeightName
Gets the name of the DataDescriptor column containing data weight values.- Returns:
- Data weight column name or
nullif no data weight column was set
-
onSuccess
Description copied from interface:DataDescriptorCallbackThe method is invoked, if the async data handling operation was successful.- Specified by:
onSuccessin interfaceDataDescriptorCallback- Overrides:
onSuccessin classSeriesBasedChart<BubbleChart>- Parameters:
data- The list of records that are returned. In the cause of a query, the query results. In the case of a save, the saved records.
-