Hi there
I have made some changes to the great Power BI Aquarium visual:
https://community.powerbi.com/t5/Best-Visual-Contest/Power-BI-Aquarium/cns-p/7233
Now need to create the .pbiviz package.
The command:
gulp package
gives the error:
[16:33:20] Using gulpfile ~\Documents\Power BI\Dev Custom Visuals\PowerBI-visuals-master\gulpfile.js [16:33:21] Task 'package' is not in your gulpfile [16:33:21] Please check the documentation for proper gulpfile formatting
"gulp build" and "gulp run:playground" function correctly.
Have installed gulp@3.9.0, but no luck with "gulp package"
Any ideas? Do I need to create a new bundle.json file as described at: http://amolpandey.com/2016/08/02/powerbi-how-to-create-pbiviz-file-custom-visualization
Thanks!
Solved! Go to Solution.
The getColor method returns an instance of IColorInfo.
To fix the issue you should return an object like this:
{ value: "#ED1C24" }
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Gulpfile.js needs a line something like:
gulp.task('package', () => { // Zip to .pbiviz file gulp.src('dist/**') .pipe(zip('MyModule.pbiviz')) .pipe(gulp.dest('.')); });
to create the package.
@Anonymous We'd recommned not to use legacy API based visuals and tools as they're almost deprecated.
Please consider migration to PBIVIZ tools instead of gulp.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
This is the old way of building packages that no longer supported. Instead of gulp Custom Visuals use PBIVIZ nowadays.
We'd recommend to contact sales@enlighten.co.nz and verne.roberts@enlighten.co.nz who owns source code.
Probably he will share the updated code that uses PBIVIZ.
Otherwise, you would need to convert code to PBIVIZ format by yourself.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Hi @v-viig - thank you for the reply. I have reached out to Enlighten.
Will then either convert the visual from the legacy format to the new format, or edit the pbiviz.json file (its a minor color change).
Do you know what format the colour is returned in json:
var m = e.getColor(h.toString());
I want to replace with something like:
var m=\"#ED1C24\";
which does not work (visual is returned in black, irrespective of hex code).
The getColor method returns an instance of IColorInfo.
To fix the issue you should return an object like this:
{ value: "#ED1C24" }
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!