fix:修改提示框 始终在鼠标下方
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
padding: 5px 15px 5px 10px;
|
padding: 5px 15px 5px 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;/*避免鼠标第一次放到曲线时,x轴出现滚动条后消失*/
|
overflow: hidden;/*避免鼠标第一次放到曲线时,x轴出现滚动条后消失*/
|
||||||
|
min-height: calc(100vh - 150px);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -575,10 +575,10 @@
|
|||||||
}else{
|
}else{
|
||||||
x = pointX - boxWidth;
|
x = pointX - boxWidth;
|
||||||
}
|
}
|
||||||
if((parClientHeight-pointY-(parTop-parScrollTop)-20)>=boxHeight){//说明鼠标上面放不下提示框
|
if(windowMouse.y + 15 +boxHeight<windowHeight){//说明鼠标上面放不下提示框
|
||||||
y = pointY+10;
|
y = pointY + 15;
|
||||||
}else {
|
}else {
|
||||||
y = pointY-boxHeight;
|
y = pointY - boxHeight - 15;
|
||||||
}
|
}
|
||||||
return [x,y];
|
return [x,y];
|
||||||
}else {//preview page
|
}else {//preview page
|
||||||
@@ -601,10 +601,10 @@
|
|||||||
}else{
|
}else{
|
||||||
x = pointX - boxWidth;
|
x = pointX - boxWidth;
|
||||||
}
|
}
|
||||||
if(pointY<(viewHeight/2)){//说明鼠标上面放不下提示框
|
if(windowMouse.y + 15 +boxHeight<windowHeight){//说明鼠标上面放不下提示框
|
||||||
y = pointY+10;
|
y = pointY + 15;
|
||||||
}else {
|
}else {
|
||||||
y = pointY-boxHeight;
|
y = pointY - boxHeight - 15;
|
||||||
}
|
}
|
||||||
return [x,y];
|
return [x,y];
|
||||||
}
|
}
|
||||||
@@ -747,6 +747,9 @@
|
|||||||
chartUnit=chartUnit?chartUnit:2;
|
chartUnit=chartUnit?chartUnit:2;
|
||||||
let unit=chartDataFormat.getUnit(chartUnit);
|
let unit=chartDataFormat.getUnit(chartUnit);
|
||||||
let flag=JSON.stringify(value).length>JSON.stringify(chartDataFormat.Interval(maxValue,copies,unit.type)).length;
|
let flag=JSON.stringify(value).length>JSON.stringify(chartDataFormat.Interval(maxValue,copies,unit.type)).length;
|
||||||
|
if(chartDataFormat.Interval(maxValue,copies,unit.type,'min')<1){
|
||||||
|
dot=1;
|
||||||
|
}
|
||||||
if(dot===0&&flag){
|
if(dot===0&&flag){
|
||||||
dot=1;
|
dot=1;
|
||||||
}
|
}
|
||||||
@@ -1037,7 +1040,7 @@
|
|||||||
// 设置数据, filter区分
|
// 设置数据, filter区分
|
||||||
setData(chartItem, seriesItem, panelId, filter,legend,area,errorMsg) {
|
setData(chartItem, seriesItem, panelId, filter,legend,area,errorMsg) {
|
||||||
this.setColor(legend.length);
|
this.setColor(legend.length);
|
||||||
legend.forEach((t,i)=>{t.color = this.bgColorList[i]})
|
legend.forEach((t,i)=>{t.color = this.bgColorList[i]});
|
||||||
this.filter.from = filter.from;
|
this.filter.from = filter.from;
|
||||||
if(errorMsg && errorMsg!==''){
|
if(errorMsg && errorMsg!==''){
|
||||||
this.isError = true;
|
this.isError = true;
|
||||||
|
|||||||
@@ -308,11 +308,12 @@
|
|||||||
}else{
|
}else{
|
||||||
x = pointX - boxWidth;
|
x = pointX - boxWidth;
|
||||||
}
|
}
|
||||||
if((parClientHeight-pointY-(parTop-parScrollTop)-20)>=boxHeight){//说明鼠标上面放不下提示框
|
// if((parClientHeight-pointY-(parTop-parScrollTop)-20)>=boxHeight){//说明鼠标上面放不下提示框
|
||||||
|
// y = pointY+10;
|
||||||
|
// }else {
|
||||||
|
// y = pointY-boxHeight;
|
||||||
|
// }
|
||||||
y = pointY+10;
|
y = pointY+10;
|
||||||
}else {
|
|
||||||
y = pointY-boxHeight;
|
|
||||||
}
|
|
||||||
return [x,y];
|
return [x,y];
|
||||||
}else {
|
}else {
|
||||||
x = pointX - boxWidth;
|
x = pointX - boxWidth;
|
||||||
|
|||||||
@@ -770,6 +770,7 @@
|
|||||||
|
|
||||||
.box-content {
|
.box-content {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
min-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* end-chart list*/
|
/* end-chart list*/
|
||||||
|
|||||||
Reference in New Issue
Block a user