Categories &

Functions List

Class Definition: RadarData

chartjs: obj = RadarData (data)

Create a RadarData object.

obj = RadarData (data) returns a RadarData object, in which data must be a nonempty numerical vector containing the data points of a single dataset of a radar chart. Constructing a RadarData object always assigns the default property values, which can later be modified using dot notation syntax.

A RadarData object, obj, contains the following properties:

FieldDescription
backgroundColorA Color object defining the fill color of the lines between data points. Default is empty, in which case a color is assigned automatically by the Chart.js library.
borderCapStyleA character vector, which can be either 'butt' (default), 'round', or 'square'. When 'butt', the ends of lines are squared off at the endpoints. When 'round', the ends of lines are rounded. When 'square' is set, the ends of lines are squared off by adding a box with an equal width and half the height of the line’s thickness.
borderColorA Color object defining the color of the lines between data points. Default is empty, in which case a color is assigned automatically by the Chart.js library.
borderDashA numeric vector defining the length and spacing of dashes drawn instead of a line.
borderDashOffsetA numeric scalar defining the offset of dashes and spacing drawn instead of a line. Default is 0.
borderJoinStyleA character vector defining the line border join style. It can be either 'round', 'bevel', or 'miter'.
borderWidthA numeric scalar value defining the width of the line 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 vector assigned at construction of the RadarData object. It cannot be empty.
fillA Fill object defining how to fill the area under the line. Type help Fill for more details on the available filling modes. By default, no filling is applied.
hoverBackgroundColorA Color object defining the fill color of the lines between data points, when the mouse hovers over it. Default is empty, in which case the color is the same as in backgroundColor.
hoverBorderCapStyleA character vector, which can be either 'butt', 'round', or 'square', defining the cap style of the line when the mouse hovers over it. Default is empty, in which case the cap style is the same as in borderCapStyle.
hoverBorderColorA Color object defining the color of the lines between data points, when the mouse hovers over it. Default is empty, in which case the color is the same as in borderColor.
hoverBorderDashA numeric vector defining the length and spacing of dashes drawn instead of a line, when the mouse hovers over them. Default is empty, in which case the length and spacing of the dashes are the same as in borderDash.
hoverborderDashOffsetA numeric scalar defining the offset of dashes drawn instead of a line, when the mouse hovers over them. Default is empty, in which case the offset is the same as in borderDashOffset
hoverBorderJoinStyleA character vector defining the line border join style, when the mouse hovers over it. Default is empty, in which case the line border join style is the same as in borderJoinStyle
hoverBorderWidthA numeric scalar value defining the width of the line in pixels, when the mouse hovers over it. Default is empty, in which case the width is the same as in borderWidth.
indexAxisA character scalar defining the base axis of the dataset. It can be either 'x' for horizontal lines or 'y' for horizontal lines. Default is 'x'.
labelsA character vector defining the label for the dataset which appears in the legend and tooltips. Default is empty.
orderA numeric scalar defining the drawing order of the dataset. It also affects order for stacking, tooltip and legend. Default is 0.
pointBackgroundColorA Color object defining the fill color for the data points. Default is empty, in which case a color is assigned automatically by the Chart.js library.
pointBorderColorA Color object defining the border color for the data points. Default is empty, in which case a color is assigned automatically by the Chart.js library.
pointBorderWidthA numeric scalar value defining the width of the data point border in pixels. Default is 1.
pointHitRadiusA numeric scalar value defining the pixel size of the non-displayed point that reacts to mouse events. Default is 1.
pointHoverBackgroundColorA Color object defining the fill color for the data points, when the mouse hovers over them. Default is empty, in which case the fill color is the same as in pointBackgroundColor.
pointHoverBorderColorA Color object defining the border color for the data point, when the mouse hovers over it. Default is empty, in which case the border color is the same as in pointBorderColor.
pointHoverBorderWidthA numeric scalar value defining the width of the data point border in pixels, when the mouse hovers over it. Default is 1.
pointHoverRadiusA numeric scalar value defining the radius of the data point border in pixels, when the mouse hovers over it. Default is 4.
pointRadiusA numeric scalar value defining the radius of the data point border in pixels. Default is 3.
pointRotationA numeric scalar value defining the rotation of the data point border in degrees. Default is 0.
pointStyleA character vector or a boolean value defining the shape of the points 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'.
spanGapsA boolean scalar or a numeric scalar defining whether to create a break in the line for null data. When true, lines will be drawn between points with no or null data. When false, points with null data will create a break in the line. It can also be a number specifying the maximum gap length to span. The unit of the value depends on the scale used.
tensionA numeric scalar value defining the Bezier curve tension of the line. By default it is 0, which corresponds to drawing straight lines between data points. This option is ignored if monotone cubic interpolation is used.

See also: RadarData, Color, Fill

Source Code: RadarData