new BubbleOverlay(parent [, chartGroup])
Create a Bubble Overlay.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
parent |
String | node | d3.selection | Any valid d3 single selector specifying a dom block element such as a div; or a dom element or d3 selection. |
|
chartGroup |
String |
<optional> |
The name of the chart group this chart instance should be placed in. Interaction with a chart will only trigger events and redraws within the chart's group. |
- Mixes In:
- Source:
Example
// create a bubble overlay chart on top of the '#chart-container1 svg' element using the default global chart group var bubbleChart1 = BubbleOverlayChart('#chart-container1').svg(d3.select('#chart-container1 svg')); // create a bubble overlay chart on top of the '#chart-container2 svg' element using chart group A var bubbleChart2 = new CompositeChart('#chart-container2', 'chartGroupA').svg(d3.select('#chart-container2 svg'));
Classes
Members
-
_g
-
mandatory
Set the underlying svg image element. Unlike other dc charts this chart will not generate a svg element; therefore the bubble overlay chart will not work if this function is not invoked. If the underlying image is a bitmap, then an empty svg will need to be created on top of the image.
- Source:
Example
// set up underlying svg element chart.svg(d3.select('#chart svg'));
Methods
-
point(name, x, y)
-
mandatory
Set up a data point on the overlay. The name of a data point should match a specific 'key' among data groups generated using keyAccessor. If a match is found (point name <-> data group key) then a bubble will be generated at the position specified by the function. x and y value specified here are relative to the underlying svg.
Parameters:
Name Type Description name
String x
Number y
Number - Source:
Returns:
- Type
- BubbleOverlay