<?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 Scatter Plot with non-numeric y values in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-Plot-with-non-numeric-y-values/m-p/22682#M814</link>
    <description>&lt;P&gt;My data table looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Product TimeOfSale
Shirt   5/2/13 5:00:00.000 PM  
Shirt   5/2/13 6:00:00.000 PM  
Slacks  5/2/13 6:00:00.000 PM  
Jacket  5/2/13 7:00:00.000 PM  
Slacks  5/2/13 8:00:00.000 PM  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How would I create a Scatter Plot (or some chart) where distinct products are listed on the Y-Axis and Time_Of_Sale is the X-Axis.  I need a tick mark plotted for each Product for the appropriate TimeOfSale.  &lt;/P&gt;

&lt;P&gt;Essentially, I need something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Shirt      x    x
Slacks          x         x
Jacket               x  
          5pm  6pm  7pm  8pm
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks, Tom&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 13:49:09 GMT</pubDate>
    <dc:creator>lundstrt</dc:creator>
    <dc:date>2020-09-28T13:49:09Z</dc:date>
    <item>
      <title>Scatter Plot with non-numeric y values</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-Plot-with-non-numeric-y-values/m-p/22682#M814</link>
      <description>&lt;P&gt;My data table looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Product TimeOfSale
Shirt   5/2/13 5:00:00.000 PM  
Shirt   5/2/13 6:00:00.000 PM  
Slacks  5/2/13 6:00:00.000 PM  
Jacket  5/2/13 7:00:00.000 PM  
Slacks  5/2/13 8:00:00.000 PM  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How would I create a Scatter Plot (or some chart) where distinct products are listed on the Y-Axis and Time_Of_Sale is the X-Axis.  I need a tick mark plotted for each Product for the appropriate TimeOfSale.  &lt;/P&gt;

&lt;P&gt;Essentially, I need something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Shirt      x    x
Slacks          x         x
Jacket               x  
          5pm  6pm  7pm  8pm
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks, Tom&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:49:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-Plot-with-non-numeric-y-values/m-p/22682#M814</guid>
      <dc:creator>lundstrt</dc:creator>
      <dc:date>2020-09-28T13:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot with non-numeric y values</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-Plot-with-non-numeric-y-values/m-p/22683#M815</link>
      <description>&lt;P&gt;One way, would be to create a lookup table assigning a numberic value to each item.  So that Jacket=1, Slacks=2, Shirt=3.  Then use the lookup command to convert.  This assumes that the item list is known.&lt;/P&gt;

&lt;P&gt;| lookup item_string_to_number item_name OUTPUT item_id&lt;/P&gt;

&lt;P&gt;Then use item_id as your y-axis value&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Lookup" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Lookup&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:49:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-Plot-with-non-numeric-y-values/m-p/22683#M815</guid>
      <dc:creator>mikelanghorst</dc:creator>
      <dc:date>2020-09-28T13:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Scatter Plot with non-numeric y values</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-Plot-with-non-numeric-y-values/m-p/22684#M816</link>
      <description>&lt;P&gt;Thanks Mike, I used your suggestion (via a slightly different approach.  I used a join with | streamstats count as item_id).  The revised table now has an item_id representing a numeric y-value.  There is still one problem.  &lt;/P&gt;

&lt;P&gt;My search looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | chart values(item_id) over _time by Product
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;While a 'line' Chart type plots reasonably, a 'scatter' does not.  Is there anything peculiar with my data or search that breaks a scatter ?  &lt;/P&gt;

&lt;P&gt;Thanks again, Tom&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:50:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Scatter-Plot-with-non-numeric-y-values/m-p/22684#M816</guid>
      <dc:creator>lundstrt</dc:creator>
      <dc:date>2020-09-28T13:50:33Z</dc:date>
    </item>
  </channel>
</rss>

