Closed ganesh-s05 closed 4 years ago
Hi,
I think that this comment should answer your need: https://github.com/fbaligand/kibana-enhanced-table/issues/106#issuecomment-667250493
Awesome.. thank you very much.. It worked like a charm.. You made my day!! I have attached the screenshot of the solution.. I have 2 questions though.
@fbaligand Meanwhile, I tried the hard way of creating computed columns for each and every column and it looks something like below. It looks a bit clumpsy. All the computed columns are closely coupled. Are there any ways to make the column width extended? I went over the documentation but I couldn't find anything for column width or for bordering (like excel). Any ideas would be helpful.
Hi, So I guess you use “split cols” bucket in your last screenshot, right?
<span style="color: white">{{value}}</span>
replace(colX, " ", " ")
Then you can’t define a border or change column width explicitly. But you can display alternative row color by activating option “striped rows”
Hi, To your first question - I actually used "split rows". If i understand right - So if I tried using the font colors then i can't define the border/change column width ?
I can use the same "Template" thing to define the border & column width? Sorry if it's a silly question.
So:
Thank you, @fbaligand for you time & inputs.
The column width depends on the size of the text in the column header. The moment i give a larger title the column does expands.
In addition for the table border, i implemented the below in one specific column.
<span style="background-color: {{col21}}", table { border-collapse: collapse}">{{value}} </span>
I can still add a table { border: 3px solid } to make the borders more thick.. And the beauty is - It got applied for the entire Enhanced table. I thought it will get applied only to the specific column. Its a bonus :) This is how my table looks like now:
Thanks for the share! I'm very surprised that a css style defined on "span" tag that is inside the table impacts the whole table css! But it's a cool hack :)
Concerning width of the column, you can try to put this style: white-space: nowrap
.
It avoids to have line breaks in your cells.
Thanks for the share! I'm very surprised that a css style defined on "span" tag that is inside the table impacts the whole table css! But it's a cool hack :)
Yep.. I'm surprised either :)
Concerning width of the column, you can try to put this style:
white-space: nowrap
. It avoids to have line breaks in your cells.
Sure. I will try.. Thank you very much. I will go ahead and close this. Once again appreciate your help.
Nice to see that you solved your need!
Hi, I am not sure if this will be a question/enhancement & I will leave that decision to you :)
I have a scenario wherein I have a Status defined with a color coding (achieved this by choosing color in the Index pattern based on condition) in one column say col4 & I have another column say col12 which has the date displayed. I would like to keep the col12 as such & have the background color referenced from col4. Is this possible? I tried to do the referencing by - {{value}} but it shows me error stating unable to reference columns. Could you please provide some insights?