DoughnutData
Create a DoughnutData
object.
obj = DoughnutData (data)
returns a DoughnutData
object, in which data must be a nonempty numerical vector containing
the proportional arc segments of a single dataset. Constructing a
DoughnutData
object always assigns the default property values, which
can later be modified using dot notation syntax.
A DoughnutData
object, obj, contains the following properties:
Field | Description | |
---|---|---|
backgroundColor | A Color object defining the
color of the face of the arc segments. Default is empty, in which case and a
color is assigned automatically by the Chart.js library. | |
borderAlign | A character vector, which can be either
'center' (default) or 'inner' . When 'center' is set,
the borders of arcs next to each other will overlap. When 'inner' is
set, it is guaranteed that all borders will not overlap. | |
borderColor | A Color object defining the color
of the border line of the arc segments. Default is empty, in which case a
color is assigned automatically by the Chart.js library. | |
borderDash | A numeric vector defining the length and spacing of dashes drawn at the borders of the arc segments. | |
borderDashOffset | A numeric scalar defining the offset of dashes drawn at the borders of the arc segments. Default is 0. | |
borderJoinStyle | A character vector defining the arc
border join style. It can be either 'round' , 'bevel' , or
'miter' . | |
borderRadius | A numeric scalar value defining the corner radius of the each arc segment in pixels. Default is 0. | |
borderWidth | A numeric scalar value defining the width of the each arc segment’s borders in pixels. Default is 2. | |
circumference | A numeric scalar value, which defines the per-dataset override for the sweep that the arcs cover. | |
clip | A 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. | |
data | A numeric vector assigned at construction of the
DoughnutData object. It cannot be empty. | |
hoverBackgroundColor | A Color object defining
the color of the face of each arc segment, when the mouse hovers over it.
Default is empty, in which case the color is the same as in
backgroundColor . | |
hoverBorderColor | A Color object defining
the color of the borders of each arc segment, when the mouse hovers over it.
Default is empty, in which case the color is the same as in
borderColor . | |
hoverborderDash | A numeric vector defining the length and spacing of dashes drawn at the borders of the arc segment, when the mouse hovers over it. | |
hoverborderDashOffset | A numeric scalar defining the offset of dashes drawn at the borders of the arc segment, when the mouse hovers over it. | |
hoverborderJoinStyle | A character vector defining the
arc border join style, when the mouse hovers over it. It can be either
'round' , 'bevel' , or 'miter' . | |
hoverBorderWidth | A numeric scalar value defining the width of the each arc segment’s borders in pixels, when the mouse hovers over it. | |
hoverOffset | A numeric scalar value defining the arc offset, when the mouse hovers over it. Default is 0. | |
offset | A numeric scalar defining the arc offset in pixels. Default is 0. | |
rotation | A numeric scalar defining the starting angle to draw arcs from. Default is 0. | |
spacing | A numeric scalar defining a fixed arc offset
in pixels. Default is 0. It is similar to offset , but it applies to
all arcs. | |
weight | A numeric scalar value defining the relative thickness of the dataset. Providing a value for weight will cause the doughnut dataset to be drawn with a thickness relative to the sum of all the dataset weight values. |
See also: DoughnutChart, Color, Fill
Source Code: DoughnutData
jsonstring
Generate the JSON string from a DoughnutData
object.
jsonstring (obj)
returns a character vector, json,
describing the context of the DoughnutData dataset in json format.
See also: DoughnutData, BarChart