Dashboards & Visualizations

How to get line breaks in table cells?

BenTreeser
Explorer

Hello,

in old dashboard versions I was able to  create multi line strings in table cells. However, in Dashboard Studio it doesn't work. Is there a workaround?

example for dashboard studio:

{
    "dataSources": {
        "ds_search_1": {
            "type""ds.search",
            "options": {
                "query""| makeresults | eval value=\"line1\r\nline2\r\nline3\" \r\n| table value",
                "queryParameters": {
                    "earliest""-24h@h",
                    "latest""now"
                }
            }
        }
    },
    "visualizations": {
        "viz_table_1": {
            "type""splunk.table",
            "options": {
                "count"100,
                "dataOverlayMode""none",
                "drilldown""none",
                "percentagesRow"false,
                "rowNumbers"false,
                "totalsRow"false,
                "wrap"true
            },
            "dataSources": {
                "primary""ds_search_1"
            }
        }
    },
    "inputs": {
        "input_global_trp": {
            "type""input.timerange",
            "options": {
                "token""global_time",
                "defaultValue""-24h@h,now"
            },
            "title""Global Time Range"
        }
    },
    "layout": {
        "type""grid",
        "options": {},
        "structure": [
            {
                "item""viz_table_1",
                "type""block",
                "position": {
                    "x"0,
                    "y"0,
                    "w"1200,
                    "h"250
                }
            }
        ],
        "globalInputs": [
            "input_global_trp"
        ]
    },
    "title""dashboardstudio",
    "defaults": {
        "dataSources": {
            "ds.search": {
                "options": {
                    "queryParameters": {
                        "latest""$global_time.latest$",
                        "earliest""$global_time.earliest$"
                    }
                }
            }
        }
    }
}
 
 
examle for xml dashboard:

 

 

<dashboard version="1.1">
  <label>delete_me_8</label>
  <row>
    <panel>
      <table>
        <search>
          <query>| makeresults | eval value="line1
line2
line3" 
| table value</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="count">100</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
  </row>
</dashboard>

 

 

Labels (2)
Tags (1)
0 Karma

BenTreeser
Explorer

I found out, in classic Splunk white-space: pre-wrap was used, which allowed line breaks in cells of table, but in Splunk Dashboard Studio white-space: normal is used, which doesn't allow line breaks.

Also, custom CSS is not supported in Dashboard Studio as it is stated here: https://docs.splunk.com/Documentation/SplunkCloud/8.1.2103/DashStudio/IntroFrame?_gl=1*4jf9w5*_ga*OT... 

If it weren't for the link graph I would instantly go back to classic Splunk ...

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...

Index This | How many sevens are there between 1 and 100?

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