Forum Discussion

veroreinah's avatar
veroreinah
Regular Visitor
4 years ago
Solved

Adding multiple percentile lines to custom visual

Hi everybody,

I'm developing a custom visual and need to replicate part of the behavior of the Percentile line field you can find in the Analytics pane in the Clustered bar chart, for example.

So far, I've updated my capabilities.json file, so the percentile line can be customized in the Analytics Pane, but it only allows me to create one single line, instead of multiple. Does anyone have any idea how to do it?


My percentile line. Once I've added one line, I cannot add more, the "+ Add" button disappears:

Clustered bar chart Percentile line. I've already added 2 lines, but can add more (the button "+ Add" is visible):

This is the field definition in capabilities.json:

 

{
    ...
    "objects": {
        ...
        "percentileLine": {
            "displayName": "Percentile line",
            "displayNameKey": "Visual_PercentileLine",
            "objectCategory": 2,
            "properties": {
                "show": {
                    "type": {
                        "bool": true
                    }
                },
                "displayName": {
                    "type": {
                        "text": true
                    }
                },
                "percentile": {
                    "displayName": "Percentile",
                    "displayNameKey": "Visual_Percentile",
                    "type": {
                        "integer": true
                    }
                },
                "color": {
                    "displayName": "Color",
                    "displayNameKey": "Visual_Color",
                    "type": {
                        "fill": {
                            "solid": {
                                "color": true
                            }
                        }
                    }
                }
            }
        }
    }
}

 

1 Reply