Description Usage Arguments Examples
Display a metric in a panel
1 2 3 4 5 6 7 | metric_panel(input, output, session, metric, plot_type = NULL,
plot_fun = NULL, plot_post_process = NULL,
orientation = "vertical", selected_date_range_preset = "All Time",
selected_period = "Week", height = 400, div_bottom_left = NULL,
hidden_dimensions = NULL, ...)
metric_panel_ui(id, ...)
|
input |
standard |
output |
standard |
session |
standard |
metric |
A metric to display. It should be a list with data and title |
plot_type |
Either "line" or "bar": if neither is given, it guesses
"line" for |
plot_fun |
A plotting function that takes two arguments - data and dimension |
plot_post_process |
a function to post-process the default plot |
orientation |
a string indicating orientation (vertical or horizontal) |
selected_date_range_preset |
Default date range preset to use. Use
|
selected_period |
Default period to display the data |
height |
height of the panel |
div_bottom_left |
html to display on bottom left of the panel |
hidden_dimensions |
A vector of dimension names that should not be displayed as tabs. |
... |
Additional parameters passed to the server |
id |
a string indicating the id to call the module with |
1 2 3 4 5 6 7 8 9 10 11 12 | library(dplyr)
## Not run:
metrics_condensed <- datacampr::dc_s3_read(
"metrics_condensed.rds"
)$metrics_condensed
preview_metric(
metric = metrics_condensed$finance_forecasts_usd_arr_total,
plot_type = 'line'
)
preview_metric(metrics_condensed$finance_cash_usd_cash_in)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.