diff --git a/types/d3-shape/d3-shape-tests.ts b/types/d3-shape/d3-shape-tests.ts index fb79b15e4a..1ce464093f 100644 --- a/types/d3-shape/d3-shape-tests.ts +++ b/types/d3-shape/d3-shape-tests.ts @@ -1464,6 +1464,7 @@ seriesDatum = seriesPoint.data; let order: number[]; const seriesAnyAny: d3Shape.Series = seriesArray[0]; +order = d3Shape.stackOrderAppearance(seriesAnyAny); order = d3Shape.stackOrderAscending(seriesAnyAny); order = d3Shape.stackOrderDescending(seriesAnyAny); order = d3Shape.stackOrderInsideOut(seriesAnyAny); diff --git a/types/d3-shape/index.d.ts b/types/d3-shape/index.d.ts index ed64d6f827..e4f1fba6b3 100644 --- a/types/d3-shape/index.d.ts +++ b/types/d3-shape/index.d.ts @@ -7,7 +7,7 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 -// Last module patch version validated against: 1.2.0 +// Last module patch version validated against: 1.3.3 import { Path } from 'd3-path'; @@ -2670,6 +2670,13 @@ export function stack(): Stack; */ export function stack(): Stack; +/** + * Returns a series order such that the earliest series (according to the maximum value) is at the bottom. + * + * @param series A series generated by a stack generator. + */ +export function stackOrderAppearance(series: Series): number[]; + /** * Returns a series order such that the smallest series (according to the sum of values) is at the bottom. *