Description Usage Arguments Author(s)
Takes an SVG polygon and partially fills it with a color. Returns a list containgin a character vector of an 'img' block that can be embedded into HTML output and the SVG text.
1 2 3 | filled_polygon(fillPercentage, shapeName, viewBoxDimensions, pathSvg,
extraSvg = "", fillColor = "red", emptyColor = "#D9D9D9",
size = "128px")
|
fillPercentage |
An integer. How much to fill the polygon. |
shapeName |
A character vector. The internal name to assign to this polygon. |
viewBoxDimensions |
A character vector. The view box dimensions of the SVG (e.g., "0 0 24 24"). |
pathSvg |
A character vector. The SVG path data (can contain multiple paths and objects that are meant to be grouped together). |
extraSvg |
Any extra SVG rendering commands to add to the output. |
fillColor |
A character vector. The color to fill it with. Can be any valid SVG color value (e.g., "#FF0000", "red") |
emptyColor |
A character vector. The background color of the polygon, indicating the portion of it that is "empty.' |
size |
A character vector. The size of the SVG output. Can be any valid HTML size argument (e.g., "64px" or "50%"). |
Blake Madden
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.