Description Usage Arguments Details Value
See here for more detailed documentation for axis titles: https://www.chartjs.org/docs/latest/axes/labelling.html.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | axis_title(
chart,
id,
xOrY = tolower(substr(id, 1, 1)),
...,
title,
display = TRUE,
lineHeight = 1.2,
fontColor = "#666",
fontSize = 12,
fontStyle = "normal",
fontFamily = "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
padding = 4
)
chart_title(
chart,
...,
title,
display = TRUE,
lineHeight = 1.2,
position = c("top", "left", "bottom", "right")[1],
fontColor = "#666",
fontSize = 12,
fontStyle = "normal",
fontFamily = "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
padding = 4
)
|
chart |
A |
id |
The ID of the axis to add a title to (character scalar). |
xOrY |
Whether the axis is an x or y-axis (character scalar). |
... |
Additional named options to be used in the axis title (should have no effect here). |
title |
The title of the axis/chart (character scalar). |
display |
Whether to display the axis/chart title (boolean scalar). |
lineHeight |
The height of an individual line of text (see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height) (character/numeric scalar). |
fontColor |
The color of the title font (character scalar). |
fontSize |
The size of the title font (numeric scalar). |
fontStyle |
Space-separated combination of values from [normal, bold, italic, oblique, initial, inherit] (character scalar). |
fontFamily |
The font family of the title text (character scalar). |
padding |
The padding to use around the axis title (numeric scalar). |
position |
The position of the chart title (character scalar). |
See here for more detailed documentation for chart titles: https://www.chartjs.org/docs/latest/configuration/title.html.
A modified chartjs
object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.