Forum Discussion
Does anybody know how to translate Javascript to Typescript?
Yea I'm tyring to find tutorials on how to do graphics on Power BI but I've only found one on youtube with limited information :(
Please take a look at this documentation that covers creating custom visuals for Power BI.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- surfersamu8 years ago
Helper II
I tried it but when I paste the code I get this error:
TYPESCRIPT /visualPlugin.ts : (8,147) Property 'Visual' does not exist on type 'typeof demo49B92E39CFB047F59CF0F0DEF084AE31'.
When I clone the github repo for the SampleBarChart I get this error:
error UNKNOWN { Error: ENOENT: no such file or directory, open 'C:\Users\frodriguez\Power Bi\PowerBI-visuals-sampleBarChart\.api\v1.5.0\schema.stringResources.json' at Error (native) errno: -4058, code: 'ENOENT', syscall: 'open', path: 'C:\\Users\\user1\\Power Bi\\PowerBI-visuals-sampleBarChart\\.api\\v1.5.0\\schema.stringResources.json' }I can download other graphics and run them but they are way too complex for me to mess with them and try to understand the code.
I keep getting that error on other graphics as well.
- v-viig8 years ago
Community Champion
surfersamu What is name of class that implements IVisual interface?
The same class name should be specified in visualClassName property of pbiviz.json.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
- surfersamu8 years ago
Helper II
This is from the pvibiz.json file:
"visualClassName": "BarChart"
This is from the BarChart.ts file:
export class BarChart implements IVisual
Looks like everything is correct. Not sure why I keep getting that error.