Skip to content

Commit ef17816

Browse files
committed
chore: less modification compared to base
1 parent b810646 commit ef17816

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/component/dataZoom/SliderZoomView.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import {bind, each, isFunction, isString, indexOf} from 'zrender/src/core/util';
2121
import * as eventTool from 'zrender/src/core/event';
22-
import { Dictionary } from 'zrender/src/core/types';
2322
import * as graphic from '../../util/graphic';
2423
import * as throttle from '../../util/throttle';
2524
import DataZoomView from './DataZoomView';
@@ -389,11 +388,13 @@ class SliderZoomView extends DataZoomView {
389388

390389
const areaPoints = [[size[0], 0], [0, 0]];
391390
const linePoints: number[][] = [];
392-
393-
let lastIsEmpty: boolean;
391+
const step = thisShadowExtent[1] / (data.count() - 1);
392+
let thisCoord = 0;
394393

395394
// Optimize for large data shadow
396395
const stride = Math.round(data.count() / size[0]);
396+
let lastIsEmpty: boolean;
397+
397398
const coordSys = seriesModel.coordinateSystem;
398399
const sampling = this.dataZoomModel.get('sampling');
399400
let sampledData = data;
@@ -412,9 +413,6 @@ class SliderZoomView extends DataZoomView {
412413
}
413414
}
414415

415-
const step = thisShadowExtent[1] / (data.count() - 1);
416-
let thisCoord = 0;
417-
418416
sampledData.each([otherDim], function (value: ParsedValue, index) {
419417
if (useOldSampling) {
420418
if (stride > 0 && (index % stride)) {

0 commit comments

Comments
 (0)