Forum Discussion

TonyGaul's avatar
TonyGaul
Advocate I
10 years ago

Problems with custom visual and URLs

Hi,

I'm working on a custom visual and have a few problems.  Just to be upfront I have limited JS skills, but am experienced with MSFT BI / SQL etc.  I've been spending some time trying to get things to work, but am struggling!

 

My visual is based on an existing custom visual and it works perfectly when using the web devTools..  The format panel of the visual is working / displaying correctly, and a key feature of opening external URL's in either the same tab or a new tab works perfectly.

 

However my problems are:

1. When I export the visual from the web tools to a .pbiviz and then import it into PowerBI.com report, the thumbnail image doesn't load, the format panel shows the field id's not the display names, some field names are blank where I use the createDisplayNameGetter and I can't navigate to the URL when the visual is clicked.

2. Wen I set the URL to open in a new window, it only happens when I right click the visual and open in a new tab or press ctrl+ click.  When I set it to open in the same tab, the visual goes blank (in Chrome).  I get varying results using different browsers. 

3. The rest of the visual works fine.

 

My pbiviz & sample data is located here:

CustomVisualAndData

 

Why is this not working properly in the Power BI service when importing as a pbiviz?  Any help is appreciated.

 

Thanks,

Tony

 

4 Replies

  • Hey Tony,

     

    Maybe this post is outdatet.

    But do you use the new pbiviz tool for developing?

     

    The Custom Visual works in a IFrame and blocking all URL´s.

    But do you found a alternative Solution for the URL´s?

     

    Best Regards

     

    Mcburn

    • TonyGaul's avatar
      TonyGaul
      Advocate I

      Hey Mcburn,

       

      I have moved to the new dev tools, but have not got URL's working properly in either the old or new tools. Not sure if you are aware, but URL navigation should be supported in the near future: https://github.com/Microsoft/PowerBI-visuals/blob/master/Roadmap/README.md

       

      The only way I could get the URL navigation to work was via right click -> open in new window... but this only worked in Chrome, not Edge. Also I couldn't get the URL to open in the same window.

       

      Cheers,

      Tony

      • Mcburn's avatar
        Mcburn
        Helper II

        Hey TonyGaul,

         

        i found a parameter to enable Links for the moment: ?sandboxVisualsEnabled=false.

        That isn´t a fine way to enable the links.

        But i hope we get this URL Navigation in the near future.

         

        And i hope this is what i imagine.

         

        Nice Regards

         

        Mcburn