Dashboards & Visualizations

is it possible to remove coulumn names

smolcj
Builder

hi,
is it possible to remove column names from a table?
i dont want to rename it, just want it to be removed
can i?
please help
Thanks for your time

Tags (1)
0 Karma
1 Solution

jonuwz
Influencer

With css yes :

table.splTable th {
display: none;
}

or with js :

$("th:contains('Property')").empty();

If you want to maintain the sorting ability but remove the label :

$("th:contains('Property')>a>.sortLabel").html(" ");

You need to put this js in a ajaxComplete handler

Edit

# cat application.js

$(document).ajaxComplete( function() {
    $("th:contains('Property')>a>.sortLabel").html(" ");
});

alt text

View solution in original post

sideview
SplunkTrust
SplunkTrust

typically you would use the fields command in either the base search or in a postProcess search,

`your existing search | fields - unwanted_field`

If on the other hand the field in question is important for drilldown configurations, but you don't want to actually display it to the end user, you can use the Table module from Sideview Utils, which has a hiddenFields param. Fields hidden with the hiddenFields param are still there and referenceable in drilldown logic, but are not displayed to the end-user as a column.

sideview
SplunkTrust
SplunkTrust

It sounds like maybe you don't want a table at all. Check out the documentation for the HTML module in Sideview Utils. If you know in advance what the fields and values are that you want to display, you can replace the whole thing with a piece of static HTML into which little dynamic $foo$ tokens are embedded. There's a whole docs page jn there specifically about "using HTML module to replace SingleValue", and you can render all these key value pairs into any arbitrary HTML.

0 Karma

smolcj
Builder

i just want to skip the column name but i want to retain the values in it,
as i am using many table with transpose i am getting row1,column1 and i renamed it to property value, but a number of propert , value is making my dashboard dirty.
please, any other go?

0 Karma

jonuwz
Influencer

With css yes :

table.splTable th {
display: none;
}

or with js :

$("th:contains('Property')").empty();

If you want to maintain the sorting ability but remove the label :

$("th:contains('Property')>a>.sortLabel").html(" ");

You need to put this js in a ajaxComplete handler

Edit

# cat application.js

$(document).ajaxComplete( function() {
    $("th:contains('Property')>a>.sortLabel").html(" ");
});

alt text

sideview
SplunkTrust
SplunkTrust

If you want to hide an entire column worth of data, you should look at using the Sideview Table module, because it has a "hiddenFields" param. Setting fields in that param makes those fields hidden from the screen, but the dashboard still has access to all the hidden values for drilldown searches and drilldown logic.

0 Karma

stefano_guidoba
Communicator

What about a piece of JS to hide TDs from HTML tables?

0 Karma

smolcj
Builder

Thankss jonuwz,, is it possible to empty the space for heading also?

0 Karma

jonuwz
Influencer

next time, post your application.js. updated answer.

0 Karma

smolcj
Builder

i tried second option, i didn't find any difference.
cleared cache as well as restarted splunk instance .

0 Karma

jonuwz
Influencer

updated answer

smolcj
Builder

thanks jonuwz, but wthat if i want certain column names to be skipped
say skip all column names called Property??
shall i use table.splTable th.Property{display:none;}
please help

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...