cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
satishr Member
Member

Cannot generate custom visual until all format options are set

I'm new to coding Power BI custom visuals. I have created a simple visual following the documentation available (which is very limited). I'm testing the visual on Power BI service and it looks fine. The only problem is I have to set or change all the options in the Format pane for the visual to show up. I'm setting default values for the options ad they show the same when I open the Format pane. But still, I have to change them all for the visual to work. I'm I missing anything? Please help!!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
satishr Member
Member

Re: Cannot generate custom visual until all format options are set

@v-viig I found the solution for the initial problem. I used if (options.dataViews[0].metadata.objects) check and it works fine now. I have a new issue. There is a "Revert to default" button in the format options. How to get make it work? 
Note: I'm not using settings.ts. I'm initializing all the format options values in the constructor in visual.ts and assigning them in the enumerateObjectInstances function.

View solution in original post

Moderator v-viig
Moderator

Re: Cannot generate custom visual until all format options are set

@satishr You can find the solution at this topic.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

5 REPLIES 5
Community Support Team
Community Support Team

Re: Cannot generate custom visual until all format options are set

@satishr,

 

Create a new visual project with the latest API version, and then check "src/settings.ts" in it.

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.
satishr Member
Member

Re: Cannot generate custom visual until all format options are set

Thanks for the reply v-chuncz. Just setting the values for each format options in settings.ts doesn't work. These values should be loaded to the visual in visual.ts and I'm not able to do it.

Moderator v-viig
Moderator

Re: Cannot generate custom visual until all format options are set

@satishr Could you please describe the issue a bit deeper?

Are you changing the color but it returns to the default? Is that correct?

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Highlighted
satishr Member
Member

Re: Cannot generate custom visual until all format options are set

@v-viig I found the solution for the initial problem. I used if (options.dataViews[0].metadata.objects) check and it works fine now. I have a new issue. There is a "Revert to default" button in the format options. How to get make it work? 
Note: I'm not using settings.ts. I'm initializing all the format options values in the constructor in visual.ts and assigning them in the enumerateObjectInstances function.

View solution in original post

Moderator v-viig
Moderator

Re: Cannot generate custom visual until all format options are set

@satishr You can find the solution at this topic.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Top Kudoed Authors
Users Online
Currently online: 137 members 1,820 guests
Please welcome our newest community members: