Forum Discussion
Issues with Analytics Pane in Custom Visual
- 5 years ago
I've gone ahead and raised an issue on the github repo.
https://github.com/microsoft/PowerBI-visuals-tools/issues/351
Hi dm-p , Anonymous
Indeed I completely missed the limitation about multi-instance support also.
Then there is just one issue left...
As you can see in the initial post the analytics pane is rerendered every time something is changed. Can this be solved?
Regards
Paul
Hi paul-maessen,
It's a bit late in the evening for me to check out your code and reproduce locally, and I'm having a look at your repo on my phone but if I had to guess, it looks like you might be executing VisualSettings.enumerateObjectInstances three times in your Visual.enumerateObjectInstances method (here, here and also here in the console.log). Each time this is executed, even for logging, it's going to enumerate your objects and probably refresh the pane each time. I might try to use the const declared in the first occurrence in your log statement and your return statement so you don't re-exexute the method again and see if this mitigates things.
Regards,
Daniel
- WouterBo5 years agoHelper II
I have noticed the same re-rendering behaviour in the example bar chart code (https://github.com/microsoft/PowerBI-visuals-sampleBarChart). Having done a few checks I can see that the enumerateObjectInstances() function seems to be called only once.
- dm-p5 years agoSuper User
Agreed - I've just set up a bare-minimum example on a new visual and the re-rendering does appear to always happen, irrespective of any code to customise the object enumeration. I'd suggest raising an issue for this (if you haven't already) and see if the team can take a look.
Regards,
Daniel
- WouterBo5 years agoHelper II
I've gone ahead and raised an issue on the github repo.
https://github.com/microsoft/PowerBI-visuals-tools/issues/351
- paul-maessen5 years agoResolver I
Hi dm-p ,
Thanks! I will check and disable logging also to see if that removes the rerendering.
Regards
Paul
- paul-maessen5 years agoResolver I
Hi dm-p ,
I have removed all the console.logs and it still happens.
If you can see in the attached gif it looks like it is "removing" the added constant-line and then adding it again after each change.
When I just look at the individual frames in the attached gif I see that the following screen is showing up after making a change
As you can see here it is just saying there is no content for the Analytics Pane. So I am guessing that I am doing something wrong here 🙂
dm-p Don't stay up late to look at it, there will be another day 🙂
Thanks!
Regards,
Paul