Description Usage Arguments Examples
Pass options to line
type.
1 2 3 4 |
p |
a chartist object. |
name |
name the serie, see details (optional). |
fillHoles |
whether to fill missing data, defaults to |
showPoint |
whether to show points, defaults to |
showArea |
turn line chart into area chart, defaults to |
showLine |
set |
areaBase |
base for the chart, defaults to 0. |
lineSmoothing |
defaults to |
fullWidth |
When set to true, the last grid line on the x-axis is not drawn and the chart elements will expand to the full available width of the chart. For the last label to be drawn correctly you might need to add chart padding or offset the last label with a draw event handler. |
distributeSeries |
distributed serie along x axis only works for 1
serie, defaults to |
width |
set fixed width in pixels or percent (i.e.: |
height |
set fixed height in pixels or percent
(i.e.: |
low |
lower bound of value. |
high |
higher bound of value. |
chartPadding |
padding around chart div. |
... |
additional options. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | mtcars %>%
chart_ist(x = mpg, type = "line") %>%
add_ist(disp) %>%
lineopt_ist(showArea = TRUE, showLine = FALSE, showPoint = FALSE)
mtcars %>%
chart_ist(x = mpg, type = "line") %>%
add_ist(disp) %>%
lineopt_ist(lineSmoothing = "step", showLine = TRUE, showPoint = FALSE)
mtcars %>%
chart_ist(x = mpg, type = "line") %>%
add_ist(disp, name = "disp") %>%
add_ist(hp, name = "hp") %>%
lineopt_ist(name = "disp", lineSmoothing = "none") %>%
lineopt_ist(name = "hp", showArea = TRUE, showPoint = FALSE)
mtcars %>%
chart_ist(qsec) %>%
add_ist(mpg) %>%
lineopt_ist(lineSmoothing = htmlwidgets::JS("
Chartist.Interpolation.cardinal({tension: 0.2})"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.