diff --git a/src/index.ts b/src/index.ts index 722a729..535fff9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -29,19 +29,11 @@ import { palette } from './colors'; import * as d3 from 'd3'; -import defaultsDeep from 'lodash/defaultsDeep'; -import includes from 'lodash/includes'; import first from 'lodash/first'; import last from 'lodash/last'; -import mergeWith from 'lodash/mergeWith'; -import add from 'lodash/add'; -import replace from 'lodash/replace'; -import cloneDeep from 'lodash/cloneDeep'; import debounce from 'lodash/debounce'; -import has from 'lodash/has'; -const DEFAULT_MARGIN: Margin = { top: 30, right: 20, bottom: 20, left: 30 }; const DEFAULT_TICK_COUNT = 4; const DEFAULT_TICK_SIZE = 2; const MILISECONDS_IN_MINUTE = 60 * 1000; @@ -173,6 +165,7 @@ abstract class ChartwerkPod { height: this.height, width: this.width, } + // TODO: use instanses instead of oblects this.state = new PodState(boxPararms, this.coreSeries.visibleSeries, this.coreOptions.allOptions); } diff --git a/src/models/options.ts b/src/models/options.ts index 299fed0..6627586 100644 --- a/src/models/options.ts +++ b/src/models/options.ts @@ -51,6 +51,8 @@ const DEFAULT_CROSSHAIR_OPTIONS = { color: 'gray', } +const DEFAULT_MARGIN: Margin = { top: 30, right: 20, bottom: 20, left: 30 }; + const DEFAULT_OPTIONS: Options = { zoomEvents: { mouse: { @@ -88,6 +90,7 @@ const DEFAULT_OPTIONS: Options = { grid: DEFAULT_GRID_OPTIONS, crosshair: DEFAULT_CROSSHAIR_OPTIONS, renderLegend: true, + margin: DEFAULT_MARGIN, // remove options below renderTicksfromTimestamps: false, timeInterval: {