Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hello everyone,
I'm building a custom visuals sample bar chart like this MS git link : https://github.com/microsoft/PowerBI-visuals-sampleBarChart/tree/barChartTutorial-FormattingModelUti...
And this is my chart:
Everything seems fine, but when I switch page 1 to page 2, then from page 2 to page 1, my visuals are blank, I don't know what happens to it. Can anyone explain why and guide me to fix it? @dm-p hope you help me
Solved! Go to Solution.
Ah, thanks for confirming more details. Yes, this seems to be an issue with the developer visual, where it sometimes doesn't seem to initialise correctly. You can do something like resize the visual or change a property on the container to force it to initialise correctly on that occasion. When your visual is packaged, this doesn't happen and it works as expected.
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Ah, thanks for confirming more details. Yes, this seems to be an issue with the developer visual, where it sometimes doesn't seem to initialise correctly. You can do something like resize the visual or change a property on the container to force it to initialise correctly on that occasion. When your visual is packaged, this doesn't happen and it works as expected.
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
It work in powerbi app when I package my viusals. but I have some problem with setting when change page. I will create a new discuss. Thank you
Hi @Anonymous,
Without any code, capabilities or dataset details it will not be possible to say what is wrong from the supplied screenshots. The only thing I can say for sure is that some portion of the code is causing an error and your visual is crashing.
Have you attempted any debugging so far? What errors does the JavaScript console report? This will help you to start finding the root cause, as the error will likely point to the line causing the error. You can also try using a debugger statement in your code to step through and find where errors may occur.
If you have followed these steps and nothing obvious is sticking out, then we can try to dig a bit deeper. Please note that these kinds of problems can take many hours for another developer to review, which can be a large undertaking for a forum member providing free support. To get this answered more quickly, please supply as much contextual information as possible, ideally:
Regards,
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
hello, sorry for my delay, I thinks it not a bugs, because this code I copy in Microsoft template chart visuals, and this is my link code : https://github.com/ThuThuy103/powerbi-chart
In my code, I console "constructor" and "update" in func constructor and update. This is my video what I do in my custom visual : https://vimeo.com/907392033?share=copy
When I change page 1 to page 2 and back to page 1. My update func is not called and it show white background. I dont khow why.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |