All Apps and Add-ons

Getting a water gauge viz into the same panel as other single value viz

Lucas_K
Motivator

In simplexml you can normal do something like the following

<panel>
 <title>Single value one</title>
    <single>
       <search> blah </search>
    </single>
 <title>TSingle value two</title>
    <single>
       <search> blah </search>
    </single>
</panel>

This would give you two nice single panels right next to each other.

I can't seem to get the same behaviour with the water gauge.

Even if I add it inside the same panel it will be on a brand new row.

Current

alt text

What I am after

alt text

Tags (1)
0 Karma

niketn
Legend

Following is a run anywhere example based on @nsanchezfernandez 's answer. Padding has been added on top of the panel to push visualization a bit down in the panel.

<dashboard>
  <label>Mutiple Watergauges in same Panel</label>
  <row>
    <panel depends="$alwaysHideCSSPanel$">
      <html>
        <style>
          #panel1 .panel-element-row {
          width: 50%;
          padding-top:20px;
          }

          #panel1 .dashboard-panel {
          display: flex;
          }        
        </style>
      </html>
    </panel>
    <panel id="panel1">
      <viz type="cuviz_water_gauge.water_gauge">
        <search>
          <query>index=_internal sourcetype=splunkd component="Metrics"
| top 1 component showcount=f
| table percent</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="drilldown">none</option>
        <option name="trellis.enabled">0</option>
        <option name="trellis.scales.shared">1</option>
        <option name="trellis.size">medium</option>
      </viz>
      <viz type="cuviz_water_gauge.water_gauge">
        <search>
          <query>index=_internal sourcetype=splunkd component!="Metrics"
| top 1 component showcount=f
| table percent</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="drilldown">none</option>
        <option name="trellis.enabled">0</option>
        <option name="trellis.scales.shared">1</option>
        <option name="trellis.size">medium</option>
      </viz>
    </panel>
  </row>
</dashboard>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

nsanchezfernand
Path Finder

Hi!

You could apply css to get what you want:

#your_panel_id .panel-element-row {
width: 48%;
}

#your_panel_id .dashboard-panel {
display: flex;
}

These are two water gauges, but it is the same for other visualizations:

alt text

Hope I help you.

Bentash
Explorer

How will you drill down?

0 Karma

hafizuddin
Path Finder

hi can you please write and explain the full command for this...I not understand it clearly

0 Karma

nzou_splunk
Splunk Employee
Splunk Employee

Seeing from web page Dom tree, seems splunk will generate <...custom viz element... > for each custom viz even you put the into one panel. I think that means, by default, each custom viz will be in a separarte row...

0 Karma

svercelli
Path Finder

Unfortunately the documentation seems to support that only Single value visualizations will group horizontally.

There was another way to do it in an answer on this question with what seems incorporating a script but it seems overly complex for what you would think would be such a simple task

0 Karma

Lucas_K
Motivator

Might double check the most recent examples app and see if they use any weird alignment method or extension.

0 Karma

svercelli
Path Finder
0 Karma

jmheaton
Path Finder

Why cant you put them in two different panels on the same row?

0 Karma

Lucas_K
Motivator

I am already grouping multiple singles together in panels.

alt text

The panels form the columns. All other normal viz styles support this.

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud | Unified Identity - Now Available for Existing Splunk ...

Raise your hand if you’ve already forgotten your username or password when logging into an account. (We can’t ...

Index This | How many sides does a circle have?

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

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...