Merge pull request #1 from domoritz/patch-1
Add introduction to projects and instructions to readme
This commit is contained in:
Коммит
d85ef1e121
|
@ -1,5 +1,9 @@
|
|||
# PowerBi Custom Visual in Vega-Lite
|
||||
|
||||
This projects demonstrates how [Vega](vega.github.io/vega) and [Vega-Lite](vega.github.io/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.
|
||||
|
||||
=======
|
||||
|
||||
![Screenshot](screenshot.png)
|
||||
|
||||
## Install
|
||||
|
@ -15,7 +19,9 @@ The open PowerBI with developer mode enabled and create a developer visual.
|
|||
|
||||
## Update Vega
|
||||
|
||||
`cp node_modules/vega/build/vega.js libs/vega.js` then replace the access to `window.devicePixelRatio` with a constant.
|
||||
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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче