Reputation: 187
I'm trying to create a bar chart visual for power BI based on the microsoft tutorial on github. I have followed their environment setup steps exactly and was trying to create the visual with static data which is the first step. But when I give the "pbiviz start" command,it results in an error : TYPESCRIPT/visualplugin.ts : (8,151) error Property visual does not exist on type 'typeof barchart'
I'm new to typescript and d3. Can someone Help?
Upvotes: 0
Views: 2014
Reputation: 710
Since you have changed the name of class Visual
to BarChart
You need to change the value of "visualClassName"
property to your class name which in your case is BarChart
in pbiviz.json
file.
See the link :
http://www.dutchdatadude.com/power-bi-custom-visual-development-tip-visualplugin-ts-property-visual-does-not-exist-error/
Also you will have to change the file name in "files"
property array in tsconfig.json
file.
Upvotes: 1
Reputation: 7151
It's most likely an API version conflict for pbiviz
.
Note that the Github repo you referred is using v1.5.0, you need to specify version number when running pbiviz update
:
#Update your version of pbiviz
npm install -g powerbi-visuals-tools
#Run update from the root of your visual project (where pbiviz.json is located)
pbiviz update 1.5.0
Read more at: Microsoft/PowerBI-visuals
UPDATE:
I think I've spotted the bug from the hint: typeof barchart
.
JavaScript identifiers are case-sensitive. So make sure you're following the cases used in the Github repo, e.g. BarChart
, not barchart
. (Or whatever it is)
Upvotes: 0