Documentation ¶
Overview ¶
Package sparkline draws small charts of timeseries data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Gradient ¶
Gradient picks a color that's somewhere in between a and b, depending on percentage. 0.0 results in a, 1.0 results in b.
func PickColor ¶
PickColor picks a color in based on the given thresholds.
Thresholds are expected to be in decreasing order.
If value is greater than or equal to the greatest Max, the color from that threshold is returned.
If value is less than the Max of the last threshold, the color from that threshold is returned.
Otherwise, the color will be proportionally in between the color of the matching threshold and the next one, based on where value is between the two Max values.
Types ¶
Click to show internal directories.
Click to hide internal directories.