Forum Discussion
Change view of visual when a selection has been made.
I would like to create a basic custom visual for a very specific report.
The basic visual should be the box on the left showing numbers 1 through 9 in a matrix format. These numbers will be connected to an underlying physical datatable that only has 1 column and has 9 rows with values 1 through 9.
What I would like to understand is if it is possible to easily change the visual to look like the box on the right, when the user makes a selection. eg. if the user clicks the number 7 in the bottom right of the left-hand box to select it, I would like the visual to appear like the box on the right. Then if the user clicks on the large 7, it unselects the object and the visual returns to it's original state.
13 Replies
- v-viig
Community Champion
It looks like a pretty easy feature. Everything you need to do is to keep current selection state and remove/hide other numbers.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- Phil_Seamark
Microsoft Employee
Hi v-viig
I'm actually putting this together for a blog I am writing. The primary focus of the blog will be about DAX, but because I will be creating a custom visual, I will be sharing the code for it. Any chance you might be keen to cast your eye over the code once I've written it so that anyone who uses the custom visual code is getting something that is helpful?
Cheers,
Phil
- Phil_Seamark
Microsoft Employee
Further to this, I'm having trouble getting the svg elements to render using the debug custom visual.
I can see the elements in the DOM when I browse using F12 (in Edge & Chrome), but just get a blank screen.