Skip to content

Commit

Permalink
Add no-arg overload of selection.data()
Browse files Browse the repository at this point in the history
There is a no-arg version of [the `data()` method on selections](https://github.com/mbostock/d3/wiki/Selections#wiki-data) which returns the previously-assigned data. From the docs:

> If values is not specified, then this method returns the array of data for the first group in the selection.
  • Loading branch information
pelotom committed Nov 16, 2013
1 parent 6ea77e9 commit bdd4777
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions d3/d3.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ declare module D3 {
data: {
(values: (data: any, index?: number) => any[], key?: (data: any, index?: number) => string): UpdateSelection;
(values: any[], key?: (data: any, index?: number) => string): UpdateSelection;
(): any[];
};

datum: {
Expand Down

0 comments on commit bdd4777

Please sign in to comment.