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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...