This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. 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.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |