Skip to content

Commit a5c5e48

Browse files
committed
remove old functions
1 parent 271fafb commit a5c5e48

File tree

3 files changed

+0
-38
lines changed

3 files changed

+0
-38
lines changed

src/elements/base.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -137,17 +137,6 @@ export class StatsBase extends Element {
137137
);
138138
}
139139

140-
inLabelRange(mouseX, mouseY, useFinalPosition) {
141-
if (Number.isNaN(this.x) && Number.isNaN(this.y)) {
142-
return false;
143-
}
144-
const bounds = this._getHitBounds(useFinalPosition);
145-
if (this.isVertical()) {
146-
return mouseX >= bounds.left && mouseX <= bounds.right;
147-
}
148-
return mouseY >= bounds.top && mouseY <= bounds.bottom;
149-
}
150-
151140
inXRange(mouseX, useFinalPosition) {
152141
const bounds = this._getHitBounds(useFinalPosition);
153142
return mouseX >= bounds.left && mouseX <= bounds.right;
@@ -190,10 +179,6 @@ export class StatsBase extends Element {
190179
};
191180
}
192181

193-
getArea() {
194-
return 0; // abstract
195-
}
196-
197182
_getOutliers(useFinalPosition) {
198183
const props = this.getProps(['outliers'], useFinalPosition);
199184
return props.outliers || [];

src/elements/boxandwhiskers.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -182,20 +182,6 @@ export class BoxAndWiskers extends StatsBase {
182182
bottom: y0 + height,
183183
};
184184
}
185-
186-
// height(useFinalPosition) {
187-
// const props = this.getProps(['base', 'q1', 'q3'], useFinalPosition);
188-
// return props.base - Math.min(props.q1, props.q3);
189-
// }
190-
191-
getArea(useFinalPosition) {
192-
const props = this.getProps(['q3', 'q1', 'width', 'height'], useFinalPosition);
193-
const iqr = Math.abs(props.q3 - props.q1);
194-
if (this.isVertical()) {
195-
return iqr * props.width;
196-
}
197-
return iqr * props.height;
198-
}
199185
}
200186

201187
BoxAndWiskers._type = 'boxandwhiskers';

src/elements/violin.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,6 @@ export class ViolinElement extends StatsBase {
8888
bottom: y0 + height,
8989
};
9090
}
91-
92-
getArea() {
93-
const props = this.getProps(['min', 'max', 'height', 'width']);
94-
const iqr = Math.abs(props.max - props.min);
95-
if (this.isVertical()) {
96-
return iqr * props.width;
97-
}
98-
return iqr * props.height;
99-
}
10091
}
10192

10293
ViolinElement._type = 'violin';

0 commit comments

Comments
 (0)