The Power BI team just released v1.2 of the Custom Visuals SDK. With this version you now need to reference d3 v3.5.5 yourself. d3 v4 does not work yet. I’m working with the team to get a v4 compat and sample together, but for now you can only use v3.5.5.
You can follow along with the steps below or follow along on this video:
1. Setup your Custom Viz dev env: http://blog.jongallant.com/2016/09/powerbi-custom-visual-dev.html
2. Create a new visual
3. Install typings https://github.com/typings/typings
4. Add d3 v3.5.5
5. Add d3 typing
6. Add files to tsconfig.json
7. Copy this code to src/visual.ts
8. Start pbiviz dev server
9. Go to http://app.powerbi.com and add development visual to a report. You should see a green circle.