Skip to content

Commit 41b4f4b

Browse files
deqingliBingBlog
authored andcommitted
resolve frontend fecs problem (PaddlePaddle#123)
* modify overlay and offset chart view interplay problem * resolve frontend fecs problem
1 parent 5a16e71 commit 41b4f4b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

frontend/src/histogram/ui/chart.san

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ export default {
167167
series: seriesOption
168168
};
169169

170-
var zr1 = this.myChart.getZr();
171-
170+
let zr1 = this.myChart.getZr();
172171
zr1.on('mousemove', function (e) {
173172
zr1.remove(zrDrawElement.hoverLine);
174173
zr1.remove(zrDrawElement.tooltip);
@@ -193,7 +192,7 @@ export default {
193192
grid.top = '42%';
194193
grid.left = '4%';
195194
grid.right = '15%';
196-
chartData.forEach((dataItem) => {
195+
chartData.forEach(function (dataItem) {
197196
let lineData = [];
198197
maxStep = Math.max(dataItem.step, maxStep);
199198
minStep = Math.min(dataItem.step, minStep);
@@ -296,10 +295,10 @@ export default {
296295
}
297296

298297
zrDrawElement.hoverDots = [];
299-
298+
300299
let zr = ecChart.getZr();
301300

302-
function removeTooltip(){
301+
function removeTooltip() {
303302
if (zrDrawElement.hoverLine) {
304303
zr.remove(zrDrawElement.hoverLine);
305304
zr.remove(zrDrawElement.tooltip);
@@ -318,7 +317,7 @@ export default {
318317
removeTooltip();
319318
let nearestIndex = findNearestValue(e.offsetX, e.offsetY);
320319
if (nearestIndex) {
321-
let getCoord = function(pt) {
320+
let getCoord = function (pt) {
322321
return ecChart.convertToPixel('grid', pt);
323322
};
324323
let gridRect = ecChart.getModel().getComponent('grid', 0).coordinateSystem.getRect();

0 commit comments

Comments
 (0)