From d268fbc77a951ec4521b396ce491cf99816fb156 Mon Sep 17 00:00:00 2001 From: Zoe Tsai Date: Tue, 21 Jul 2015 15:16:13 -0700 Subject: [PATCH] update d3.d.ts --- d3/d3.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d3/d3.d.ts b/d3/d3.d.ts index b3fed8327..6e453084f 100644 --- a/d3/d3.d.ts +++ b/d3/d3.d.ts @@ -74,9 +74,9 @@ declare module d3 { * Derive an attribute value for each node in the selection based on bound data. * * @param name The attribute name, optionally prefixed. - * @param value The function of the datum (the bound data item) and index (the position in the subgrouping) which computes the attribute value. If the function returns null, the attribute is removed. + * @param value The function of the datum (the bound data item), and inner index (overall position in nested selections) which computes the attribute value. If the function returns null, the attribute is removed. */ - attr(name: string, value: (datum: Datum, index: number) => Primitive): Update; + attr(name: string, value: (datum: Datum, index: number, innerIndex?: number) => Primitive): Update; /** * Set multiple properties at once using an Object. D3 iterates over all enumerable properties and either sets or computes the attribute's value based on the corresponding entry in the Object.