Reputation: 53
I'd like to add a minimum value to a bullet graph using the sparklines
R package. The default sets the minimum value to be 0.
sparkline(c(30,15), type = "bullet")
With chartRangeMin:
Following the documentation for the original jquery here: https://omnipotent.net/jquery.sparkline/#common, I tried chartRangeMin
:
sparkline(c(30,15), type = "bullet", chartRangeMin = 10)
but it appears to produce the same result as if we didn’t have this parameter
Without chartRangeMin:
How do I add a minimum value for the bullet graph?
Upvotes: 0
Views: 149
Reputation: 53
Upon looking at the JS github code which is the base for the sparklines API for R, I discovered that the default minimum value for bullet graphs is set by a base
variable.
To create the above bullet graph with a minimum of 10:
sparkline(c(30, 15), type = "bullet", base = 10)
Upvotes: 1