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
bala23289
Regular Visitor

How to add custom Properties in custom visuals

I have a custom visual which is using ag-grid, I want a way to add custom properties which may be hidden from the Formatting options in the visual pane.

 

For example there is an option in grid to sort or group by values, I dont want this to be added in the "Format" tab of visuals, I just want a way to store this details some where(using api, or custom visual update) for that report and retrieve the data when the user loads the same report and display the group by or sorting for that field.

 

When I was checking there was a visual called "Table" which does the same thing for sorting. Can any one help me on this? 

5 REPLIES 5
v-chuncz-msft
Community Support
Community Support

@bala23289,

 

You could check the tutorial at https://github.com/Microsoft/PowerBI-visuals/blob/master/Tutorial/StaticObjects.md. And there are enough repositories at https://github.com/Microsoft?utf8=%E2%9C%93&q=PowerBI-visuals&type=&language= for your reference.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-chuncz-msft  

 

Thank you for your suggestion. I am aware of the objects(Static Objects), But as I have metioned in the original question, I dont want this to be displayed in the property pane. 

Power bi table Visual.png

For example I am attaching a default behaviour of table "Visuals", where you can see a sort icon. This will not be available in the property pane but the sorting will be saved and when you open the report again the sorting will be restored from some where. 

 

I am also trying to do something similiar. Let me know If I am still confusing. 

 

 

@bala23289,

 

You may refer to Table Sorter and view its source code at https://github.com/Microsoft/PowerBI-visuals-TableSorter.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-chuncz-msft

 

Thank you for your reply. Can you point to me what I should look for in the table sorter code? Thank you again. 

@bala23289,

 

You may leave a comment on GitHub to seek advice from the author.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.