Forum Discussion
Anonymous
9 years agoNot applicable
Unable to read default color object
In my capabilities.json I defind an object called color. I'm trying to define it inside my custom visual using :
startingColor: getValue<string>(options.dataViews[0].metadata.objects,'colors','startingColor',"#111111"),
But I'm unable to read the default color, since the visual is not running untill I define a new color in the styling pane.
4 Replies
- v-viigCommunity Champion
Hello Anonymous,
Power BI doesn't allow to get default color. However, you might define your own default color to return it to Power BI as a default.
You just need to apply your default color if there's no color in the metadata.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals