Dashboards & Visualizations

dashboard table align numeric to the right

kmm2
Path Finder

I can get a numeric table aligned to the left in the statistics field with the 

| eval count=printf("%-10d",<your_field>) 

However the alignment does not translate to the dashboard.     Any insight on why this does work or if there is another way to align numeric results to the right on a dashboard for aesthetic purposes?

Labels (1)
0 Karma
1 Solution

kmm2
Path Finder

This is the solution that seem to be working .  Edited source code on dash.  (can change left, center, or right)

 

],
"options": {
"tableFormat": {
"align": "> table |pick(alignment)"
"alignment": [
"left"
]

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Numbers are usually aligned to the right, strings are aligned to the left. If the string contains only numbers, it may be aligned in a table panel to the right. To force it to remain as a string (and be aligned to the left), you could append a space to the string.

0 Karma

kmm2
Path Finder

Thanks for the suggestion to append a space to the string..    I have tried :

| eval new_field = existing_field + " "    

and :

| eval new_field = existing_field + " "

 

both show it adjusted in the statistics page but not on the Dashboard.   

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try using Classic SimpleXML dashboards - Studio still has some catching up to do when compared to Classic

0 Karma

kmm2
Path Finder

This is the solution that seem to be working .  Edited source code on dash.  (can change left, center, or right)

 

],
"options": {
"tableFormat": {
"align": "> table |pick(alignment)"
"alignment": [
"left"
]

0 Karma

vinod743374
Communicator

Hi @kmm2 

Its Working Fine, but it Works for All the Fields in the Table,

is there any Solution to Apply to a Specific Field.

0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...