Add introduction to projects and instructions to readme

This commit is contained in:
Dominik Moritz 2017-11-09 20:53:37 -08:00 коммит произвёл GitHub
Родитель dfae401aaf
Коммит 7953f5f52f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 5 добавлений и 1 удалений

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

@ -1,5 +1,7 @@
# 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.
## Install
`npm install`
@ -10,7 +12,9 @@
## 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