<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using a single value instead of chart in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182805#M11244</link>
    <description>&lt;P&gt;You can set the &lt;CODE&gt;classField&lt;/CODE&gt; option that grabs a field value from your result, using that as the CSS class for your single value display. For example, default range classes such as low (greenish), elevated (yellowish), severe (redish) are already defined. Beyond that you can define your own classes with whatever colour you need.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Oct 2014 17:02:11 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-10-28T17:02:11Z</dc:date>
    <item>
      <title>Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182802#M11241</link>
      <description>&lt;P&gt;I am just getting back in to dashboards and xml after about 3 years without using it.  I have an immediate issue.  I have a dashboard that displays a single value on a gauge. I just want a rectangular color box.  I am assuming I need to use a single.  But I'm not sure what it takes to change this....&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;                &amp;lt;param name="charting.chart"&amp;gt;fillerGauge&amp;lt;/param&amp;gt;
                &amp;lt;module name="JSChart"&amp;gt;
                  &amp;lt;param name="width"&amp;gt;100%&amp;lt;/param&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so that it displays the box with a text value instead of using the fillergauge.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2014 20:09:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182802#M11241</guid>
      <dc:creator>dolfantimmy</dc:creator>
      <dc:date>2014-10-24T20:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182803#M11242</link>
      <description>&lt;P&gt;You'll want to remove the HiddenChartFormatter module and replace the JSChart module with a SingleValue module. Check out &lt;A href="http://yoursplunkhost:8000/en-US/modules#Splunk.Module.SingleValue"&gt;http://yoursplunkhost:8000/en-US/modules#Splunk.Module.SingleValue&lt;/A&gt; for more info.&lt;/P&gt;

&lt;P&gt;If you're getting back into dashboarding after three years I highly recommend grabbing a new version of Splunk (6.1.x, or wait until Tuesday for 6.2) and check out the immensely improved abilities in SimpleXML and the graphical dashboard editor. You likely won't want to go back to AdvancedXML again.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Oct 2014 23:20:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182803#M11242</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-10-24T23:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182804#M11243</link>
      <description>&lt;P&gt;Thanks Martin.  That worked.  However, is there no way to define the font color that's used by the single?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2014 16:59:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182804#M11243</guid>
      <dc:creator>dolfantimmy</dc:creator>
      <dc:date>2014-10-28T16:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182805#M11244</link>
      <description>&lt;P&gt;You can set the &lt;CODE&gt;classField&lt;/CODE&gt; option that grabs a field value from your result, using that as the CSS class for your single value display. For example, default range classes such as low (greenish), elevated (yellowish), severe (redish) are already defined. Beyond that you can define your own classes with whatever colour you need.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2014 17:02:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182805#M11244</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-10-28T17:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182806#M11245</link>
      <description>&lt;P&gt;I thought that was it, but the following...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;           &amp;lt;module name="SingleValue"&amp;gt;
            &amp;lt;param name="field"&amp;gt;Total Checks&amp;lt;/param&amp;gt;
            &amp;lt;param name="afterLabel"&amp;gt; events&amp;lt;/param&amp;gt;
            &amp;lt;param name="classField"&amp;gt;severe&amp;lt;/param&amp;gt;
           &amp;lt;/module&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;simple shows ## events in black, as if the classField is being ignored.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2014 17:45:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182806#M11245</guid>
      <dc:creator>dolfantimmy</dc:creator>
      <dc:date>2014-10-28T17:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182807#M11246</link>
      <description>&lt;P&gt;Does your event have a field called &lt;CODE&gt;severe&lt;/CODE&gt; that contains the class name?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2014 17:52:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182807#M11246</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-10-28T17:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182808#M11247</link>
      <description>&lt;P&gt;I'm afraid Martin that I don't know exactly what you mean.  I simply want to have a colorized box instead of a black on white number, I want the box to be colorized.  Can I define color classes in the app's application.css and reference them with the classField param?  If so, can you show me a simple example of the css code and how to reference it?&lt;/P&gt;

&lt;P&gt;Thanks a ton!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2014 14:59:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182808#M11247</guid>
      <dc:creator>dolfantimmy</dc:creator>
      <dc:date>2014-11-28T14:59:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182809#M11248</link>
      <description>&lt;P&gt;The &lt;CODE&gt;classField&lt;/CODE&gt; option references a field in your results. By setting it to "severe", you make Splunk look for a field &lt;CODE&gt;severe&lt;/CODE&gt; in your results and use its value as the class. I'm guessing you don't have such a field in your results.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2014 15:02:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182809#M11248</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-11-28T15:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182810#M11249</link>
      <description>&lt;P&gt;Correct, the search simply returns a single integer value.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2014 15:03:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182810#M11249</guid>
      <dc:creator>dolfantimmy</dc:creator>
      <dc:date>2014-11-28T15:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182811#M11250</link>
      <description>&lt;P&gt;To test this as is, append this to your search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval severe = "severe"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The Splunk will find a field &lt;CODE&gt;severe&lt;/CODE&gt;, grab its value "severe", and set the css class to &lt;CODE&gt;severe&lt;/CODE&gt;... which exists as "red" in Splunk's default CSS.&lt;/P&gt;

&lt;P&gt;Once that works, you can apply this principle to use any CSS class, even ones you define yourself.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2014 15:05:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182811#M11250</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-11-28T15:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182812#M11251</link>
      <description>&lt;P&gt;Ok, that worked.  Now, how can I define my own css class, in application.css?  Can I change the background color as well.&lt;/P&gt;

&lt;P&gt;Thanks for all of your help.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2014 16:11:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182812#M11251</guid>
      <dc:creator>dolfantimmy</dc:creator>
      <dc:date>2014-11-28T16:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182813#M11252</link>
      <description>&lt;P&gt;You could for example do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.single-value.yourclass {
    background-color: darkgreen;   
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Set the class value to "yourclass" and you'll get a dark green box behind the single value.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2014 16:36:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182813#M11252</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-11-28T16:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182814#M11253</link>
      <description>&lt;P&gt;Ok, that makes sense, but I'm not having success.&lt;/P&gt;

&lt;P&gt;Here's a snippet of the view&lt;BR /&gt;
&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;searchName&amp;gt;Total X&amp;lt;/searchName&amp;gt;
  &amp;lt;title&amp;gt;Total X&amp;lt;/title&amp;gt;
  &amp;lt;option name="count"&amp;gt;10&amp;lt;/option&amp;gt;
  &amp;lt;option name="displayRowNumbers"&amp;gt;true&amp;lt;/option&amp;gt;
  &amp;lt;option name="classField"&amp;gt;bg_darkgreen&amp;lt;/option&amp;gt;
&amp;lt;/single&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;/P&gt;

&lt;P&gt;And here's the entire contents of the app's application.css file&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
.single-value.bg_darkgreen {&lt;BR /&gt;
     background-color: darkgreen;&lt;BR /&gt;
 }&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2014 16:55:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182814#M11253</guid>
      <dc:creator>dolfantimmy</dc:creator>
      <dc:date>2014-11-28T16:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182815#M11254</link>
      <description>&lt;P&gt;Going back a few posts, do you have a field in your results called &lt;CODE&gt;bg_darkgreen&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2014 17:46:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182815#M11254</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-11-28T17:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182816#M11255</link>
      <description>&lt;P&gt;Yes, I appended this to the search&lt;/P&gt;

&lt;P&gt;... | eval bg_darkgreen = "bg_darkgreen"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:17:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182816#M11255</guid>
      <dc:creator>dolfantimmy</dc:creator>
      <dc:date>2020-09-28T18:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using a single value instead of chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182817#M11256</link>
      <description>&lt;P&gt;Okay, is your CSS correctly loaded in the browser?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2014 21:24:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-a-single-value-instead-of-chart/m-p/182817#M11256</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-11-28T21:24:49Z</dc:date>
    </item>
  </channel>
</rss>

