This Mixin provides reusable functionalities for any chart that needs to visualize data using bubbles.
- Mixes In:
- Source:
Methods
-
elasticRadius( [elasticRadius])
-
Turn on or off the elastic bubble radius feature, or return the value of the flag. If this feature is turned on, then bubble radii will be automatically rescaled to fit the chart better.
Parameters:
Name Type Argument Default Description elasticRadius
Boolean <optional>
false - Source:
Returns:
- Type
- Boolean | BubbleChart
-
excludeElasticZero( [excludeZero])
-
Should the chart exclude zero when calculating elastic bubble radius?
Parameters:
Name Type Argument Default Description excludeZero
Boolean <optional>
true - Source:
Returns:
- Type
- Boolean | BubbleMixin
-
maxBubbleRelativeSize( [relativeSize])
-
Get or set the maximum relative size of a bubble to the length of x axis. This value is useful when the difference in radius between bubbles is too great.
Parameters:
Name Type Argument Default Description relativeSize
Number <optional>
0.3 - Source:
Returns:
- Type
- Number | BubbleMixin
-
minRadius( [radius])
-
Get or set the minimum radius. This will be used to initialize the radius scale's range.
Parameters:
Name Type Argument Default Description radius
Number <optional>
10 - Source:
Returns:
- Type
- Number | BubbleMixin
-
minRadiusWithLabel( [radius])
-
Get or set the minimum radius for label rendering. If a bubble's radius is less than this value then no label will be rendered.
Parameters:
Name Type Argument Default Description radius
Number <optional>
10 - Source:
Returns:
- Type
- Number | BubbleMixin
-
r( [bubbleRadiusScale])
-
Get or set the bubble radius scale. By default the bubble chart uses d3.scaleLinear().domain([0, 100]) as its radius scale.
Parameters:
Name Type Argument Default Description bubbleRadiusScale
d3.scale <optional>
d3.scaleLinear().domain([0, 100]) - Source:
- See:
Returns:
- Type
- d3.scale | BubbleMixin
-
radiusValueAccessor( [radiusValueAccessor])
-
Get or set the radius value accessor function. If set, the radius value accessor function will be used to retrieve a data value for each bubble. The data retrieved then will be mapped using the r scale to the actual bubble radius. This allows you to encode a data dimension using bubble size.
Parameters:
Name Type Argument Description radiusValueAccessor
function <optional>
- Source:
Returns:
- Type
- function | BubbleMixin