Dashboards & Visualizations

help for formatting a single panel in CSS

jip31
Motivator

Hello

I need to format a single panel in css
In my xml I have added this :

#test{vertical-align:middle;color:red!important}

between style tags
and I call the style like this

<single id="test">

but it doesnt works
could you help me please??

Tags (1)
0 Karma
1 Solution

jip31
Motivator

hi

I dont succeed to change the text color
is it font-color:red;!important;?
other question :
what are svg-container, single-result and under-label
its proper to splunk? where I can find this classes?
thanks

0 Karma

vnravikumar
Champion

Hi

Check this sample with font color yellow

<dashboard>
  <label>singleBG</label>
  <row>
    <panel>
      <html>
         <style>
          #test rect{
           fill: red !important;
           }

           #test .single-result{

           font-size: 15px !important;
           font-weight: normal !important;
           font-style: italic !important;
            fill:rgb(255,255,0) !important;
           }
         </style>
       </html>
      <single id="test">
        <search>
          <query>index="_internal" |stats count | eval count = if(count == 0, "no host", "Perimeter : " + tostring(count) + " hosts")</query>
          <earliest>-30d@d</earliest>
          <latest>now</latest>
        </search>
        <option name="colorMode">block</option>
        <option name="drilldown">none</option>
        <option name="rangeColors">["0x65a637","0xd93f3c","0xd93f3c"]</option>
        <option name="rangeValues">[0,1]</option>
        <option name="refresh.display">progressbar</option>
        <option name="useColors">1</option>
      </single>
    </panel>
  </row>
</dashboard>
0 Karma

jip31
Motivator

so if i want to change the text color I need to change fill:rgb(255,255,0) !important;??

0 Karma

vnravikumar
Champion

yes, you are correct.

0 Karma

jip31
Motivator

OK THANKS...

0 Karma
Get Updates on the Splunk Community!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...