Skip to content

Commit

Permalink
#29 move files into src folder
Browse files Browse the repository at this point in the history
  • Loading branch information
epicallan committed Mar 30, 2018
1 parent f2af70c commit 8d2146d
Show file tree
Hide file tree
Showing 16 changed files with 10 additions and 19 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {
createAxisModifier,
createNumericAxis,
createCategoryAxis,
} from '../src/factories/axis';
} from '.';
import {Axes} from 'plottable';
import { createLinearScale, createCategoryScale } from '../src/factories/scale';
import { createLinearScale, createCategoryScale } from '../scale';

describe('createAxisModifier', () => {
it('creates a valid modifier', () => {
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/dataset/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* for normalising data sets. For instance data for drawing some chart may need to get transformed
* into a certain shape. This is what this module does.
*/
import { stratify } from 'd3';
import {HierarchyNode} from 'd3-hierarchy';
import * as Plottable from 'plottable';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/labeler/autofit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const autoFitMetrics = (width: number, height: number, text: string) => {
return {fontSize: baseFont * 1.8, showLabels: widthRatio > 0.7};
};

export const autofitStyles = (width, height, text) => {
export const autofitStyles = (width: number, height: number, text: string) => {
const autoFit = autoFitMetrics(width, height, text);
return {
label: `style="display: ${autoFit.showLabels ? 'block' : 'none'}"`,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/labeler/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { color } from 'd3';
import { autofitStyles } from '../autofit/text';
import { autofitStyles } from './autofit';
import {approximate} from '@devinit/prelude/lib/numbers';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/legend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const createColorLegend = (colorScale: Scales.Color, config: Config) => {
showLegend = false, symbol = 'square', alignment = 'left', rowSpan = Infinity
} = config;

if (!showLegend || !colorScale) return null;
if (!showLegend || !colorScale) return undefined;

return new Components.Legend(colorScale)
.symbol(() => size => SymbolFactories[symbol]()(size))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'jest';
import { createLinearScale, createCategoryScale } from '../src/factories/scale';
import { createLinearScale, createCategoryScale } from '.';
import {Scales} from 'plottable';

describe('createLinearScale', () => {
Expand Down
13 changes: 0 additions & 13 deletions packages/core/src/tooltips/index.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8d2146d

Please sign in to comment.