Forum Discussion

cboneill0099's avatar
cboneill0099
Helper I
7 years ago
Solved

Custom Visual Selection

I have a custom visual where I'm trying to implement selection.  I've basically followed along with the sample bar chart tutorial here: https://github.com/microsoft/PowerBI-visuals-sampleBarChart   ...
  • dm-p's avatar
    dm-p
    7 years ago

    Yup - stumbling through is what we do! ;)

    Thanks for the code - today is the first bit of free time I've had to take a look, so apologies for the delay in coming back. I can see why you were letting the property now, so my previous assumption definitely isn't the problem in terms of executing the visual.

    I'd tried a few things but as a last ditch attempt, I noticed you were using version 2.1.0 of the SDK/API. I updated this to 2.5.0 locally and the visual worked as I believe it should:

    • Visual is refreshed/started for the first time
    • Clicking a table row will cross-filter an associated visuals, e.g. table
    • Prior to updating the SDK, this would only work if I cross-filter a related visual first, essentially replicating your original problem.

    This suggests a bug in that version of the SDK that has since been fixed. I made no further changes to your code, except for updating the SDK:

    Run the following from the console in your project root:

    npm i -g [email protected]

    You'll need to update your project to use this, so run:

    pbiviz update 2.5.0

    Then:

    pbiviz --install-cert

    To update your certificate.

    Then, run pbiviz start and re-test. Hopefully this should work right off the bat.

    I'm hoping that this is all you need. If so, you had already solved the coding problem yourself :) Nice work BTW!

    All the best,

    Daniel