Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

girafe_css

CSS creation helper


Description

It allows specifying individual styles for various SVG elements.

Usage

girafe_css(
  css,
  text = NULL,
  point = NULL,
  line = NULL,
  area = NULL,
  image = NULL
)

Arguments

css

The generic css style

text

Override style for text elements (svg:text)

point

Override style for point elements (svg:circle)

line

Override style for line elements (svg:line, svg:polyline)

area

Override style for area elements (svg:rect, svg:polygon, svg:path)

image

Override style for image elements (svg:image)

Value

css as scalar character

Examples

library(ggiraph)

girafe_css(
  css = "fill:orange;stroke:gray;",
  text = "stroke:none; font-size: larger",
  line = "fill:none",
  area = "stroke-width:3px",
  point = "stroke-width:3px",
  image = "outline:2px red"
)

ggiraph

Make 'ggplot2' Graphics Interactive

v0.7.10
GPL-3
Authors
David Gohel [aut, cre], Panagiotis Skintzos [aut], Mike Bostock [cph] (d3.js), Speros Kokenes [cph] (d3-lasso), Eric Shull [cph] (saveSvgAsPng js library), Eric Book [ctb] (hline and vline geoms)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.