| pulse_grid | R Documentation |
'pulse_grid()' creates a tiled grid where each cell color reflects a numeric value and the cells gently pulse according to their intensity.
pulse_grid(
data,
x,
y,
value,
low = "#E0FBFC",
high = "#0B525B",
stroke = "white",
strokeWidth = 1,
cellPadding = 0.12,
cornerRadius = 10,
pulse = TRUE,
pulseStrength = 0.18,
showValues = TRUE,
digits = 1,
valueFontSize = 12,
xFontSize = 12,
yFontSize = 12,
title = NULL,
titleFontSize = 22,
font = "Verdana, Geneva, Tahoma, sans-serif",
bgcol = "#0F172A",
labelColor = "#F8FAFC",
titleColor = "#F8FAFC",
width = NULL,
height = NULL
)
data |
The data frame containing the grid coordinates and values. |
x |
The column name mapped to the grid columns. |
y |
The column name mapped to the grid rows. |
value |
The numeric column name mapped to tile intensity. |
low |
The low end color of the value scale. Defaults to '#E0FBFC'. |
high |
The high end color of the value scale. Defaults to '#0B525B'. |
stroke |
The border color of each tile. Defaults to 'white'. |
strokeWidth |
Border width of each tile. Defaults to 1. |
cellPadding |
Space between tiles, from 0 to 0.9. Defaults to 0.12. |
cornerRadius |
Corner radius of each tile. Defaults to 10. |
pulse |
Logical. Whether to animate the tiles. Defaults to 'TRUE'. |
pulseStrength |
Numeric multiplier controlling pulse amplitude. Defaults to 0.18. |
showValues |
Logical. Whether to print values inside tiles. Defaults to 'TRUE'. |
digits |
Number of digits used for in-cell labels. Defaults to 1. |
valueFontSize |
Font size of in-cell labels. Defaults to 12. |
xFontSize |
Font size of the column labels. Defaults to 12. |
yFontSize |
Font size of the row labels. Defaults to 12. |
title |
Optional. The title of the plot. |
titleFontSize |
Font size of the plot title. Defaults to 22. |
font |
The font family used in labels and title. Defaults to 'Verdana, Geneva, Tahoma, sans-serif'. |
bgcol |
Background color of the SVG. Defaults to '#0F172A'. |
labelColor |
Color of the row and column labels. Defaults to '#F8FAFC'. |
titleColor |
Color of the title. Defaults to '#F8FAFC'. |
width |
Optional. The width of the SVG output. |
height |
Optional. The height of the SVG output. |
A SVG pulse grid.
pulse_data <- expand.grid(
hour = c("09:00", "12:00", "15:00", "18:00"),
team = c("North", "South", "East")
)
pulse_data$load <- c(0.35, 0.72, 0.56, 0.91,
0.41, 0.67, 0.83, 0.58,
0.28, 0.49, 0.77, 0.63)
pulse_grid(
data = pulse_data,
x = "hour",
y = "team",
value = "load",
title = "Team Activity Pulse Grid",
low = "#D9F0FF",
high = "#EE6C4D",
bgcol = "#0B132B"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.