Skip to content

Commit

Permalink
fix tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
cuiyuan committed Jan 30, 2018
1 parent b0cb482 commit 7e72586
Showing 1 changed file with 11 additions and 25 deletions.
36 changes: 11 additions & 25 deletions web/src/index/component/trend.js
Original file line number Diff line number Diff line change
Expand Up @@ -708,11 +708,11 @@ export default class Trend extends Component {
if (!points.length) {
return;
}
let tooltip = '';
for (let i = 0; i < points.length; i ++) {
let name = points[i].series.name;
let type = points[i].series.userOptions.type;
if (type === 'area') {
let tooltip = '';
let current;
let total;
let bandName = name;
Expand Down Expand Up @@ -860,19 +860,10 @@ export default class Trend extends Component {
}
}
}
if (tooltip.length) {
return tooltip;
}
else {
return false;
}
}
else {
if (name === 'base line') {
continue;
}
if (name === 'label line') {
let menuList = '';
let menuList = '';
if (name === 'label line' && points[i].color === 'red') {
if (self.state.menuList.length) {
menuList += '<ul class="selection">';
for (let i = 0; i < self.state.menuList.length; i++) {
Expand All @@ -884,25 +875,20 @@ export default class Trend extends Component {
+ '</li>';
}
menuList += '</ul>';
// menuList += points[i].key;
// menuList += ' ';
// menuList += points[i].x;
// menuList += ' ';
// menuList += points[i].y;
return menuList;
}
else {
// menuList += 'label line' + points[i].key;
// menuList += ' ';
// menuList += points[i].x;
// menuList += ' ';
// menuList += points[i].y;
// return menuList;
return false;
menuList = '';
}
tooltip = menuList;
}
}
}
if (tooltip.length) {
return tooltip;
}
else {
return false;
}
};
let mouseOverFunction = function (e) {
window.currentOperaPoint = e;
Expand Down

0 comments on commit 7e72586

Please sign in to comment.