Merge pull request #1 from domoritz/patch-1

Add introduction to projects and instructions to readme
This commit is contained in:
danyelf 2017-11-14 08:50:20 -08:00 коммит произвёл GitHub
Родитель e806fe1f57 b5dd7ba0b8
Коммит d85ef1e121
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -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