Categories &

Functions List

Class Definition: ScatterData

chartjs: obj = ScatterData (data)

Create a ScatterData object.

obj = ScatterData (data) returns a ScatterData object, in which data must be an N×2 numeric matrix with each column defining the x-axis and the y-axis of each element of a single dataset, respectively. Constructing a ScatterData object always assigns the default property values, which can later be modified using dot notation syntax.

A ScatterData object, obj, contains the following properties:

FieldDescription
backgroundColorA Color object defining the color of the face of the bubbles. Default is empty, in which case and a color is assigned automatically by the Chart.js library.
borderColorA Color object defining the color of the border circle of the bubbles. Default is empty, in which case a color is assigned automatically by the Chart.js library.
borderWidthA numeric scalar value defining the width of the bubble’s borders in pixels. Default is 3.
clipA numeric scalar value defining the pixels to clip relative to the chart’s area. Positive value allows overflow, negative value clips that many pixels inside chartArea. Defaults to zero pixels.
dataA numeric matrix assigned at construction of the ScatterData object. It cannot be empty.
drawActiveElementsOnTopA boolean scalar defining whether to draw the active bubbles of a dataset over the other bubbles of the dataset. It is true by default.
hoverBackgroundColorA Color object defining the color of the bubble face, when the mouse hovers over it. Default is empty, in which case the color is the same as in backgroundColor.
hoverBorderColorA Color object defining the color of the borders of each bubble, when the mouse hovers over it. Empty by default, in which case the color is the same as in borderColor.
hoverBorderWidthA numeric scalar value defining the width of the each bubble’s borders in pixels, when the mouse hovers over it. Default is 1.
hoverRadiusA numeric scalar value defining the radius of the each bubble in pixels, when the mouse hovers over it. Default is 4.
hitRadiusA numeric scalar value defining the additional radius for hit detection in pixels. Default is 1.
labelA character vector defining the label of the dataset which appears in the legend and tooltips.
orderA numeric scalar defining the order of the dataset, which affects order for stacking, tooltip and legend.
pointStyleA character vector or a boolean value defining the shape of the bubbles of the dataset. As a character vector, it can be any of the following values: 'circle', 'cross', 'crossRot', 'dash', 'line', 'rect', 'rectRounded', 'rectRot', 'star', 'triangle', and 'none'. By default it is 'circle. As a boolean value, true defaults to 'circle' and false defaults to 'none'.
radiusA numeric scalar defining the bubble radius for the entire dataset.
rotationA numeric scalar defining the bubble rotation in degrees.

See also: ScatterChart, Color, Fill

Source Code: ScatterData