npm install teachan --save
npm install d3 --save
and adding code in rendering.js:
import * as d3 from ‘d3’;
import techan from ‘./libs/techan’
but I got this…
D3 is already included in Grafana 4.x
To include lib just place it along side your code and import it using import statement or systemjs.
Just adding a note here. npm install installs the d3 code into the node_modules directory. That is not available to your plugin. It will only be available to the build tools (grunt or similar). You have to copy the js file from your node_modules into the src directory of your plugin.