Class BubbleChart

All Implemented Interfaces:
DataDescriptorCallback, ClickableChartData<BubbleChart>, MultiSeriesChart<BubbleChart,BubbleSeries>, SupportBrush<BubbleChart>, SupportLasso<BubbleChart>, SupportZoom<BubbleChart>

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. The bubble size is calculated using data weight values, a new dimension. A greater data weight value means a bigger bubble size. Accordingly, 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.

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 Details

  • Constructor Details

    • BubbleChart

      public BubbleChart(String name)
      Creates the bubble chart.
      Parameters:
      name - Chart name It is mandatory to specify the chart name and it must be unique within the ChartCanvas. Later on, you can reference the chart with the name specified here.
      Throws:
      NullPointerException - Thrown if the specified name is null or it is an empty string
    • BubbleChart

      public 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.
      Parameters:
      name - Chart name It is mandatory to specify the chart name and it must be unique within the ChartCanvas. Later on, you can reference the chart with the name specified here.
      dataDescriptor - The DataDescriptor that contains the chart data
      categoryColumnName - The name of the DataDescriptor containing X axis data If not specified, or null is specified, the framework starts looking for the “CATEGORY” column.
      Throws:
      NullPointerException - Thrown if the specified name is null or it is an empty string
      IllegalArgumentException - 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: BaseChart
      Chart initialization.
      Overrides:
      init in class AxesBasedChart<BubbleChart>
    • addSeries

      public BubbleChart addSeries(Series series)
      Adds a new series to the chart.
      Specified by:
      addSeries in interface MultiSeriesChart<BubbleChart,BubbleSeries>
      Parameters:
      series - Series instance to be added
      Returns:
      Chart
    • setDataWeightName

      public BubbleChart setDataWeightName(String name)
      Sets the name of the column containing data weight in the DataDescriptor.
      Parameters:
      name - Data weight column name
      Returns:
      Chart instance
    • getDataWeightName

      public String getDataWeightName()
      Gets the name of the DataDescriptor column containing data weight values.
      Returns:
      Data weight column name or null if no data weight column was set
    • onSuccess

      public void onSuccess(List<Record> data)
      Description copied from interface: DataDescriptorCallback
      The method is invoked, if the async data handling operation was successful.
      Specified by:
      onSuccess in interface DataDescriptorCallback
      Overrides:
      onSuccess in class SeriesBasedChart<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.