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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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