sampler icon indicating copy to clipboard operation
sampler copied to clipboard

Explicit min/max for sparklines and runcharts?

Open Fusty opened this issue 4 years ago • 3 comments

Can we explicitly set the min/max on the scale for sparklines and/or runcharts? I've tried and it doesn't seem to respond. I should probably just use gauges, but I like seeing the history. I'd just like to define the vertical axis' min/max.

Fusty avatar Aug 06 '19 17:08 Fusty

This is so useful! I was trying to display CPU percentage (that's always from 0-100) but a gauge doesn't cut it for the reason you mentioned.

vipau avatar Aug 22 '19 14:08 vipau

As a temporary solution: items: - label: max sample: echo 1 - label: min sample: echo 0 - label: CPU usage sample: echo 0.$(wmic cpu get LoadPercentage | tr -s '\r\n' ' ' | cut -b 16-)

spice0xff avatar Sep 29 '19 16:09 spice0xff

To add to the temporary solution posted by @spice0xff you can use color: 16 to make them invisible (assuming black background). It also makes the legend invisible.

the biggest downside of this is that the minimum and maximum workaround only works on something know to be between those values. Percentages for example. It doesn't allow for a cutoff if something ls well outside the expected range.

deefdragon avatar Sep 30 '19 02:09 deefdragon