Skip to content

Commit

Permalink
options
Browse files Browse the repository at this point in the history
  • Loading branch information
camargo committed Mar 7, 2017
1 parent d3d145a commit e211bdb
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 171 deletions.
24 changes: 12 additions & 12 deletions src/GlPlot2dComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import { debounce } from 'lodash';
import {
GlPlot2dComponentProps,
GlPlot2dOptions,
Line,
Scatter,
ScatterFancy
LineOptions,
ScatterOptions,
ScatterFancyOptions
} from './';

/**
Expand Down Expand Up @@ -321,37 +321,37 @@ export class GlPlot2dComponent extends skate.Component<GlPlot2dComponentProps> {
/**
* Helper that adds a line plot to the current plot.
*
* @param {Line} line
* @param {LineOptions} lineOptions
* @returns {GLLine2D}
*
* @memberOf GlPlot2dComponent
*/
public addLinePlot(line: Line): GLLine2D {
return createLine(this.plot, line);
public addLinePlot(lineOptions: LineOptions): GLLine2D {
return createLine(this.plot, lineOptions);
}

/**
* Helper that adds a scatter plot to the current plot.
*
* @param {Scatter} scatter
* @param {ScatterOptions} scatter
* @returns {Scatter2D}
*
* @memberOf GlPlot2dComponent
*/
public addScatterPlot(scatter: Scatter): Scatter2D {
return createScatter(this.plot, scatter);
public addScatterPlot(scatterOptions: ScatterOptions): Scatter2D {
return createScatter(this.plot, scatterOptions);
}

/**
* Helper that adds a scatter fancy plot to the current plot.
*
* @param {ScatterFancy} scatterFancy
* @param {ScatterFancyOptions} scatterFancyOptions
* @returns {GLScatterFancy}
*
* @memberOf GlPlot2dComponent
*/
public addScatterFancyPlot(scatterFancy: ScatterFancy): GLScatterFancy {
return createScatterFancy(this.plot, scatterFancy);
public addScatterFancyPlot(scatterFancyOptions: ScatterFancyOptions): GLScatterFancy {
return createScatterFancy(this.plot, scatterFancyOptions);
}

/**
Expand Down
39 changes: 0 additions & 39 deletions src/Line.ts

This file was deleted.

16 changes: 16 additions & 0 deletions src/LineOptions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

/**
* LineOptions.
*
* See https://github.com/gl-vis/gl-line2d.
*
* @export
* @interface LineOptions
*/
export interface LineOptions {
positions: number[];
color: number[];
fill: boolean[];
fillColor: number[][];
width: number;
}
35 changes: 0 additions & 35 deletions src/Scatter.ts

This file was deleted.

82 changes: 0 additions & 82 deletions src/ScatterFancy.ts

This file was deleted.

17 changes: 17 additions & 0 deletions src/ScatterFancyOptions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

/**
* ScatterFancyOptions.
*
* See https://github.com/gl-vis/gl-scatter2d-sdf.
*
* @export
* @interface ScatterFancyOptions
*/
export interface ScatterFancyOptions {
positions: number[];
sizes: number[];
colors: number[];
glyphs: string[];
borderWidths: number[];
borderColors: number[];
}
16 changes: 16 additions & 0 deletions src/ScatterOptions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

/**
* ScatterOptions.
*
* See https://github.com/gl-vis/gl-scatter2d.
*
* @export
* @interface ScatterOptions
*/
export interface ScatterOptions {
positions: number[];
size: number;
color: number[];
borderSize: number;
borderColor: number[];
}
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ export { defineGlPlot2d, GlPlot2dComponent } from './GlPlot2dComponent';
export { GlPlot2dOptions } from './GlPlot2dOptions';
export { GlPlot2dComponentProps } from './GlPlot2dComponentProps';
export * from './GlPlot2dUtils';
export { Line } from './Line';
export { LineOptions } from './LineOptions';
export { Point } from './Point';
export { Scatter } from './Scatter';
export { ScatterFancy } from './ScatterFancy';
export { ScatterOptions } from './ScatterOptions';
export { ScatterFancyOptions } from './ScatterFancyOptions';
export { Tick } from './Tick';

0 comments on commit e211bdb

Please sign in to comment.