Forum Discussion

Fanco's avatar
Fanco
New Member
1 year ago
Solved

Why conditional formatting UI is blank

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 forma...
  • Anonymous's avatar
    Anonymous
    1 year ago

    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

    https://learn.microsoft.com/en-us/power-bi/developer/visuals/objects-properties?tabs=getFormattingModel#gradient-property

     

    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.