diff --git a/nvd3/nvd3.d.ts b/nvd3/nvd3.d.ts index ba70780c38..769d900399 100644 --- a/nvd3/nvd3.d.ts +++ b/nvd3/nvd3.d.ts @@ -126,6 +126,41 @@ declare namespace nv { width(value: number): this; } + interface Focus extends Nvd3Element { + color(value: string[]): this; + color(func: (d: any, i: number) => string): this; + width(): number; + width(value: number): this; + height(): number; + height(value: number): this; + margin(): Margin; + margin(value: Margin): this; + x(): (d: any) => any; + x(func: (d: any) => any): this; + y(): (d: any) => number; + y(func: (d: any) => number): this; + showXAxis(): boolean; + showXAxis(value: boolean): this; + showYAxis(): boolean; + showYAxis(value: boolean): this; + brushExtent(): [number, number] | [[number, number], [number, number]]; + brushExtent(value: [number, number] | [[number, number], [number, number]]) : this; + duration(): number; + duration(value: number): this; + xTickFormat(): (d: any) => string; + xTickFormat(format: (t: any) => string): this; + xTickFormat(format: string): this; + xTickFormat(format: (d: any, i: any) => string): this; + yTickFormat(): (d: any) => string; + yTickFormat(format: (t: any) => string): this; + yTickFormat(format: string): this; + yTickFormat(format: (d: any, i: any) => string): this; + interpolate(): string; + interpolate(value: string): this; + rightAlignYAxis(): boolean; + rightAlignYAxis(value: boolean): this; + } + interface Nvd3Axis extends d3.svg.Axis { axisLabel(): string; axisLabel(value: string): this; @@ -1805,6 +1840,7 @@ id(value: number|string): this; yAxis: Nvd3Axis; legend: Legend; tooltip: Tooltip; + focus: Focus; clearHighlights(): this; /*If true, masks lines within the X and Y scales using a clip-path*/ @@ -3238,6 +3274,7 @@ id(value: number|string): this; yAxis: Nvd3Axis; y2Axis: Nvd3Axis; tooltip: Tooltip; + focus: Focus; controlLabels(): any; /*Object that defines the labels for control items in the graph. For instance, in the stackedAreaChart, there are controls for making it stacked, expanded, or stream. For stacked bar charts, there is stacked and grouped.*/