Forum Discussion
How to customize and package existing power bi visual
Hi MawashiKid
Can you provide details on how you managed to create the .pbiviz with reference to: http://amolpandey.com/2016/08/02/powerbi-how-to-create-pbiviz-file-custom-visualization/
I am trying to create a .pbiviz file from: https://community.powerbi.com/t5/Best-Visual-Contest/Power-BI-Aquarium/cns-p/7233
Error:
gulp package:
[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
Thank you
I’ve dived in a bit into PBI internals since this question was first posted and it illuminated a few points. It’s not a direct solution for you, but maybe it can help by shedding more light on the situation.
One thing I found interesting is that there’s no fundamental technical limitation preventing the core controls from being modified, repackaged, and reused as new custom visuals. It can be done. I’ve done it. It’s not trivial to get things going, but once a visual is updated in the right ways and setup as it’s own project, it’s as easy to modify and maintain as any other.
As far as the reason for the original deprecation, the evidence seems to point to the reason being that the plugin architecture has evolved significantly. Therefore certain techniques, classes, and sandbox incompatible approaches that were used are simply no longer compatible with the PBI architecture.
If you look at the internal Power BI engine code, especially how it’s changed over time, you can see that the dev team has been incrementally evolving the core visuals to be more and more compatible with publicly recommended APIs and techniques.
What does this mean? Maybe they are just improving their code, cleaning up technical debt, and maintaining the most consistent and cleanest code base possible. It could also mean they’ll eventually release more updated core visuals for people to modify and reuse, or maybe they are playing it by ear, based on the support efforts it would take to do so vs. the demand from customers.
Getting back to the problem
What’s the best approach if you need modifications to a visual that’s not published or has outdated code? There are a handful of options:
1. Fake It. Depending on your requirements, sometimes you can use alternate controls. For example, if you need a static text label in a special font, you might get away with making a .jpg in Photoshop and using the image visual to display your text. Or you might find you can combine or overlap visuals to get a certain type of functionality. This isn’t always feasible, but when it is, it requires no code to be written and is by far the fastest way to a result.
2. Find a Similar Visual. Lots of people have implemented visuals from scratch that have the same, overlapping, or even a superset of core visual functionality. Some are free and some cost money, but it can be worth paying. If you find one that works for you, this is also much faster than writing or modifying code.
3. Go Hard Core. If you’re a pretty technical developer you can go through the process of building the visual yourself through a combination of modernizing code, modifying functionality, setting up a build configuration and maintaining it. Keep in mind the skill sets needed - you could be the best DAX developer in the world, but that’s not enough. You need to be highly proficient in Javascript, APIs, and other full stack web technologies.
4. Just ask me to do it. Or if not my company, hire another one that you already work well with and trust. The big benefits here are it will be done faster, allow you to work on things in parallel, and you get exactly the functionality you need. If you go this route I would encourage you to confirm the specific developer the company will assign, and to ask to speak with that developer so they may briefly walk you through an example visual they’ve personally developed. You don’t want to get someone assigned who’s figuring it out as they go along, because that will take longer and cost more.
Regards,
Lee
- Anonymous8 years agoNot applicable
Hi Cubist - thank you for your reply and description of options.
Its a very minor change to the visual (colour), so attempting to edit the .pbiviz.json file.
If that fails then will go for option 3, migrating the visual from legacy to new format.
- Cubist8 years ago
Advocate II
I see. I’m not sure changing pbviz.json willl do the trick because of its limitations, and if you are able to “migrate” the visual please let us know that willl be a challenging accomplishment.
My best hope is that you’ll be able to find an equivalent visual out there that could be viable somehow