One of the most prominent Power BI benefits is its extensible architecture that allows developers to integrate Power BI with custom apps and extend its capabilities, such by creating custom visuals. Having contributed one of the first custom visuals, the Sparkline custom visual, I can tell from experience that Microsoft does its part to ensure that the submitted visuals meets quality, security, and functionality best practices.
As custom visual developers have probably noticed, the Power BI Dev Tools is deprecated in favor of the new Custom Visual CLI Developer Toolset. The announcement page enumerates the main benefits of the new toolset. Personally, I like that Microsoft has decoupled the tool from dependencies to the “visual framework” that the original Power BI visuals use. This allows developers to use whatever dev tool they like, such as Visual Studio Code or Visual Studio, to code custom visuals. I also like the better integration with Power BI Service for auto-detecting code changes and showing what data has been passed to the visual.
There will be some pains when migrating existing visuals to the new tool. As of this time, there are also missing features so don’t rush yet to the new tool:
- Tooltips are not yet supported.
- Value formatters, such as to format values shown in tooltips, are not supported so you have to create your own, use third-party libraries, or copy code from this project.
- The D3 definitions that the tool installs are different from the ones old tool and the Visual Studio framework used. Moreover, Microsoft indicates that they will stop providing the D3 definitions. Consequently, some D3 features I used resulted in compiled errors so I had to use the old types.
- For some reason, checking the “Enable developer visual for testing” checkbox in Power BI Settings didn’t “stick” for me in Chrome so I had to use Edge.
The new Custom Visual CLI Developer Toolset will improve the developer experience for coding custom visuals. Download the migrated Sparkline code that works with the new toolset to understand the changes.