Sample Vega-Lite Wrapper as a PowerBi Custom Visual
Перейти к файлу
Dominik Moritz 7953f5f52f
Add introduction to projects and instructions to readme
2017-11-09 20:53:37 -08:00
.api/v1.7.0 initial commit 2017-11-07 12:53:17 -08:00
assets initial commit 2017-11-07 12:53:17 -08:00
libs initial commit 2017-11-07 12:53:17 -08:00
src initial commit 2017-11-07 12:53:17 -08:00
style initial commit 2017-11-07 12:53:17 -08:00
.gitignore initial commit 2017-11-07 12:53:17 -08:00
.npmignore initial commit 2017-11-07 12:53:17 -08:00
LICENSE Initial commit 2017-11-07 12:46:43 -08:00
README.md Add introduction to projects and instructions to readme 2017-11-09 20:53:37 -08:00
capabilities.json initial commit 2017-11-07 12:53:17 -08:00
package-lock.json initial commit 2017-11-07 12:53:17 -08:00
package.json initial commit 2017-11-07 12:53:17 -08:00
pbiviz.json initial commit 2017-11-07 12:53:17 -08:00
tsconfig.json initial commit 2017-11-07 12:53:17 -08:00
tslint.json initial commit 2017-11-07 12:53:17 -08:00

README.md

PowerBi Custom Visual in Vega-Lite

This projects demonstrates how Vega and Vega-Lite can be used in custom visuals in PowerBI. This custom visual is not intended for daily use. Think of it as a hello world for Vega and Vega-Lite in PowerBI custom visuals.

Install

npm install

Run

npm start

Update Vega

PowerBI uses a secure iframe that disallows access to certain variables on the window variable. Vega reads the device pixel ratio to render visualizations on a canvas with the correct resolution. Since the variable is not available, we currenlty have to patch Vega so that it does not access it.

To do so, run cp node_modules/vega/build/vega.js libs/vega.js then replace the access to window.devicePixelRatio with a constant (e.g. 2).

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.