Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

White screen when turning pages

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-FormattingModelUtils
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

 

 

  • 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.

4 Replies

  • dm-p's avatar
    dm-p
    Super User

    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:

     

    • Details or screenshots of console errors.
    • Specific location in your code you believe the error might be localized to (if you know).
    • A copy of your project's files (ideally a repo that can be cloned with minimal setup).

    Regards,

     

    Daniel

  • dm-p's avatar
    dm-p
    Super User

    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.

    • Anonymous's avatar
      Anonymous
      Not applicable

      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