This function crafts a solo_box tile displaying a red orange green color. The color is defined by the value of the target compared to the thresholds.

solo_gradient_box(value = NULL, txt = NULL, former = NULL,
  size = "md", icon = NULL, target = 100, thresholdHigh = 90,
  thresholdLow = 50, link = NULL, units = NULL, hover = NULL,
  hide_value = FALSE, textModifier = "h1", revert = FALSE, ...)

Arguments

value

The numeric value you want to highlight (the main enchilada)

txt

Optional subtext that should appear under the value

former

The last value that should be used for comparison purposes

size

Optional size specified in the bootstrap css classes: "xs","sm","md","lg")

icon

Optional glyphicon that should be displayed from http://getbootstrap.com/components/ you need only supply the name of thing you want, like "check"... not the full "gyphicon-check"

target

Optional target that the value should be compared against. Use with ThresholdHigh and THresholdLow

thresholdHigh

Optional edge between \"green\" and \"orange\" from 0-100 as a percent of target. IE, this value represents the RATIO of the VALUE to the target that, if above or equal to the ThresholdHigh will show as green, and if not, as orange. Use w/ target and ThresholdLow.

thresholdLow

Optional border between \"orange\" and \"red\" from 0-100 as a percent of target. IE, this value represents the RATIO of the VALUE to the target that, if above or equal to the ThresholdLow will show as orange, and if not, as red. Use w/ target and ThresholdHigh.

link

Optional hyperlink that should be followed on click

units

Optional units that should be displayed after Value

hover

Optional tooltip, or text that will show up when a user rests their mouse over the tile.

hide_value

Optionally and paradoxically hide value. Normally FALSE, change this value to TRUE in order to suppress the large number, but still take advantage of the conditional formatting.

textModifier

Optional css category of "large" text. In this case, the icon, value and unit. Default=h1

revert

Invert type box. Green become red and red become green.

...

Optional additional html elements

Examples

# ADD EXAMPLES HERE g1 <- solo_gradient_box(value = 40) g2 <- solo_gradient_box( value = 40, target = 50, thresholdHigh = 80, thresholdLow = 60 ) g3 <- solo_gradient_box( value = 20, txt = "Test1", target = 50, thresholdHigh = 80, thresholdLow = 60, hide_value = TRUE ) g4 <- solo_gradient_box( value = 35, txt = "Test2", target = 50, thresholdHigh = 80, thresholdLow = 60, hide_value = TRUE ) finisher(title = "Item", divs = div_maker( subtitle = "subitems", textModifier = "h1", g1, g2, g3, g4 ))