Description Usage Arguments Details Author(s) Source
Generates an interactive time map based on d3.js. Interactive features include zooming, panning, text labels moving, tooltips, fading effects in legend. Additional handlers are provided to change label size, point opacity or export the figure as an SVG file via HTML form controls.
1 2 3 4 5 6 7 8 9 10 | d3TimeMap(x, n = 5, dateOrder = 1, longYear = 1, day = FALSE,
period = 2, lab = NULL, point_size = 64, labels_size = 10,
point_opacity = 1, fixed = FALSE, col_var = NULL,
colors = rev(brewer.pal(n, "RdYlBu")), symbol_var = NULL,
size_var = NULL, size_range = c(10, 300), col_lab = NULL,
symbol_lab = NULL, size_lab = NULL, key_var = NULL, type_var = NULL,
tooltips = TRUE, tooltip_text = NULL, xlab = NULL, ylab = NULL,
html_id = NULL, width = NULL, height = NULL, legend_width = 150,
xlim = NULL, ylim = NULL, dom_id_reset_brush = "scatterD3-reset-brush",
dom_id_svg_export = "scatterD3-svg-export", transitions = FALSE)
|
x |
– A matrix of timestamp or time, date data |
n |
– Number of Colors default is 5. Must be between 1 and 11 |
dateOrder |
– order of date values options: 1 = month, day, year (default) 2 = day, month, year 3 = year, month, day 4 = year, day, month |
longYear |
– year format 1 = abbreviated year (11) (default) 2 = full year (2011) |
day |
– separate data by date? default: FALSE |
period |
– time period options: 1 = milliseconds 2 = seconds (default) 3 = minutes 4 = hours |
point_size |
points size. Ignored if size_var is not NULL. |
point_opacity |
points opacity |
col_var |
optional vector for points color mapping |
colors |
vector of custom points colors. Colors must be defined as an hexadecimal string (eg "#FF0000"). |
size_var |
optional vector for points size mapping |
size_range |
numeric vector of length 2, giving the minimum and maximum point sizes when mapping with size_var |
tooltips |
logical value to display tooltips when hovering points |
tooltip_text |
optional character vector of tooltips text |
xlab |
x axis label |
ylab |
y axis label |
html_id |
manually specify an HTML id for the svg root node. A random one is generated by default. |
width |
figure width, computed when displayed |
height |
figure height, computed when displayed |
xlim |
numeric vector of length 2, manual x axis limits |
ylim |
numeric vector of length 2, manual y axis limits |
transitions |
if TRUE, data updates are displayed with smooth transitions, if FALSE the whole chart is redrawn. Only used within shiny apps. |
Interactive time maps based on htmlwidgets and d3.js
Mindy Foster <mnfost3r@gmail.com>
D3.js was created by Michael Bostock. See http://d3js.org/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.