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.
// create a scatter plot under #chart-container1 element using the default global chart group var chart1 = dc.scatterPlot('#chart-container1'); // create a scatter plot under #chart-container2 element using chart group A var chart2 = dc.scatterPlot('#chart-container2', 'chartGroupA'); // create a sub-chart under a composite parent chart var chart3 = dc.scatterPlot(compositeChart);
Set or get color for symbols when the group is empty. If null, just use the colorMixin.colors color scale zero value.
Set or get opacity for symbols when the group is empty.
Set or get opacity for symbols when the group is not empty.
Set or get canvas element. You should usually only ever use the get method as dc.js will handle canvas element generation. Provides valid canvas only when useCanvas is set to true
canvasElement
CanvasElement | d3.selection <optional>
Get canvas 2D context. Provides valid context only when useCanvas is set to true
Get or set the symbol generator. By default dc.scatterPlot
will use d3.symbol() to generate symbols. dc.scatterPlot
will set the symbol size accessor on the symbol generator.
customSymbol
String | function <optional>
Set or get radius for symbols when the group is empty.
Parameters: Name Type Argument Default DescriptionemptySize
Number <optional>
Set or get color for symbols excluded from this chart's filter. If null, no special color is applied for symbols based on their filter status.
Parameters: Name Type Argument Default DescriptionexcludedColor
Number <optional>
Set or get opacity for symbols excluded from this chart's filter.
Parameters: Name Type Argument Default DescriptionexcludedOpacity
Number <optional>
Set or get size for symbols excluded from this chart's filter. If null, no special size is applied for symbols based on their filter status.
Parameters: Name Type Argument Default DescriptionexcludedSize
Number <optional>
Get or set the existence accessor. If a point exists, it is drawn with symbolSize radius and opacity 1; if it does not exist, it is drawn with emptySize radius and opacity 0. By default, the existence accessor checks if the reduced value is truthy.
Parameters: Name Type Argument Descriptionaccessor
function <optional>
// default accessor chart.existenceAccessor(function (d) { return d.value; });
Set or get radius for highlighted symbols.
Parameters: Name Type Argument Default DescriptionhighlightedSize
Number <optional>
Method that replaces original resetSvg and appropriately inserts canvas element along with svg element and sets their CSS properties appropriately so they are overlapped on top of each other. Remove the chart's SVGElements from the dom and recreate the container SVGElement.
Get or set the symbol type used for each point. By default the symbol is a circle (d3.symbolCircle). Type can be a constant or an accessor.
Parameters: Name Type Argument Default Descriptiontype
function <optional>
// Circle type chart.symbol(d3.symbolCircle); // Square type chart.symbol(d3.symbolSquare);
Set or get radius for symbols.
Parameters: Name Type Argument Default DescriptionsymbolSize
Number <optional>
Set or get whether to use canvas backend for plotting scatterPlot. Note that the canvas backend does not currently support customSymbol or symbol methods and is limited to always plotting with filled circles. Symbols are drawn with symbolSize radius. By default, the SVG backend is used when useCanvas
is set to false
.
useCanvas
Boolean <optional>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4