Description Usage Arguments Examples
Style your chart
1 |
p |
a chartist object. |
type |
chart element type to animate (i.e.: line, or grid). |
css |
css to wrap in |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # missing style defaults to chart type
mtcars %>%
chart_ist(qsec, "line") %>%
add_ist(mpg) %>%
style_ist(css = htmltools::css(stroke = "rgba(0,0,0,0.4)", stroke.dasharray="20")) %>%
style_ist("grid", htmltools::css(stroke = "black")) %>%
style_ist(c("point"), htmltools::css(stroke = "green"))
mtcars %>%
chart_ist(qsec, "line") %>%
add_ist(hp, "hp") %>%
add_ist(disp, "disp") %>%
lineopt_ist("hp", showPoint = FALSE, showArea = TRUE, showLine = FALSE) %>%
xaxis_ist(showLabel = FALSE) %>%
style_ist(css = htmltools::css(stroke = "rgba(231,1,2,0.4)", stroke.dasharray="20")) %>%
style_ist("area", htmltools::css(stroke = "black", fill = "rgba(0,,0,0.9)")) %>%
style_ist(c("point"), htmltools::css(stroke = "red"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.