Forum Discussion
bfialkoff
7 years agoFrequent Visitor
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 in...
- 7 years ago
import ChicletSlicer = powerbi.extensibility.visual.ChicletSlicer;
Have you tried such an import?
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
bfialkoff
7 years agoFrequent Visitor
Accepted too soon. The import worked but the viusal doesn't:
import ChicletSlicer = powerbi.extensibility.visual.ChicletSlicer;
export class myVisual extends ChicletSlicer {
constructor(options){
super(options)
}
public update(options) {
super.update(options)
}
}for a moment it compiled but it showed me the the developer visual in its default state, the one with the update counter. Now it doesn't even do that. I get the following error printout:
(in case the image is too small)
error TYPESCRIPT /src/visual.ts : (1,54) Property 'ChicletSlicer' does not exist on type 'typeof visual'. error TYPESCRIPT /src/visual.ts : (1,54) Namespace 'powerbi.extensibility.visual' has no exported member 'ChicletSlicer'. error TYPESCRIPT /visualPlugin.ts : (8,158) Property 'Visual' does not exist on type 'typeof testInherticane714AE1C1ED164D2482B6C0D7F435F057'.
v-viig
7 years agoCommunity Champion
Did you put a proper class name into visualClassName?
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals