Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Commit

Permalink
recreate index file
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed Dec 19, 2016
1 parent b50f6f4 commit 4ff2b99
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 17 deletions.
22 changes: 5 additions & 17 deletions src/Scatterplot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
* created: 2016-10-28T11:19:52.797Z
*/

import './style.scss';
import {axisLeft, axisBottom, AxisScale} from 'd3-axis';
import * as d3scale from 'd3-scale';
import {scaleLinear} from 'd3-scale';
import {select, mouse, event as d3event} from 'd3-selection';
import {zoom as d3zoom, ZoomScale, ZoomTransform, D3ZoomEvent, zoomIdentity, ZoomBehavior} from 'd3-zoom';
import {drag as d3drag} from 'd3-drag';
import {quadtree, Quadtree, QuadtreeInternalNode, QuadtreeLeaf} from 'd3-quadtree';
import {circleSymbol, ISymbol, ISymbolRenderer, ERenderMode} from './symbol';
import * as _symbol from './symbol';
import merge from './merge';
import {forEachLeaf, ellipseTester, isLeafNode, hasOverlap, getTreeSize, findByTester, getFirstLeaf, ABORT_TRAVERSAL, CONTINUE_TRAVERSAL, IBoundsPredicate, ITester} from './quadtree';
import Lasso,{ILassoOptions} from './lasso';
Expand Down Expand Up @@ -240,8 +238,8 @@ export default class Scatterplot<T> extends EventEmitter {
xlabel: 'x',
ylabel: 'y',

xscale: <IScale>d3scale.scaleLinear().domain([0, 100]),
yscale: <IScale>d3scale.scaleLinear().domain([0, 100]),
xscale: <IScale>scaleLinear().domain([0, 100]),
yscale: <IScale>scaleLinear().domain([0, 100]),

symbol: <ISymbol<T>>circleSymbol(),

Expand All @@ -260,8 +258,8 @@ export default class Scatterplot<T> extends EventEmitter {


private readonly normalized2pixel = {
x: d3scale.scaleLinear().domain(NORMALIZED_RANGE),
y: d3scale.scaleLinear().domain(NORMALIZED_RANGE)
x: scaleLinear().domain(NORMALIZED_RANGE),
y: scaleLinear().domain(NORMALIZED_RANGE)
};
private canvasDataLayer:HTMLCanvasElement;
private canvasSelectionLayer:HTMLCanvasElement;
Expand Down Expand Up @@ -905,13 +903,3 @@ export default class Scatterplot<T> extends EventEmitter {
ctx.restore();
}
}

/**
* reexport d3 scale
*/
export const scale = d3scale;
export const symbol = _symbol;

export function create<T>(data:T[], canvas:HTMLCanvasElement):Scatterplot<T> {
return new Scatterplot(data, canvas);
}
19 changes: 19 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Created by sam on 19.12.2016.
*/

import './style.scss';
import Scatterplot from './Scatterplot';
import * as _symbol from './symbol';
import * as d3scale from 'd3-scale';
export {default as Scatterplot, EScaleAxes, IAccessor, IScale, IScatterplotOptions, IWindow, IZoomOptions} from './Scatterplot';

/**
* reexport d3 scale
*/
export const scale = d3scale;
export const symbol = _symbol;

export function create<T>(data:T[], canvas:HTMLCanvasElement):Scatterplot<T> {
return new Scatterplot(data, canvas);
}

0 comments on commit 4ff2b99

Please sign in to comment.