Description Usage Arguments Value Examples
The svg_circle() function adds a circle to an svg object. The position of
the circle is given by x and y, and this refers to the center point of
the point of the circle. The diameter of the circle is given in units of
px.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 
| svg | The  | 
| x, y | The  | 
| diameter | The diameter of the circle shape in units of  | 
| stroke | The color of the stroke applied to the element (i.e., the outline). | 
| stroke_width | The width of the stroke in units of pixels. | 
| fill | The fill color of the element. | 
| opacity | The opacity of the element. Must be a value in the
range of  | 
| attrs | A presentation attribute list. The helper function
 | 
| anims | An animation directive list for the element. This should be
structured using the  | 
| filters | A filter directive list for the element. This is easily
created by using a list of  | 
| id | An optional ID value to give to the built tag. This is useful for modifying this element in a later function call or for interacting with CSS. | 
An svg object.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | if (interactive()) {
# Create an SVG with a single
# circle element
svg <-
  SVG(width = 80, height = 80) %>%
    svg_circle(
      x = 30, y = 30,
      diameter = 40,
      stroke = "magenta",
      fill = "olive"
    )
}
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.