powered by
Gauge size given a range or a JavaScript callback function.
gauge_size(g2, range = NULL, callback = NULL)
An object of class g2r as returned by g2r.
g2r
A vector indicating the minimum and maximum sizes.
A JavaScript callback function (see cb) which returns a color.
cb
# NOT RUN { func <- cb("function(dist){ if(dist > 60) return 20 return 5 }") g2(cars, asp(speed, dist, size = dist)) %>% fig_point() %>% gauge_size(callback = func) # }
Run the code above in your browser using DataLab