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 ...

Get Updates on the Splunk Community!

Index This | When is October more than just the tenth month?

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

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What’s New & Next in Splunk SOAR

 Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us for an ...