Description Usage Arguments Value Note Examples
This function adds a line "geom" to a metricsgraphics.js html widget.
1 2 |
mjs |
metricsgraphics plot object |
area |
fill in area under line? (default: |
animate_on_load |
animate the drawing of the plot on page load? (default: |
color |
line color (hex string or valid HTML color string). Use |
interpolate |
the interpolation function to use when rendering lines. possible values: ("cardinal", "linear", "linear-closed", "step", "step-before", "step-after", "basis", "basis-open", "basis-closed", "bundle", "cardinal-open", "cardinal-closed", "monotone", "basic") |
metricsgraphics object
If you plan on using cusom colors, all lines must have a color value or the result is non-deterministic.
1 2 3 4 | data.frame(year=seq(1790, 1970, 10),
uspop=as.numeric(uspop)) %>%
mjs_plot(x=year, y=uspop) %>%
mjs_line()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.