Skip to content

Condition formatting UI is blank #92

@fancofang

Description

@fancofang

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 by ColorPicker formatting property with Fill capabilities value and it works fine.

Don't know what 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];
}
···

Snipaste_2024-09-17_18-40-54

Could anyone have a look? Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions