Splunk Search

Increase the size of a sparkline that is part of a single value visualization.

SplunkHorse
New Member

I have a dashboard with a single value sparkline based off a timechart:

index=[theindex] event_name=[theevent]
| timechart span=1h count

I would like to increase the size of a sparkline so that it's more visible. How do I do this? I have been experimenting with making XML changes to dashboards and have some experience with CSS if that's necessary.

0 Karma

vnravikumar
Champion

Hi

Give a try

<dashboard>
  <label>sparkline</label>
  <row>
    <html>
      <style>
        #rk .sparkline{
        opacity: 1 !important;
        stroke-width: 3px !important;
        }

        #rk .sparkline-delta{
        opacity:1 !important;
        stroke-width: 4.5px !important;
        }
      </style>
    </html>
  </row>
  <row>
    <panel>
      <single id="rk">
        <search>
          <query>index="_internal" 
| timechart span=1h count</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="drilldown">none</option>
      </single>

    </panel>
  </row>
</dashboard>

SplunkHorse
New Member

Thanks Vnravikumar,

This was helpful and it increased the thickness of the line which made it easier to see from a distance, so it's a good solution, but I was hoping I could increase the vertical height, so that it takes up more space from the bottom to the top, so that changes in the line are easier to note. Is that possible? I attempted to add height and width as properties in the CSS, using both px and % as variables for them, but no change was observed. Are they not valid? Or am I using the wrong property?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...