Specify the bubble size of Bubble Charts

Article ID: 2275
Last updated: 29 May, 2018
Article ID: 2275
Last updated: 29 May, 2018
Revision: 3
Views: 743
Posted: 26 Oct, 2007
by Dean J.
Updated: 29 May, 2018
by Gargani A.

Question

How to specify the bubble size of Bubble Charts?

Answer

Two data sets are implied: The first data set contains the (x,y) pairs that specify the position of each bubble. The second data set contains the bubble sizes as y values; in this data set, the x values are ignored.

The actual size of the bubble displayed is computed according to the following formula:

(maxSize-minSize) * (yValue-min)/(max-min) + minSize

where min and max are the limits of the y-values stored in the size data set, yValue is the y-value of a point in this data set, and

maxSize and minSize are specified by the setMaxSize(int) and setMinSize(int) methods respectively. (Refer to the

IlvSingleBubbleRenderer JavaDoc for more information.)

There are two cases where this formula is simplified to minSize:

  1. When you have only one data point in the "size" data set, then the yValue-min will always be 0.
  2. When you specify the same size for all bubbles within the dataset, yValue-min will also be 0. Hence, the bubble size will always be the value of your minSize in these two scenarios.

To specify the bubble size in these scenarios, you need to explicitly set the minSize value with the appropriate value using IlvSingleBubbleRenderer.setMinSize  method.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2275
Last updated: 29 May, 2018
Revision: 3
Views: 743
Posted: 26 Oct, 2007 by Dean J.
Updated: 29 May, 2018 by Gargani A.
Also listed in


Others in this category