diff --git a/dcjs/dc.d.ts b/dcjs/dc.d.ts index 62739e16a6..9a7cda23a3 100644 --- a/dcjs/dc.d.ts +++ b/dcjs/dc.d.ts @@ -20,6 +20,11 @@ declare module DC { (t: T, r?: R): V; } + export interface IGetSetComputed { + (): R; + (t: T): V; + } + export interface Scale { (x: any): T; @@ -118,7 +123,7 @@ declare module DC { minWidth: IGetSet; minHeight: IGetSet; dimension: IGetSet; - data: IGetSet<(group: any) => Array, T>; + data: IGetSetComputed<(group: any) => Array, Array, T>; group: IGetSet; ordering: IGetSet, T>; filterAll(): void; @@ -180,7 +185,7 @@ declare module DC { colorCalculator: IGetSet, T>; } - export interface CoordinateGridMixin extends BaseMixin, MarginMixin, BaseMixin { + export interface CoordinateGridMixin extends BaseMixin, MarginMixin, ColorMixin { rangeChart: IGetSet, T>; zoomScale: IGetSet, T>; zoomOutRestrict: IGetSet; @@ -297,19 +302,21 @@ declare module DC { elasticRadius: IGetSet; } - export interface CompositeChart extends CoordinateGridMixin { - useRightAxisGridLines: IGetSet; - childOptions: IGetSet; - rightYAxisLabel: IGetSet; - compose: IGetSet>, CompositeChart>; + export interface ICompositeChart extends CoordinateGridMixin { + useRightAxisGridLines: IGetSet>; + childOptions: IGetSet>; + rightYAxisLabel: IGetSet>; + compose: IGetSet>, ICompositeChart>; children(): Array>; - shareColors: IGetSet; - shareTitle: IGetSet; - rightY: IGetSet<(n: any) => any, CompositeChart>; - rightYAxis: IGetSet; + shareColors: IGetSet>; + shareTitle: IGetSet>; + rightY: IGetSet<(n: any) => any, ICompositeChart>; + rightYAxis: IGetSet>; } - export interface SeriesChart extends CompositeChart { + export interface CompositeChart extends ICompositeChart {} + + export interface SeriesChart extends ICompositeChart { chart: IGetSet<(c: any) => BaseMixin, SeriesChart>; seriesAccessor: IGetSet, SeriesChart>; seriesSort: IGetSet<(a: any, b: any) => number, SeriesChart>;