|
|
|
@ -31,6 +31,7 @@ import { palette } from './colors';
|
|
|
|
|
import * as d3 from 'd3'; |
|
|
|
|
|
|
|
|
|
import debounce from 'lodash/debounce'; |
|
|
|
|
import { AxisRange } from './types'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const DEFAULT_TICK_SIZE = 2; |
|
|
|
@ -798,8 +799,7 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> {
|
|
|
|
|
this.state.yValueRange = yRange; |
|
|
|
|
this.brushStartSelection = null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.options.callbackZoomIn([xRange, yRange]); |
|
|
|
|
this.zoomIn([xRange, yRange]); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected zoomOut(): void { |
|
|
|
@ -812,6 +812,13 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> {
|
|
|
|
|
this.options.callbackZoomOut(centers); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected zoomIn(ranges: AxisRange[]): void { |
|
|
|
|
if(ranges === undefined) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.options.callbackZoomIn(ranges); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getAxisTicksFormatter(axisOptions: AxisOption): (d: any, i: number) => any { |
|
|
|
|
// TODO: ticksCount === 0 -> suspicious option
|
|
|
|
|
if(axisOptions.ticksCount === 0) { |
|
|
|
|