<?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: Colorized bar graph with log scale overlay in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Colorized-bar-graph-with-log-scale-overlay/m-p/660299#M54348</link>
    <description>&lt;P&gt;Ahh.. When you are stacking a bar chart, you cannot use log scale on the left hand Y-axis and it gives an error, but when setting Log on the Chart Overlay right hand axis, it does not give an error but ignores log.&lt;/P&gt;&lt;P&gt;I did't realise it restricted the RH axis.&lt;/P&gt;&lt;P&gt;What if you added&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval analog_value=log(analog_value,10)&lt;/LI-CODE&gt;&lt;P&gt;it would have the same effect, although not with the right numbers ...&lt;/P&gt;</description>
    <pubDate>Tue, 10 Oct 2023 20:27:51 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2023-10-10T20:27:51Z</dc:date>
    <item>
      <title>Colorized bar graph with log scale overlay</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Colorized-bar-graph-with-log-scale-overlay/m-p/660138#M54336</link>
      <description>&lt;P&gt;I have time series data like this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;_time&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;digital_value&lt;/STRONG&gt;: can be either 0.1&lt;FONT size="4"&gt;&amp;nbsp;&lt;/FONT&gt;or 1 (see Note)&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;analog_value&lt;/STRONG&gt;: can be 0, 100, 500, 1000, 5000, 10000&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Note) It's actually 0 or 1, but 0 doesn't show in a bar graph.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to plot this data in a diagram like this:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;X axis = _time&lt;/LI&gt;&lt;LI&gt;digital_value=0.1 as a &lt;STRONG&gt;red bar&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;digital_value=1 as a &lt;STRONG&gt;green bar&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;analog_value as an overlaid&amp;nbsp;&lt;STRONG&gt;line&lt;/STRONG&gt; graph, with &lt;STRONG&gt;log scale&lt;/STRONG&gt; Y axis&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;To colorize digital_value, I understand I must split it into two series, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| digital_value_red = if(digital_value=0.1, 0.1, null())
| digital_value_green = if(digital_value=1, 1, null())
| fields -digital_value&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, this creates&amp;nbsp;&lt;EM&gt;two bars per data point&lt;/EM&gt;, where only the non-null one is shown and the other one leaves a gap. That way, I don't have equally spaced bars along the X axis any more. See this example:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="colorized bar graph problem.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27495i826FB04793BC1A10/image-size/large?v=v2&amp;amp;px=999" role="button" title="colorized bar graph problem.png" alt="colorized bar graph problem.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, stacked bars? Yes, but that doesn't work with log scale Y axis for the overlaid line graph.&lt;/P&gt;&lt;P&gt;So, calculate&amp;nbsp;&lt;FONT face="courier new,courier"&gt;log(analog_value)&lt;/FONT&gt;&amp;nbsp; and plot that a linear Y axis? While that produces a proper visual, you can't read the value of&amp;nbsp;&lt;FONT face="courier new,courier"&gt;analog_value&lt;/FONT&gt; any more (only it's log).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas how I can achieve a colorized bar graph + log scale overlay?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 12:07:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Colorized-bar-graph-with-log-scale-overlay/m-p/660138#M54336</guid>
      <dc:creator>rikinet</dc:creator>
      <dc:date>2023-10-09T12:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Colorized bar graph with log scale overlay</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Colorized-bar-graph-with-log-scale-overlay/m-p/660188#M54341</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/255974"&gt;@rikinet&lt;/a&gt;&amp;nbsp;Just make the chart show a stacked chart and as you have only a single value per time, it will show one or the other&lt;/P&gt;&lt;P&gt;Here's an example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;colourgreen&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults count=20
| streamstats c
| eval _time=now() - (c * 60)
| eval digital_value=if (random() % 2 == 1, 0.1, 1)
| eval analog_value=mvindex(split("0,100,500,1000,5000,10000",","), random() % 6)
| fields - c
| eval digital_value_red = if(digital_value=0.1, 0.1, null())
| eval digital_value_green = if(digital_value=1, 1, null())
| fields - digital_value
          &amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.overflowMode"&amp;gt;ellipsisNone&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisLabelsX.majorLabelStyle.rotation"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleX.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisTitleY2.visibility"&amp;gt;visible&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisX.abbreviation"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisX.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY.abbreviation"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY.scale"&amp;gt;linear&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.abbreviation"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.enabled"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.axisY2.scale"&amp;gt;log&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;column&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.bubbleMaximumSize"&amp;gt;50&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.bubbleMinimumSize"&amp;gt;10&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.bubbleSizeBy"&amp;gt;area&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.nullValueMode"&amp;gt;gaps&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.overlayFields"&amp;gt;analog_value&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.showDataLabels"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.sliceCollapsingThreshold"&amp;gt;0.01&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.stackMode"&amp;gt;stacked&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.style"&amp;gt;shiny&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.fieldColors"&amp;gt;{digital_value_red: 0xFF0000, digital_value_green: 0x00FF00}&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.layout.splitSeries"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.layout.splitSeries.allowIndependentYRanges"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.labelStyle.overflowMode"&amp;gt;ellipsisMiddle&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.mode"&amp;gt;standard&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.legend.placement"&amp;gt;right&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.lineWidth"&amp;gt;2&amp;lt;/option&amp;gt;
        &amp;lt;option name="height"&amp;gt;406&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.enabled"&amp;gt;0&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.scales.shared"&amp;gt;1&amp;lt;/option&amp;gt;
        &amp;lt;option name="trellis.size"&amp;gt;medium&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bowesmana_0-1696904223040.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27502iE67CDBB385865BB8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="bowesmana_0-1696904223040.png" alt="bowesmana_0-1696904223040.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 02:17:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Colorized-bar-graph-with-log-scale-overlay/m-p/660188#M54341</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-10-10T02:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Colorized bar graph with log scale overlay</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Colorized-bar-graph-with-log-scale-overlay/m-p/660290#M54345</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;for your comprehensive reply and example!&lt;BR /&gt;&lt;BR /&gt;It works fine - but unfortunately it still doesn't get the logarithmic scale on the overlay right. While setting&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;option name="charting.axisY2.scale"&amp;gt;log&amp;lt;/option&amp;gt;&lt;/PRE&gt;&lt;P&gt;does not yield any validation error, it simply doesn't work as expected. Your example image also shows a linear secondary Y axis.&lt;/P&gt;&lt;P&gt;When editing this dashboard in the graphical editor, I get an error when I try to change the Y axis to logarithmic.&lt;/P&gt;&lt;P&gt;Maybe there is just no possible way in Splunk to do what I want to do?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 19:43:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Colorized-bar-graph-with-log-scale-overlay/m-p/660290#M54345</guid>
      <dc:creator>rikinet</dc:creator>
      <dc:date>2023-10-10T19:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Colorized bar graph with log scale overlay</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Colorized-bar-graph-with-log-scale-overlay/m-p/660299#M54348</link>
      <description>&lt;P&gt;Ahh.. When you are stacking a bar chart, you cannot use log scale on the left hand Y-axis and it gives an error, but when setting Log on the Chart Overlay right hand axis, it does not give an error but ignores log.&lt;/P&gt;&lt;P&gt;I did't realise it restricted the RH axis.&lt;/P&gt;&lt;P&gt;What if you added&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval analog_value=log(analog_value,10)&lt;/LI-CODE&gt;&lt;P&gt;it would have the same effect, although not with the right numbers ...&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 20:27:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Colorized-bar-graph-with-log-scale-overlay/m-p/660299#M54348</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-10-10T20:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Colorized bar graph with log scale overlay</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Colorized-bar-graph-with-log-scale-overlay/m-p/660324#M54350</link>
      <description>&lt;P&gt;Yes, I also had that idea:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;&lt;SPAN&gt;So, calculate&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;log(analog_value)&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp; and plot that a linear Y axis? While that produces a proper visual, you can't read the value of&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;analog_value&lt;/FONT&gt;&lt;SPAN&gt;&amp;nbsp;any more (only it's log).&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;But the illegibility of the true values still bothers me, which is why I was hoping for an even more perfect solution, somehow... Maybe there is none.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 22:55:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Colorized-bar-graph-with-log-scale-overlay/m-p/660324#M54350</guid>
      <dc:creator>rikinet</dc:creator>
      <dc:date>2023-10-10T22:55:02Z</dc:date>
    </item>
  </channel>
</rss>

