cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
veroreinah
Regular Visitor

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:

veroreinah_0-1653318598516.png

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

veroreinah_1-1653318627846.png

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 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @veroreinah - as per the documentation, the analytics pane currently doesn't support multiple instances or selectors for custom visuals, so you can currently only have one instance per object. I'm not aware of this being on the teams roadmap currently - these is an issue for some enhancements here though that you might be able to add your requirements on.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

1 REPLY 1
dm-p
Super User
Super User

Hi @veroreinah - as per the documentation, the analytics pane currently doesn't support multiple instances or selectors for custom visuals, so you can currently only have one instance per object. I'm not aware of this being on the teams roadmap currently - these is an issue for some enhancements here though that you might be able to add your requirements on.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
August 2022 update 768x460.jpg

Check it Out!

Click here to learn more about the August 2022 updates!

August 1 episode 9_no_dates 768x460.jpg

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors