Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi there,
I am buliding my custom visual and currently having the issus that the UI of conditional formatting is blank when using fillRule of capabilities value.
Have tested ColorPicker formatting property way with Fill capabilities value and it works totally fine.
Can't find any information related fillRule. Don't know which part is wrong.
My code is below:
capabilities.json
...
"objects": {
"dataColor": {
"displayName": "Data Colors",
"properties": {
"fillRule": {
"displayName": "Gradient Colors",
"type": {
"fillRule": {
"linearGradient2": {
"max": {
"color": "#00ff00",
"value": 100
},
"min": {
"color": "#ff0000",
"value": 0
},
"nullColoringStrategy": {}
},
"linearGradient3": {
"max": {
"color": "#00ff00",
"value": 100
},
"mid": {
"color": "#00ff00",
"value": 50
},
"min": {
"color": "#ff0000",
"value": 0
},
"nullColoringStrategy": {}
}
}
}
}
}
}
}
...
setting.ts
···
class DataPointCardSettings extends Card {
fill = new GradientBar({
name: "fillRule",
displayName: "Font color",
value: {value:""},
instanceKind: powerbi.VisualEnumerationInstanceKinds.ConstantOrRule,
selector: dataViewWildcard.createDataViewWildcardSelector(dataViewWildcard.DataViewWildcardMatchingOption.InstancesAndTotals)
})
name: string = "dataColor";
displayName: string = "Data color";
slices: Array<Slice> = [this.fill];
}
···
Solved! Go to Solution.
Hi, @Fanco
Regarding the issue you raised, my solution is as follows:
1.Firstly, for the JSON part, you can refer to my code below. This code was obtained through third-party software, and I hope it will be helpful to you:
"objects": {
"values": [
{
"properties": {
"backColor": {
"solid": {
"color": {
"expr": {
"FillRule": {
"Input": {
"SelectRef": {
"ExpressionName": "Sum(Table.Column2)"
}
},
"FillRule": {
"linearGradient2": {
"min": {
"color": {
"Literal": {
"Value": "'minColor'"
}
}
},
"max": {
"color": {
"Literal": {
"Value": "'maxColor'"
}
}
},
"nullColoringStrategy": {
"strategy": {
"Literal": {
"Value": "'asZero'"
}
}
}
}
}
}
}
}
}
}
}
For detailed information, please refer to the following blog and official documentation:
Power BI Reporting Best Practices Analyzer - Microsoft Fabric Community
2.Secondly, for the settings part, you can refer to forum questions similar to yours. Below are screenshots of the relevant content:
For detailed information, please refer to the following links:
Solved: Re: Custom Visual - TextInput in Visual Format Set... - Microsoft Fabric Community
Of course, if you have any new ideas, you are welcome to contact us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Fanco
Regarding the issue you raised, my solution is as follows:
1.Firstly, for the JSON part, you can refer to my code below. This code was obtained through third-party software, and I hope it will be helpful to you:
"objects": {
"values": [
{
"properties": {
"backColor": {
"solid": {
"color": {
"expr": {
"FillRule": {
"Input": {
"SelectRef": {
"ExpressionName": "Sum(Table.Column2)"
}
},
"FillRule": {
"linearGradient2": {
"min": {
"color": {
"Literal": {
"Value": "'minColor'"
}
}
},
"max": {
"color": {
"Literal": {
"Value": "'maxColor'"
}
}
},
"nullColoringStrategy": {
"strategy": {
"Literal": {
"Value": "'asZero'"
}
}
}
}
}
}
}
}
}
}
}
For detailed information, please refer to the following blog and official documentation:
Power BI Reporting Best Practices Analyzer - Microsoft Fabric Community
2.Secondly, for the settings part, you can refer to forum questions similar to yours. Below are screenshots of the relevant content:
For detailed information, please refer to the following links:
Solved: Re: Custom Visual - TextInput in Visual Format Set... - Microsoft Fabric Community
Of course, if you have any new ideas, you are welcome to contact us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
8 | |
7 | |
2 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |