Forum Discussion

bfialkoff's avatar
bfialkoff
Frequent Visitor
7 years ago
Solved

Inherit from other visuals?

I want to make a small change to an existing visual but I dont want to have to worry about maintainence. I know that I can place the link to the git repo in my package.json. Is it then possible to inherit from the visual and simply override a function? I would like it to look something like this 

class MyVisual extends OtherVisual {

   constructor(options: VisualConstructorOptions){
        super(options: VisualConstructorOptions);
    }

    public update(options){
        //my new code here
        super.update(options);
    }
}

Is it possible to do something like this? Any answer would be helpful!

  • v-viig's avatar
    v-viig
    7 years ago
    import ChicletSlicer  = powerbi.extensibility.visual.ChicletSlicer;

    Have you tried such an import?

     

    Ignat Vilesov,

    Software Engineer

     

    Microsoft Power BI Custom Visuals

    [email protected]

13 Replies

  • v-viig's avatar
    v-viig
    Community Champion

    Yes, it's possible. You just need to add another visual into compilition pipeline and import required dependencies.

     

    Ignat Vilesov,

    Software Engineer

     

    Microsoft Power BI Custom Visuals

    [email protected]

    • bfialkoff's avatar
      bfialkoff
      Frequent Visitor

      That doesn't sound like its terribly complicated but I'm afraid I don't understand. Could you give a more detailed answer?

      • v-viig's avatar
        v-viig
        Community Champion

        What custom visual do you want to inherit?

         

        Ignat Vilesov,

        Software Engineer

         

        Microsoft Power BI Custom Visuals

        [email protected]