|
|
@ -1,3 +1,4 @@ |
|
|
|
|
|
|
|
import { AxisRange } from './types'; |
|
|
|
import VueChartwerkPodMixin from './VueChartwerkPodMixin'; |
|
|
|
import VueChartwerkPodMixin from './VueChartwerkPodMixin'; |
|
|
|
import { Grid } from './components/grid'; |
|
|
|
import { Grid } from './components/grid'; |
|
|
|
|
|
|
|
|
|
|
@ -33,6 +34,7 @@ import * as d3 from 'd3'; |
|
|
|
import debounce from 'lodash/debounce'; |
|
|
|
import debounce from 'lodash/debounce'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const DEFAULT_TICK_SIZE = 2; |
|
|
|
const DEFAULT_TICK_SIZE = 2; |
|
|
|
const MILISECONDS_IN_MINUTE = 60 * 1000; |
|
|
|
const MILISECONDS_IN_MINUTE = 60 * 1000; |
|
|
|
|
|
|
|
|
|
|
@ -798,8 +800,7 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> { |
|
|
|
this.state.yValueRange = yRange; |
|
|
|
this.state.yValueRange = yRange; |
|
|
|
this.brushStartSelection = null; |
|
|
|
this.brushStartSelection = null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.zoomIn([xRange, yRange]); |
|
|
|
this.options.callbackZoomIn([xRange, yRange]); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected zoomOut(): void { |
|
|
|
protected zoomOut(): void { |
|
|
@ -812,6 +813,10 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> { |
|
|
|
this.options.callbackZoomOut(centers); |
|
|
|
this.options.callbackZoomOut(centers); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected zoomIn(ranges: AxisRange[]): void { |
|
|
|
|
|
|
|
this.options.callbackZoomIn(ranges); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getAxisTicksFormatter(axisOptions: AxisOption): (d: any, i: number) => any { |
|
|
|
getAxisTicksFormatter(axisOptions: AxisOption): (d: any, i: number) => any { |
|
|
|
// TODO: ticksCount === 0 -> suspicious option
|
|
|
|
// TODO: ticksCount === 0 -> suspicious option
|
|
|
|
if(axisOptions.ticksCount === 0) { |
|
|
|
if(axisOptions.ticksCount === 0) { |
|
|
|