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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
waghpravin14
New Member

slicer.ts code is not working in devTools

I tried to run and complie below slicer.ts code in devTool but its failing with too many errors related to "Duplicate identifier". Can someone please help me.

 

https://github.com/Microsoft/PowerBI-visuals/blob/master/src/Clients/Visuals/visuals/slicer.ts

 

Thanks In Advance

Pravin Wagh

2 REPLIES 2
deldersveld
Resident Rockstar
Resident Rockstar

Since there is an existing Slicer, that class name is already in use. Have you changed the class name and the following bit to reflect that?

 

 
export var slicer: IVisualPlugin = {
name: 'slicer',
watermarkKey: 'slicer',
capabilities: capabilities.slicer,
create: () => new Slicer()
};

I tried with chaning class name but still its failing with some compilation errors.

Aslo I changed the interface names SlicerSettings and SlicerData as these are also already in use.

What I observed is in current implementation SlicerData.formatString used but this property does not exists on Type SlicerData.

               var slicerText = rowSelection.selectAll(Selectors.LabelText.selector);
                var formatString = data.formatString;

 

I am new to custom visulization. If you point me to the working slicer code it will be great.

 

Thanks.

Pravin

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.