Adding external libraries
Including JavaScript files
- Install an external JavaScript library by using any package manager (npm, yarn, etc.)
- Include a path of the library to the
externalJS
property of thepbiviz.json
Please pay attention to @types/d3 package if you’d like to add typings for your JavaScript file to get intellisense and compile time safety on them.
Example
npm install d3@3.5 --save
npm install @types/d3@3.5 --save
- Including
d3
to thepbiviz.json
{
"visual": {...},
"apiVersion": ...,
"author": {...},
"assets": {...},
"externalJS": [
"node_modules/d3/d3.min.js"
],
"style": ...,
"capabilities": ...,
"dependencies": ...
}
Please visit this page to find the real example.
Including CSS files
- Install an external CSS framework by using any package manager (npm, yarn, etc.)
- Include the
import
statement to the.less
file of the visual
Example
npm install bootstrap --save
- Include the
import
statement to thevisual.less
@import (less) "node_modules/bootstrap/dist/css/bootstrap.css";
Please visit this page to find the real example.