Forum Discussion
ShutTap
8 years agoHelper I
Create stacked column chart
Hi. How to add "Legend" and use it in visualisation? Please help, with some examples of declaring and using, or with link on learning documentation
v-viig
8 years agoCommunity Champion
Hello ShutTap,
You might take a look at powerbi-visuals-utils-chartutils that support legend.
You might also take a look at Tornado Chart that uses this module.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
ShutTap
8 years agoHelper I
Thanks, very helpful
One more question: which analogue of getCategoricalObjectValue but for Values (in "legend"), it's needed to add default color to groups of legend, that repeated from category to category
getCategoricalObjectValue<Fill>(category, k, 'colorSelector', 'fill', defaultColor)
but fo legends value.

it's named "series", ok...
- v-viig8 years agoCommunity Champion
You might get a default color for each category by using colorPalette.getColor method.
Please take a look at this example to find out more.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals