Forum Discussion
Does anybody know how to translate Javascript to Typescript?
How do I do that? When I clone the repository it comes with V1.5.0 right of way. How do I update the API?
When I create a new project it's automatically created with version V1.7.0.
RE: How do I do that? When I clone the repository it comes with V1.5.0 right of way. How do I update the API?
When I create a new project it's automatically created with version V1.7.0.
Hi surfersamu,
This a question I've been asked a few times and hopefully the folllowing instructions will help you unscramble a few things.
By default, if you run a similar
pbiviz new <pbivisualname>
command - [I use Visual Studio Code - Integrated Terminal for conviniency]-
this action will generate a pbiviz component template in the latest Power BI Visauls CLI tool
version you installed locally on your machine. One quick way to find out the version installed
is simply by typing
pbiviz -V
and this should display your current version. So if the latest version shows v1.7.0 then logically the command process should generate a v1.7.0 template.
Still as you mentioned in your sample case, there maybe occasions where tutorials or Github content may NOT have been ported to the latest version, but don't panic you can still easily manage to cope with that. So basically you have two choices here.
1- option would be trying to port the earlier v.1.5.0 code sample content to the latest v.1.7.0 version. Now I don't believe there are big changes compared to let's say previous CORE deprecated version or even early v1.1.0 CLI version which used number [1,2] format as kind parameters instead of string ["Grouping", "Measure"] in dataRoles. So depending on the amount of changes and subtilities..., it's up to you to decide if you feel confortable enough to go forward.
2- option would of course be cloning the exisitng application sample. In your case, if you want to start all from scratch and replicate the same thing, dealing with previous v.1.5.0 code sample content "as-it-is"... then that can also be done in a few minor steps.
1 - simply copy the previous .api/v1.5.0 folder sample content in your project.
2- make sure to modify the following parameters in .vscode/setting.json file as followed
3- modify the apiVersion parameter as followed in pbiviz.json project file as followed.
4- finally make sure to replace existing v1.7.0 version parameter with v1.5.0 version in tsconfig.json file as followed
So from there, any time you'll run a pbiviz package command in your project, this will generate a v1.5.0 version instead of v1.7.0. This may allow you to avoid any versions "subtilities" conflict in your case and be a good starting point for testing and getting a hand on the existing code sample, till you feel confortable enough to move ahead.
Hope this helps.
- surfersamu8 years ago
Helper II
Thank you for the detailed explanation. I went with option 2 and still got the same error. I will try to do it again maybe I did something wrong. I have to mess with this a little more.
In the meantime, I have created a github repo if anyone wants to help:
https://github.com/fsrodriguezm/liquidFillGauge
I followed the tutorial you sent me and I was able to get that liquidFillGauge to work on Microsoft Power BI. I will now try to play around with the code and at least try to have a simple tree diagram appear on Power BI. If I'm succesfully with that then I will try to mess with the capabilities file and try to make it work with data comming in from tables.