Forum Discussion

JohnTheDoe's avatar
JohnTheDoe
Frequent Visitor
8 years ago
Solved

Check if a datapoint is already selected inside Custom Visual

Within update() function of IVisual, is there a way to check if a datapoint(and its corresponding SelectionID) is already selected? 

 

I could use getSelectionIds() and then brute force search the entire array one by one to find a match, but I feel that it would be very slow, expecially with large amounts of data.

  • To check if a data point is selected you should use getSelectionIds and compare SelectionIds by using equals or includes methods.

     

    Ignat Vilesov,

    Software Engineer

     

    Microsoft Power BI Custom Visuals

    [email protected]

1 Reply

  • v-viig's avatar
    v-viig
    Community Champion

    To check if a data point is selected you should use getSelectionIds and compare SelectionIds by using equals or includes methods.

     

    Ignat Vilesov,

    Software Engineer

     

    Microsoft Power BI Custom Visuals

    [email protected]