cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Cannot add property to Format->General

Okay I have spent many hours now trying to fix this problem to no avail, so now I would appreciate a little advice 🙂

 

I am currently writing some custom additions to the Gannt visual (can be found here).

 

One of those additions is the ability to sort the gantt by name rather than startdate. I have written some code that looks to be working and now I want a boolean property under format->generel such that the user can turn this ON/OFF. I added the following to capabilities.json under objects-> general -> properties.

*Notice that I am including the "groupTasks" property above which was in the file to begin with and was used as a refference. 

 

"groupTasks": {
                    "displayName": "Group Tasks",
                    "displayNameKey": "Visual_GroupTasks",
                    "type": {
                        "bool": true
                    }
                },
"sortByName": {
                    "displayName": "Sort by name",
                    "displayNameKey": "Visual_SortTasks",
                    "type": {
                        "bool": false
                    }
                }

Then added the following to resources.resjson

 

 

"Visual_GroupTasks": "Group Tasks",
"Visual_SortTasks": "Sort by name",

 

 

This visual uses DataViewObjectsParser for processing the above and give a model accesable by the rest of the code. I added sortByName here as well in settings.ts.

 

    export class GeneralSettings {
        groupTasks: boolean = false;
		sortByName: boolean = false;
        scrollToCurrentTime: boolean = false;
        durationUnit: string = "day";
        durationMin: number = 1;
    }

Now when I search  for "grouptasks", I find that the only other place it was used was as a method under the main file gantt.ts and when it was referenced in the GeneralSettings model above. I therefore cannot see what I am missing. I have tried making an equalent of any mention of groupTasks in all files, but with the name of sortByName, but it still won't appear under format->general in PowerBI desktop..

 

Any ideas?

1 REPLY 1
Highlighted
Community Champion
Community Champion

Re: Cannot add property to Format->General

Duplicate of this one.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Helpful resources

Announcements
Meet the 2020 Season 2 Power BI Super Users!

Meet the 2020 Season 2 Power BI Super Users!

Find out who's part of the program this season, and welcome the new Super Users.

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Featured Data Story of The Month

Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

Power BI Dev Camp - Developing with .NET Core

Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.

Top Solution Authors
Top Kudoed Authors