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!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...