<?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: Force query result to display as chart in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Force-query-result-to-display-as-chart/m-p/118117#M6843</link>
    <description>&lt;P&gt;When you will put this search in a dashboard/view, you can specify which format you want it to be displayed in view-panel (chart or table).&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2013 18:52:57 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2013-10-28T18:52:57Z</dc:date>
    <item>
      <title>Force query result to display as chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Force-query-result-to-display-as-chart/m-p/118116#M6842</link>
      <description>&lt;P&gt;I have the following query in Splunk 5:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=summary
report=hw_use_by_jobs 
orig_host="my_host" |
chart 
   p50(PercentProcessorTime_max) as "p50 CPU", 
   stdev(PercentProcessorTime_max) as "CPU stdev",
   count as DataPoints
   over ConcurrentTasks |
eventstats sum(DataPoints) as Total_DataPoints  |
eval "Percent of Time"=100*DataPoints/Total_DataPoints | 
fields "ConcurrentTasks" "Percent of Time"  "p50 CPU"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The output of this query is a table of numeric data, with a UI option I can click to display the results as a graphical chart.  Is there any way I can specify in the query itself that I want the data to display initially as a chart instead of as a table?&lt;/P&gt;

&lt;P&gt;My goal is to stick this chart into a view, so if there is a better approach to doing this in the query itself, I'm open to that as well.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2013 16:06:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Force-query-result-to-display-as-chart/m-p/118116#M6842</guid>
      <dc:creator>travis_bear</dc:creator>
      <dc:date>2013-10-28T16:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Force query result to display as chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Force-query-result-to-display-as-chart/m-p/118117#M6843</link>
      <description>&lt;P&gt;When you will put this search in a dashboard/view, you can specify which format you want it to be displayed in view-panel (chart or table).&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2013 18:52:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Force-query-result-to-display-as-chart/m-p/118117#M6843</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-10-28T18:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Force query result to display as chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Force-query-result-to-display-as-chart/m-p/118118#M6844</link>
      <description>&lt;P&gt;@somesoni -- That's helpful.  If you submit your comment as an answer, I will accept it.  If you include a simple xml example, I will upvote it as well.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2013 19:36:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Force-query-result-to-display-as-chart/m-p/118118#M6844</guid>
      <dc:creator>travis_bear</dc:creator>
      <dc:date>2013-10-28T19:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Force query result to display as chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Force-query-result-to-display-as-chart/m-p/118119#M6845</link>
      <description>&lt;P&gt;When you will put this search in a dashboard/view, you can specify which format you want it to be displayed in view-panel (chart or table). Simple xml example"-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?xml version='1.0' encoding='utf-8'?&amp;gt;
&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;IndexStats&amp;lt;/label&amp;gt;
 &amp;lt;!-- Place panels within rows --&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;table&amp;gt;
      &amp;lt;title&amp;gt;Top Sourcetypes (Last 24 hours)&amp;lt;/title&amp;gt;
      &amp;lt;!-- A search powers the panel --&amp;gt;
      &amp;lt;searchString&amp;gt;
       ****You search query****
      &amp;lt;/searchString&amp;gt;

      &amp;lt;!-- Specify a time range for the search --&amp;gt;
      &amp;lt;earliestTime&amp;gt;-24h@h&amp;lt;/earliestTime&amp;gt;
      &amp;lt;latestTime&amp;gt;now&amp;lt;/latestTime&amp;gt;

      &amp;lt;!-- Use options to further define how to display result data --&amp;gt;
      &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;option name="rowNumbers"&amp;gt;true&amp;lt;/option&amp;gt;
    &amp;lt;/table&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;chart&amp;gt;
      &amp;lt;title&amp;gt;PerIndexThruputChart&amp;lt;/title&amp;gt;
       &amp;lt;searchString&amp;gt;
       ****You search query****
      &amp;lt;/searchString&amp;gt;
  &amp;lt;!-- Specify a time range for the search --&amp;gt;
  &amp;lt;earliestTime&amp;gt;-24h@h&amp;lt;/earliestTime&amp;gt;
  &amp;lt;latestTime&amp;gt;now&amp;lt;/latestTime&amp;gt;

  &amp;lt;!-- Use options to further define how to display result data --&amp;gt;
  &amp;lt;option name="charting.chart"&amp;gt;bar&amp;lt;/option&amp;gt;
&amp;lt;/chart&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;BR /&gt;
&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2013 23:04:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Force-query-result-to-display-as-chart/m-p/118119#M6845</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2013-10-28T23:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Force query result to display as chart</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Force-query-result-to-display-as-chart/m-p/118120#M6846</link>
      <description>&lt;P&gt;Thank you that was helpful!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2013 23:38:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Force-query-result-to-display-as-chart/m-p/118120#M6846</guid>
      <dc:creator>travis_bear</dc:creator>
      <dc:date>2013-10-28T23:38:39Z</dc:date>
    </item>
  </channel>
</rss>

