Dashboards & Visualizations

how to change color of tspan for singlevalue ?

sfatnass
Contributor

i have a single value using nunber format (unit)
and i need to change color of only number format, not all result.

how can i do that?

Tags (2)
0 Karma
1 Solution

sfatnass
Contributor

i found something but really what i want

  document.getElementsByClassName("single-result-unit")[0].style.fill = "red";

View solution in original post

0 Karma

sfatnass
Contributor

i found something but really what i want

  document.getElementsByClassName("single-result-unit")[0].style.fill = "red";
0 Karma

inventsekar
SplunkTrust
SplunkTrust

not sure, maybe check this -
https://splunkbase.splunk.com/app/1603/

on the first screenshot, top right, there is a single value dashboard. maybe, this will give you some ways to edit.

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

sfatnass
Contributor

yes i have this app but there is nothing around my question.
so thx for your reply

0 Karma

inventsekar
SplunkTrust
SplunkTrust

Note: For queries using stats to aggregate results, only the color by value option is available.
You can also adjust the color mode to change whether colors appear in the foreground or background.

https://docs.splunk.com/Documentation/SplunkCloud/6.6.0/Viz/SingleValueFormatting

the rangemap can give some more options.
https://answers.splunk.com/answers/103239/change-color-of-single-value-visualization.html

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

sfatnass
Contributor

in 2017 we can't do more with css?

0 Karma

inventsekar
SplunkTrust
SplunkTrust

well, yes, not sure why splunk developers didnt think of CSS options.

the other dashboards are having so many options with xml editings.

for single value dashboard, when you try to edit it, you are given the option to change colors.

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

Richfez
SplunkTrust
SplunkTrust

Could you explain this more? What do you mean by "Change color of only number format, not all result"? What number format?

What does a current number and number format look like now, and what do you want different? Can you upload a screenshot to imgur.com (or other image sharing site) and link here? Then describe what changed you'd like?

Thanks!

0 Karma

sfatnass
Contributor

ok this is what we have i we use a simple singlevalue, the result is alpha and the unit is F1

normal single value

now i need to get something like this :

the aim

but nothing work with css i think it's svg coloration.

0 Karma
Get Updates on the Splunk Community!

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...

Splunk App Dev Community Updates – What’s New and What’s Next

Welcome to your go-to roundup of everything happening in the Splunk App Dev Community! Whether you're building ...

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco + Splunk! We’ve ...