I am trying to get D3 to work in powerBI so that I can create my own visual effects. I came to it from the end of D3 and am not familiar with typescript, powerBI or even with a terminal application (am on a poppy).
I have a D3 V3 using this: https://github.com/Svjard/d3-typescript . I placed the d3.d.ts file in the .tmp / precompile / src folder and referenced the file from visual.ts. I initially included data.ts and tsconfig.json, but I found that they were not needed.
But I would like to use D3 V4. There is a handler for D3 V4 thanks to a certain type: https://github.com/tomwanzek/d3-v4-definitelytyped . I ran npm install @types/d3-selection --saveand took the index.d.ts file, placed it in the .tmp / precompile / src folder, and re-referenced visual.js, but without joy. I renamed it d3.d.ts in case this helped: no. I used definitTyped package.json instead of the generated powerBI, but that didn't help either (and I suspect I misunderstood what this file is for!).
I get an error from a terminal application:

The code looks very different. This is the piece of file (v3) that works:
interface ID3Selectors {
select: (selector: string) => ID3Selection;
selectAll: (selector: string) => ID3Selection;
}
interface ID3Base extends ID3Selectors {
And here is the cropping of another file that does not work:
export type BaseType = Element | EnterElement | Window;
export interface ArrayLike<T> {
length: number;
item(index: number): T;
[index: number]: T;
}
Does anyone know how I can typescript talk with D3 V4?
thank...
Emma
31 2016
. tsc -v CLI, 2.0.6.
, V4. , . -, :
(1) : https://github.com/Microsoft/PowerBI-visuals/blob/master/Tutorial/ExternalLibraries.md
(2) : https://github.com/Microsoft/PowerBI-visuals/blob/master/Tutorial/Typings.md
CLI npm . , Typings.md. "typings". tsconfig index.d.ts. d3.d.ts visuals.js.
. index.d.ts 3, , , d3.d.ts. , , , , , , , .
(3) Tom W ( ), d3, @types d3. import visuals.ts. , . d3 node_modules ( , !).

1 2016 . . . , /d 3.v4.js, npm. ?
(1) external/d3.v4.js
@Jan - D3 v4, BI? , npm ? (var x = d3.scaleLinear();) - , , !

d3.v4.js external tsconfig.json. . Power BI , : "d3". ?
(2) npm
@Tom, , . node_modules:

, npm install @types/d3 --save-dev node_modules . npm, (, power bi)? , Power BI .

d3.v4.js / d3. : " ". external/d3.v4.js, powerBI .tmp/precompile.
d3, powerbI tsconfig.json. , . , d3 .
, , Microsoft , , V4. . Microsoft , d3 d3 - npm. , d3!