Description Usage Arguments Value Examples
This provides a hack-ish way to add a title to a tauchart. Heed the
warning in return
well. This is the last function you should use
when building a tauchart
.
In interactive sessions this function uses htmltools::html_print
to
display the chart with title, otherwise it just returns the shiny.tag
-
classed object since that works well in R Markdown documents.
This is most certainly a temporary hack.
1 2 |
tau |
taucharts object |
title |
title for the chart |
div_css |
style to apply to the surrounding |
span_css |
CSS style to apply to the title |
THIS DOES NOT RETURN AN htmlwidget
!! It returns a shiny.tag
class HTML (the widget is wrapped in a <div>
). It should be the LAST
call in a magrittr pipe chain or called to wrap a streamgraph object for
output
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | tauchart(mtcars) %>%
tau_point("mpg", "wt") %>%
tau_guide_y(auto_scale=FALSE) %>%
tau_title("Some Really Good Plot Title",
"font-weight:bold;margin:auto;text-align:center;font-size:24px;
color:#7f7f7f;font-family:sans-serif")
tauchart(mtcars) %>%
tau_point("mpg", "wt") %>%
tau_guide_y(auto_scale=FALSE) %>%
tau_title("Some Really Good Plot Title",
"font-weight:bold;margin:auto;text-align:right;font-size:24px;
color:#7f7f7f;font-family:sans-serif")
tauchart(mtcars, width="500px") %>%
tau_point("mpg", "wt") %>%
tau_guide_y(auto_scale=FALSE) %>%
tau_title("Some Really Good Plot Title",
"width:500px;font-weight:bold;margin:auto;text-align:left;
font-size:24px;color:#7f7f7f;font-family:sans-serif")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.