Forum Discussion
Apply default colour to multiple line chart
Hello,
I'm trying to apply a default colour to a multiple line chart and highlight the first categories in the data (fixed). This is what I need to get:
But I have only been able to apply colours individually to each line on Power BI
This will not work because (1) the number of lines is high and (2) the number of lines may change when the data source is updated.
Is there a way to do this?
Thanks!
--
Ana
ana-pierola Have you investigated custom themes?
3 Replies
- Greg_DecklerCommunity Champion
ana-pierola Have you investigated custom themes?
- ana-pierolaFrequent Visitor
Hi Greg_Deckler
Thanks! Indeed, themes worked.
I'll copy the lines I added to the json file, in case this is useful for somebody else
{
"name": "Theme name",
...
"visualStyles": {
...
"lineChart": {
"*": {
"dataPoint": [{
"defaultColor": { "solid": { "color": "#F0F0F0"}}
}]
}
},
...
},
...
}A lot more options are given here:
https://github.com/deldersveld/PowerBI-ThemeTemplates/blob/master/Line.json
- Greg_DecklerCommunity Champion
ana-pierola Awesome. I should have also posted my blog article on theme generators for you:
Power BI Theme Generators - Microsoft Power BI Community