Get Free Trial

Customize column lines

Answered
Massimo asked on June 22, 2021

Hi,
i’m looking for a way to customize my columns like the image capture0.jpg, i want the left and the right border of the bucket columns with a different style, in my example the code below (added on customizeCell) was used for draw the right line 

if(cell.att.role === "gridcell"){
if(data.measure && data.measure.caption && data.measure.caption === "Diff"){
cell.addClass("grid-right-bucket-border")
}
}

The main problem is if the user remove the column “diff” obviously the line disappears, is there an alternative for draw the line? 
Regards,
Massimo

Attachments:
Capture0.JPG
Capture1.JPG

5 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster June 23, 2021

Hello,
 
Thank you for posting on our forum.
 
We suggest scanning the report every time when it is changed. It allows adjusting the customizeCellFunction and apply the desired formatting.
 
Here is JSFiddle we prepared for demonstration: https://jsfiddle.net/flexmonster/2qpn6L1f/.
 
Please let us know if it helps.
 
Best regards,
Illia

Public
Massimo June 29, 2021

Hi Illia,
my apologies, apparently i didn’t make my point cleary enough.
The image1.jpg is a differet field setup of your example, the image2.jpg is the result of those settings, if we assume to put a border only to the columns of the quantity (because i want to focus attention of those columns) when you expand a quantity column that is the result (image3.jpg) all the sub-columns (country) have a border. Is it possible to draw a border only for a specific column ? (in this case quantity, image4) 
Best regards,
Massimo
 

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster June 30, 2021

Hello,
 
Thank you for the details.
 
If we understand correctly, you want to highlight each specific member of the desired field (“Quantity” in your example).
 
We suggest checking out the following JSFiddle we prepared: https://jsfiddle.net/flexmonster/4q8hydef/.
Use the fieldToHighlightHierarchyName variable to define the highlighted hierarchy.
 
Feel free to reach out if we did not understand your request correctly.
Looking forward to your feedback.
 
Best regards,
Illia

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster July 7, 2021

Hello,
 
We are wondering if the provided approach works well for you.
 
Looking forward to your feedback.
 
Kind regards,
Illia

Public
Massimo July 9, 2021

Hi Illia ,
the example seems exactly what i want!
Thank you for everything.
Best regards,
Massimo

Please login or Register to Submit Answer