Skip to content

Commit

Permalink
Update plottable.js and plottable.d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
teamdandelion committed Mar 18, 2014
1 parent 420e7c0 commit 23d0409
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 107 deletions.
42 changes: 0 additions & 42 deletions plottable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ declare module Plottable {
* @param {D3.Selection} element A D3 selection consisting of the element to anchor to.
* @returns {Component} The calling component.
*/
public _anchor(element: D3.Selection): Component;
/**
* Computes the size, position, and alignment from the specified values.
* If no parameters are supplied and the component is a root node,
Expand All @@ -103,13 +102,11 @@ declare module Plottable {
* @param {number} availableHeight
* @returns {Component} The calling Component.
*/
public _computeLayout(xOrigin?: number, yOrigin?: number, availableWidth?: number, availableHeight?: number): Component;
/**
* Renders the component.
*
* @returns {Component} The calling Component.
*/
public _render(): Component;
public renderTo(element: D3.Selection): Component;
/**
* Sets the x alignment of the Component.
Expand Down Expand Up @@ -341,7 +338,6 @@ declare module Plottable {
* @param {Component} componentToListenTo The component to listen for interactions on.
*/
constructor(componentToListenTo: Component);
public _anchor(hitBox: D3.Selection): void;
/**
* Registers the Interaction on the Component it's listening to.
* This needs to be called to activate the interaction.
Expand All @@ -364,7 +360,6 @@ declare module Plottable {
* @param {QuantitiveScale} yScale The Y scale to update on panning/zooming.
*/
constructor(componentToListenTo: Component, xScale: QuantitiveScale, yScale: QuantitiveScale);
public _anchor(hitBox: D3.Selection): void;
}
class AreaInteraction extends Interaction {
/**
Expand All @@ -386,7 +381,6 @@ declare module Plottable {
* @returns {AreaInteraction} The calling AreaInteraction.
*/
public clearBox(): AreaInteraction;
public _anchor(hitBox: D3.Selection): AreaInteraction;
}
class ZoomCallbackGenerator {
/**
Expand Down Expand Up @@ -416,12 +410,10 @@ declare module Plottable {
}
class MousemoveInteraction extends Interaction {
constructor(componentToListenTo: Component);
public _anchor(hitBox: D3.Selection): void;
public mousemove(x: number, y: number): void;
}
class CrosshairsInteraction extends MousemoveInteraction {
constructor(renderer: XYRenderer);
public _anchor(hitBox: D3.Selection): void;
public mousemove(x: number, y: number): void;
}
}
Expand All @@ -435,15 +427,13 @@ declare module Plottable {
* @param {string} [orientation] The orientation of the Label (horizontal/vertical-left/vertical-right).
*/
constructor(text?: string, orientation?: string);
public _anchor(element: D3.Selection): Label;
/**
* Sets the text on the Label.
*
* @param {string} text The new text for the Label.
* @returns {Label} The calling Label.
*/
public setText(text: string): Label;
public _computeLayout(xOffset?: number, yOffset?: number, availableWidth?: number, availableHeight?: number): Label;
}
class TitleLabel extends Label {
constructor(text?: string, orientation?: string);
Expand Down Expand Up @@ -473,9 +463,7 @@ declare module Plottable {
public dataset(dataset: IDataset): Renderer;
public metadata(metadata: IMetadata): Renderer;
public data(data: any[]): Renderer;
public _render(): Renderer;
public colorAccessor(a: IAccessor): Renderer;
public _anchor(element: D3.Selection): Renderer;
}
class XYRenderer extends Renderer {
public dataSelection: D3.UpdateSelection;
Expand All @@ -494,7 +482,6 @@ declare module Plottable {
* @param {IAccessor} [yAccessor] A function for extracting y values from the data.
*/
constructor(dataset: IDataset, xScale: QuantitiveScale, yScale: QuantitiveScale, xAccessor?: IAccessor, yAccessor?: IAccessor);
public _computeLayout(xOffset?: number, yOffset?: number, availableWidth?: number, availableHeight?: number): XYRenderer;
/**
* Converts a SelectionArea with pixel ranges to one with data ranges.
*
Expand Down Expand Up @@ -529,7 +516,6 @@ declare module Plottable {
* @param {IAccessor} [yAccessor] A function for extracting y values from the data.
*/
constructor(dataset: IDataset, xScale: QuantitiveScale, yScale: QuantitiveScale, xAccessor?: IAccessor, yAccessor?: IAccessor);
public _anchor(element: D3.Selection): LineRenderer;
}
class CircleRenderer extends XYRenderer {
public size: number;
Expand Down Expand Up @@ -581,9 +567,6 @@ declare module Plottable {
* @param {Component} component The Component to be added.
*/
public addComponent(row: number, col: number, component: Component): Table;
public _anchor(element: D3.Selection): Table;
public _computeLayout(xOffset?: number, yOffset?: number, availableWidth?: number, availableHeight?: number): Table;
public _render(): Table;
/**
* Sets the row and column padding on the Table.
*
Expand Down Expand Up @@ -648,7 +631,6 @@ declare module Plottable {
public scale(scale: ColorScale): Legend;
public rowMinimum(): number;
public rowMinimum(newVal: number): Legend;
public _render(): Legend;
}
}
declare module Plottable {
Expand All @@ -665,8 +647,6 @@ declare module Plottable {
* @param {any} [formatter] a D3 formatter
*/
constructor(axisScale: Scale, orientation: string, formatter?: any);
public _anchor(element: D3.Selection): Axis;
public _render(): Axis;
public scale(): Scale;
public scale(newScale: Scale): Axis;
/**
Expand Down Expand Up @@ -706,7 +686,6 @@ declare module Plottable {
* @param {any} [formatter] a D3 formatter
*/
constructor(scale: Scale, orientation: string, formatter?: any);
public _anchor(element: D3.Selection): XAxis;
/**
* Sets or gets the tick label position relative to the tick marks.
*
Expand All @@ -715,7 +694,6 @@ declare module Plottable {
*/
public tickLabelPosition(): string;
public tickLabelPosition(position: string): XAxis;
public _render(): XAxis;
}
class YAxis extends Axis {
/**
Expand All @@ -727,7 +705,6 @@ declare module Plottable {
* @param {any} [formatter] a D3 formatter
*/
constructor(scale: Scale, orientation: string, formatter?: any);
public _anchor(element: D3.Selection): YAxis;
/**
* Sets or gets the tick label position relative to the tick marks.
*
Expand All @@ -736,7 +713,6 @@ declare module Plottable {
*/
public tickLabelPosition(): string;
public tickLabelPosition(position: string): YAxis;
public _render(): YAxis;
}
}
declare module Plottable {
Expand All @@ -748,23 +724,7 @@ declare module Plottable {
* @param {Component[]} [components] The Components in the ComponentGroup.
*/
constructor(components?: Component[]);
<<<<<<< HEAD
/**
* Adds a Component to the ComponentGroup.
*
* @param {Component} c The Component to add.
* @returns {ComponentGroup} The calling ComponentGroup.
*/
public addComponent(c: Component): ComponentGroup;
public _anchor(element: D3.Selection): ComponentGroup;
public _computeLayout(xOrigin?: number, yOrigin?: number, availableWidth?: number, availableHeight?: number): ComponentGroup;
public _render(): ComponentGroup;
=======
public merge(c: Component): ComponentGroup;
public anchor(element: D3.Selection): ComponentGroup;
public computeLayout(xOrigin?: number, yOrigin?: number, availableWidth?: number, availableHeight?: number): ComponentGroup;
public render(): ComponentGroup;
>>>>>>> master
public isFixedWidth(): boolean;
public isFixedHeight(): boolean;
}
Expand All @@ -779,8 +739,6 @@ declare module Plottable {
* @param {QuantitiveScale} yScale The scale to base the y gridlines on. Pass null if no gridlines are desired.
*/
constructor(xScale: QuantitiveScale, yScale: QuantitiveScale);
public anchor(element: D3.Selection): Gridlines;
public render(): Gridlines;
}
}
declare module Plottable {
Expand Down
Loading

0 comments on commit 23d0409

Please sign in to comment.