Class providing chart manager for epiviz app
add_chart(chart_object, send_request = TRUE)
Add a chart to the chart manager.
an object of class EpivizChart
send request to app through websocket
get_chart_colors(chart_object_or_id)
List colors used in a specific chart object.
An object of class EpivizChart
or a
string indicating the chart's id assigned by chart manager
get_chart_settings(chart_object_or_id)
List chart settings for a specific chart object.
An object of class EpivizChart
or a
string indicating the chart's id assigned by chart manager
is_server_closed()
Returns TRUE
if underlying server is closed.
See is_closed
method in class EpivizServer
.
list_chart_type_colors(chart_type)
List colors currently used in given chart type
list_chart_type_settings(chart_type)
List available settings for a specific chart type.
the name for a chart type in R (e.g., 'BlocksTrack', 'StackedLineTrack')
list_chart_types(col_width = 80)
List charts types registered in epivizr with their default settings and colors.
Returns a data.frame
listing available chart types and a summary of the
settings that can be modified.
Maximum length of settings list displayed.
list_charts()
Return data.frame
describing charts loaded by chart manager
num_charts()
Return the number of charts currently loaded through manager.
plot(measurement_object, settings = NULL, colors = NULL, send_request = TRUE)
Visualize data in an EpivizData
object using its default chart type.
The method get_default_chart_type
in class EpivizData
is used
to determine which chart type is used.
an object of class EpivizData
list of settings to use in chart (uses default chart settings if NULL)
character vector of HEX colors to use in chart (uses default chart colors if NULL)
print_chart(chart_object_or_id, file_name = NULL, file_type = c("pdf", "png"))
Print specific chart to file.
An object of class EpivizChart
or a
string indicating the chart's id assigned by chart manager.
Name of file to print to.
Type of file to print. One of pdf
or png
.
print_chart_info(chart_object_or_id)
Print settings and colors used in a specific chart object.
An object of class EpivizChart
or a
string indicating the chart's id assigned by chart manager
print_chart_type_info(chart_type)
Print settings and color information for a given chart type
the name for a chart type in R (e.g., 'BlocksTrack', 'StackedLineTrack')
register_chart_type(
chart_type,
js_chart_type = paste0("epiviz.plugins.charts.", chart_type),
js_chart_settings = list(),
js_chart_colors = character()
)
Register a chart type name to a JavaScript chart type in the epiviz app.
the name to use for chart type in R (e.g., 'BlocksTrack')
the full JavaScript class name of the corresponding chart type
(e.g. 'epiviz.plugins.charts.BlocksTrack'). If missing it is taken from the chart_type
argument
custom settings that can be applied to this chart type in JS.
default color palette applied to this chart type in JS.
revisualize(chart_type, chart, ...)
Revisualize uses data the given chart and replots it in the given chart type. The argument chart
must be non-NULL
.
a chart type registered using the register_chart_type
method
a chart that includes measurements to be used in a new chart
rm_all_charts()
Remove all charts loaded by chart manager.
rm_chart(chart_object_or_id)
Remove chart from chart manager.
An object of class EpivizChart
or a
string indicating the chart's id assigned by chart manager
set_chart_settings(chart_object_or_id, settings = NULL, colors = NULL)
Apply custom chart settings or colors to a chart object.
An object of class EpivizChart
or a
string indicating the chart's id assigned by chart manager
a list of settings to apply to the chart
a list of (HEX code) colors to use in the chart
visualize(
chart_type,
measurements = NULL,
datasource = NULL,
settings = NULL,
colors = NULL,
send_request = TRUE,
...
)
Visualize data use the given chart type. One of arguments measurements
or datasource
must be non-NULL
. If measurements
is NULL
, the get_measurements
method in class EpivizData
is used to decide which measurements are used in the chart
a chart type registered using the register_chart_type
method
a list of EpivizMeasurement
objects
describing measurements to include in the chart
an object of class EpivizData
, all available
measurements from datasource are used as appropriate
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.