Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
chotu27
Post Patron
Post Patron

Decrease Scroll bar width and height in table visual

Hi All,

 

I have developed my own  Custom Table visual but i am unable to decrease the width of scroll bar same as power bi table visual.

 

MY less file : 

.scrollTable
{
display: table;
border-collapse: collapse;
 
}
 
.heading
{
display: table-header-group;
 
 
}
.divTableBody
{
display: table-row-group;
 
 
}
 
 

.row::before {
display: none;
}
.row:nth-child(even) {
background: lightgray;
}
.row
{
display: table-row;
//border-bottom: 2px solid black;
}
.head
{
 
display: table-cell;
padding: 7px 5px;
border-bottom: 2px solid pink;
}
.cell
{
display: table-cell;
padding: 1px 5px;
}
 
visual.ts file :
 
constructor(options: VisualConstructorOptions) {
options.element.style.overflow = 'auto';
 
let target: d3.Selection<HTMLElement> = this.target = d3.select(options.element)
let table: d3.Selection<HTMLElement> = this.table =this.target.append("div").classed("scrollTable",true);
this.thead = this.table.append("div").classed("heading",true).append("div").classed("row",true);
this.tbody = this.table.append("div").classed("divTableBody",true).append("div").classed("row",true);
 
 

 

scroll.PNG

1 REPLY 1
v-viig
Community Champion
Community Champion

Power BI native table visual implements its own scrollbar as a div element.

However, your custom visual uses browser's scrollbar. Borwsers doesn't allow us to control size of the scrolbar.

 

I suppose that there're these soolutions that you might try:

  1. Implement your own scrollbar control that supports customizing
  2. Take a look at this topic

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

 

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.