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
*NEW* Splunk Love Promo!
Snag a $25 Visa Gift Card for Giving Your Review!

It's another Splunk Love Special! For a limited time, you can review one of our select Splunk products through Gartner Peer Insights and receive a $25 Visa gift card!

Review:





Or Learn More in Our Blog >>