Skip to content

Instantly share code, notes, and snippets.

@ChrisYounger
Created March 30, 2021 09:12
Show Gist options
  • Save ChrisYounger/9e50fb3071617cfa4eb5fba1e11c0a5b to your computer and use it in GitHub Desktop.
Save ChrisYounger/9e50fb3071617cfa4eb5fba1e11c0a5b to your computer and use it in GitHub Desktop.
<dashboard>
<label>gauge test</label>
<row>
<panel id="autoresize">
<viz type="number_display_viz.number_display_viz">
<search>
<query>| makeresults
| eval process="Process1 Process2 Process3" | makemv process | mvexpand process
| eval breachPerc="10 20 15" | makemv breachPerc
| eval nBreachPerc="69 70 80" | makemv nBreachPerc
| eval atRiskPerc="21 10 5" | makemv atRiskPerc
| eval breachPerc=case(process="Process1", mvindex(breachPerc, 0), process="Process2", mvindex(breachPerc, 1), process="Process3", mvindex(breachPerc, 2), 1=1,NULL)
| eval nBreachPerc=case(process="Process1", mvindex(nBreachPerc, 0), process="Process2", mvindex(nBreachPerc, 1), process="Process3", mvindex(nBreachPerc, 2), 1=1,NULL)
| eval atRiskPerc=case(process="Process1", mvindex(atRiskPerc, 0), process="Process2", mvindex(atRiskPerc, 1), process="Process3", mvindex(atRiskPerc, 2), 1=1,NULL)
| rename atRiskPerc as thresholdvalue1 breachPerc as thresholdvalue2 nBreachPerc as thresholdvalue3 process as text
| eval title = thresholdvalue1 + " - " + thresholdvalue2 + " - " + thresholdvalue3</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="drilldown">none</option>
<option name="number_display_viz.number_display_viz.bordercolor">#ffffff</option>
<option name="number_display_viz.number_display_viz.bordersize">0</option>
<option name="number_display_viz.number_display_viz.colorprimary">#000000</option>
<option name="number_display_viz.number_display_viz.colorprimarymode">auto</option>
<option name="number_display_viz.number_display_viz.colorsecondary">#000000</option>
<option name="number_display_viz.number_display_viz.colorsecondarymode">darker1</option>
<option name="number_display_viz.number_display_viz.max">100</option>
<option name="number_display_viz.number_display_viz.min">0</option>
<option name="number_display_viz.number_display_viz.nodatacolor">#0178c7</option>
<option name="number_display_viz.number_display_viz.padding">20</option>
<option name="number_display_viz.number_display_viz.pulserate">4</option>
<option name="number_display_viz.number_display_viz.shadowcolor">#F2F4F5</option>
<option name="number_display_viz.number_display_viz.shapebordercolor">#FFFFFF</option>
<option name="number_display_viz.number_display_viz.shapebordercolormode">static</option>
<option name="number_display_viz.number_display_viz.shapebordersize">1</option>
<option name="number_display_viz.number_display_viz.shapedropcolor">#ffffff</option>
<option name="number_display_viz.number_display_viz.shapeshadow">yes</option>
<option name="number_display_viz.number_display_viz.shapetexture">solid</option>
<option name="number_display_viz.number_display_viz.size">300</option>
<option name="number_display_viz.number_display_viz.sparkHeight">30</option>
<option name="number_display_viz.number_display_viz.sparkWidth">90</option>
<option name="number_display_viz.number_display_viz.sparkalign">5</option>
<option name="number_display_viz.number_display_viz.sparkalignv">70</option>
<option name="number_display_viz.number_display_viz.sparkcolorfill">#009DD9</option>
<option name="number_display_viz.number_display_viz.sparkcolorline">#0178c7</option>
<option name="number_display_viz.number_display_viz.sparkcolormodefill">auto</option>
<option name="number_display_viz.number_display_viz.sparkcolormodeline">auto</option>
<option name="number_display_viz.number_display_viz.sparkmin">0</option>
<option name="number_display_viz.number_display_viz.sparknulls">gaps</option>
<option name="number_display_viz.number_display_viz.sparkorder">bg</option>
<option name="number_display_viz.number_display_viz.sparkstyle">area</option>
<option name="number_display_viz.number_display_viz.spinnerspeedmax">20</option>
<option name="number_display_viz.number_display_viz.spinnerspeedmin">1</option>
<option name="number_display_viz.number_display_viz.style">g2</option>
<option name="number_display_viz.number_display_viz.subtitlealign">center</option>
<option name="number_display_viz.number_display_viz.subtitlealignv">70</option>
<option name="number_display_viz.number_display_viz.subtitlecolor">#5C6773</option>
<option name="number_display_viz.number_display_viz.subtitlecolormode">static</option>
<option name="number_display_viz.number_display_viz.subtitledrop">yes</option>
<option name="number_display_viz.number_display_viz.subtitledropcolor">#ffffff</option>
<option name="number_display_viz.number_display_viz.subtitlesize">40</option>
<option name="number_display_viz.number_display_viz.textalign">center</option>
<option name="number_display_viz.number_display_viz.textalignv">2</option>
<option name="number_display_viz.number_display_viz.textcolor">#000000</option>
<option name="number_display_viz.number_display_viz.textdrop">yes</option>
<option name="number_display_viz.number_display_viz.textdropcolor">#ffffff</option>
<option name="number_display_viz.number_display_viz.textduration">300</option>
<option name="number_display_viz.number_display_viz.textmode">static</option>
<option name="number_display_viz.number_display_viz.textprecision">1</option>
<option name="number_display_viz.number_display_viz.textsize">70</option>
<option name="number_display_viz.number_display_viz.textunitposition">after</option>
<option name="number_display_viz.number_display_viz.textunitsize">50</option>
<option name="number_display_viz.number_display_viz.thickness">50</option>
<option name="number_display_viz.number_display_viz.thresholdcol1">#1a9035</option>
<option name="number_display_viz.number_display_viz.thresholdcol2">#d16f18</option>
<option name="number_display_viz.number_display_viz.thresholdcol3">#b22b32</option>
<option name="number_display_viz.number_display_viz.thresholdcol4">#ffffff</option>
<option name="number_display_viz.number_display_viz.thresholdcol5">#ffffff</option>
<option name="number_display_viz.number_display_viz.thresholdcol6">#ffffff</option>
<option name="number_display_viz.number_display_viz.thresholdsize">100</option>
<option name="number_display_viz.number_display_viz.thresholdval2">70</option>
<option name="number_display_viz.number_display_viz.thresholdval3">90</option>
<option name="number_display_viz.number_display_viz.titlealign">center</option>
<option name="number_display_viz.number_display_viz.titlealignv">78</option>
<option name="number_display_viz.number_display_viz.titlecolor">#000000</option>
<option name="number_display_viz.number_display_viz.titlecolormode">static</option>
<option name="number_display_viz.number_display_viz.titledrop">yes</option>
<option name="number_display_viz.number_display_viz.titledropcolor">#C6C6C6</option>
<option name="number_display_viz.number_display_viz.titlesize">55</option>
<option name="trellis.enabled">0</option>
<option name="trellis.scales.shared">1</option>
<option name="trellis.size">medium</option>
</viz>
</panel>
</row>
<row depends="$NEVER_SHOW$">
<panel>
<html>
<style>
/* custom CSS so that the main number display can resize depending on how many items are in it */
.dashboard.view-mode #autoresize .shared-reportvisualizer.ui-resizable { height: auto !important; }
</style>
</html>
</panel>
</row>
</dashboard>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment