From c3597f95f89a77fa238a39509d53ec05a4a2d9de Mon Sep 17 00:00:00 2001 From: Tom Wanzek Date: Fri, 2 Jun 2017 17:02:21 -0400 Subject: [PATCH] [d3-sankey] Update to Minor Version 0.6 (#16923) * [BREAKING] Changes to Sankey node and link related interfaces. Added attributes and re-defined attributes. --- types/d3-sankey/d3-sankey-tests.ts | 17 +++++++----- types/d3-sankey/index.d.ts | 44 +++++++++++++++++++----------- 2 files changed, 38 insertions(+), 23 deletions(-) diff --git a/types/d3-sankey/d3-sankey-tests.ts b/types/d3-sankey/d3-sankey-tests.ts index 5ed0c9eabd..c270011528 100644 --- a/types/d3-sankey/d3-sankey-tests.ts +++ b/types/d3-sankey/d3-sankey-tests.ts @@ -260,11 +260,13 @@ str = sNode.name; // Sankey Layout calculated (if layout has been run, otherwise undefined): -numMaybe = sNode.dx; -numMaybe = sNode.x; -numMaybe = sNode.dy; -numMaybe = sNode.y; +numMaybe = sNode.x0; +numMaybe = sNode.x1; +numMaybe = sNode.y0; +numMaybe = sNode.y1; numMaybe = sNode.value; +numMaybe = sNode.index; +numMaybe = sNode.depth; let linksArrMaybe: SLink[] | undefined; @@ -295,6 +297,7 @@ numOrSankeyNode = sLink.target; // Sankey Layout calculated (if layout has been run, otherwise undefined): -numMaybe = sLink.sy; -numMaybe = sLink.ty; -numMaybe = sLink.dy; +numMaybe = sLink.y0; +numMaybe = sLink.y1; +numMaybe = sLink.width; +numMaybe = sLink.index; diff --git a/types/d3-sankey/index.d.ts b/types/d3-sankey/index.d.ts index 57b1a3ccc9..55c2934c13 100644 --- a/types/d3-sankey/index.d.ts +++ b/types/d3-sankey/index.d.ts @@ -1,9 +1,9 @@ -// Type definitions for D3JS d3-sankey module 0.5 +// Type definitions for D3JS d3-sankey module 0.6 // Project: https://github.com/d3/d3-sankey/ // Definitions by: Tom Wanzek , Alex Ford // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// Last module patch version validated against: 0.5 +// Last module patch version validated against: 0.6 import { Link } from 'd3-shape'; @@ -43,21 +43,29 @@ export interface SankeyNodeMinimal