3
回答
不等距折线图的tooltip问题

@Kener-林峰 你好,想跟你请教个问题:

首先谢谢你们新版本支持了不等距折线图的实现,但是我在绘图是发现一个问题,不知道是不是bug?

当我线上的画的点少的时候,可以显示tooltip,

但是点一多,tooltip就不显示了


tooltip代码:

tooltip : {
 trigger: 'item',
 formatter : function (params) {
 return '('
  + params.value[0] + ', ' 
  + params.value[1] + ')';
  }
 }



画线代码:

series : [
   {
      name:'0deg.C',
      type:'line',
      itemStyle: {
          normal: {
          color: '#000000'
               }
           },
       data:[[0,1.2099],[0.006833333,1.267],[0.037416667,1.3109]...省略]
            				
   }




举报
java0317
发帖于4年前 3回/1K+阅

以下是问题补充:

  • @java0317 :补充一下,tooltip失效的时候,一条线上我画了334个点 (4年前)
共有3个答案 最后回答: 4年前

谢谢反馈,知道问题所在了,bug confirm

https://github.com/ecomfe/echarts/issues/886

--- 共有 7 条评论 ---
java0317回复 @Kener-林峰 : O(∩_∩)O哈哈哈~,不好意思呢,刚才没会意~谢谢你的即时对应,以后还请多指点! 4年前 回复
Kener-林峰回复 @java0317 : github已经更新了,欲哭无泪啊。。。 4年前 回复
java0317回复 @Kener-林峰 : 多谢指点!还有就是下一个版本大概是什么时候能发布呢?手上的项目比较紧迫的。。。 4年前 回复
Kener-林峰回复 @java0317 : 1,十字是你自己在tooltip里定义了axisPointer样式出来的,你不定义不就行了?2,showAllSymbol:true啊! 4年前 回复
java0317回复 @Kener-林峰 : 个人感觉还有两个问题就是: ①.当光标移到tooltip上的时候会变成十字型的,这样看密集数据的时候不太方便,感觉就光标原来的样子比较好。 ②.如果不加calculable属性,就无法显示线上的点吗?用户如果误操作的画,容易将点移动的。。。能否像highcharts一样,单纯做到将散点图的点用线连起来的效果呢? 4年前 回复

引用来自“Kener-林峰”的评论

showAllSymbol:true试试

我在echarts在线例子里也试过了,会出现同样的问题

下面是这条线的所有数据:

data:[
[0,1.2099], 
[0.006833333,1.267], 
[0.037416667,1.3109], 
[0.081666667,1.329], 
[0.198222222,1.3453], 
[0.198777778,1.3453], 
[0.199361111,1.3453], 
[0.200805556,1.3455], 
[0.202083333,1.3457], 
[0.204305556,1.3457], 
[0.205194444,1.3458], 
[0.207555556,1.3461], 
[0.208138889,1.3461], 
[0.209583333,1.3462], 
[0.210472222,1.3462], 
[0.211222222,1.3463], 
[0.214833333,1.3467], 
[0.215611111,1.3467], 
[0.217083333,1.3467], 
[0.217972222,1.3468], 
[0.218694444,1.3469], 
[0.220222222,1.3469], 
[0.221138889,1.347], 
[0.221972222,1.347], 
[0.222472222,1.3471], 
[0.22275,1.3471], 
[0.223027778,1.3472], 
[0.2235,1.3472], 
[0.224388889,1.3473], 
[0.224916667,1.3474], 
[0.225361111,1.3474], 
[0.226111111,1.3474], 
[0.226722222,1.3474], 
[0.227,1.3475], 
[0.227472222,1.3475], 
[0.230916667,1.3477], 
[0.231138889,1.3477], 
[0.234111111,1.3479], 
[0.234583333,1.3479], 
[0.237972222,1.3482], 
[0.239416667,1.3483], 
[0.24225,1.3484], 
[0.244944444,1.3487], 
[0.247361111,1.3488], 
[0.247611111,1.3487], 
[0.248527778,1.3488], 
[0.249055556,1.3488], 
[0.249777778,1.3488], 
[0.251388889,1.349], 
[0.251777778,1.349], 
[0.252472222,1.3491], 
[0.253388889,1.3491], 
[0.253972222,1.3491], 
[0.255222222,1.3492], 
[0.255666667,1.3493], 
[0.256777778,1.3494], 
[0.257833333,1.3493], 
[0.258305556,1.3495], 
[0.259611111,1.3495], 
[0.262083333,1.3497], 
[0.263916667,1.3497], 
[0.265194444,1.3498], 
[0.265694444,1.3498], 
[0.266666667,1.3499], 
[0.268388889,1.35], 
[0.268888889,1.3501], 
[0.269722222,1.3501], 
[0.270111111,1.3502], 
[0.271194444,1.3502], 
[0.272666667,1.3503], 
[0.274666667,1.3504], 
[0.276083333,1.3504], 
[0.276833333,1.3504], 
[0.2775,1.3505], 
[0.282416667,1.3508], 
[0.283833333,1.3508], 
[0.284305556,1.3508], 
[0.286611111,1.351], 
[0.287194444,1.351], 
[0.287777778,1.351], 
[0.288666667,1.3511], 
[0.289333333,1.3512], 
[0.29025,1.3512], 
[0.290916667,1.3512], 
[0.292277778,1.3513], 
[0.2935,1.3513], 
[0.294305556,1.3513], 
[0.295555556,1.3514], 
[0.296194444,1.3515], 
[0.297083333,1.3516], 
[0.299,1.3517], 
[0.300194444,1.3517], 
[0.30075,1.3518], 
[0.30125,1.3518], 
[0.301916667,1.3518], 
[0.303194444,1.3519], 
[0.303888889,1.3519], 
[0.304527778,1.352], 
[0.305472222,1.352], 
[0.307138889,1.352], 
[0.307777778,1.3521], 
[0.308694444,1.3521], 
[0.309444444,1.3522], 
[0.310083333,1.3523], 
[0.310833333,1.3523], 
[0.311277778,1.3523], 
[0.311861111,1.3523], 
[0.312111111,1.3523], 
[0.313583333,1.3524], 
[0.314277778,1.3524], 
[0.314944444,1.3525], 
[0.315222222,1.3525], 
[0.316138889,1.3525], 
[0.317388889,1.3526], 
[0.317888889,1.3527], 
[0.318277778,1.3527], 
[0.319222222,1.3527], 
[0.320111111,1.3527], 
[0.320444444,1.3527], 
[0.321638889,1.3527], 
[0.3225,1.3528], 
[0.325,1.353], 
[0.327222222,1.353], 
[0.328666667,1.353], 
[0.329694444,1.3531], 
[0.330305556,1.3532], 
[0.334777778,1.3534], 
[0.337666667,1.3535], 
[0.338111111,1.3536], 
[0.339972222,1.3537], 
[0.342194444,1.3537], 
[0.343666667,1.3538], 
[0.345,1.3538], 
[0.34575,1.3538], 
[0.346861111,1.3539], 
[0.347388889,1.354], 
[0.348472222,1.354], 
[0.349944444,1.354], 
[0.350333333,1.354], 
[0.350833333,1.354], 
[0.351583333,1.3542], 
[0.357555556,1.3543], 
[0.361194444,1.3544], 
[0.370583333,1.3549], 
[0.376638889,1.3552], 
[0.387361111,1.3556], 
[0.391361111,1.3557], 
[0.403388889,1.3563], 
[0.407027778,1.3563], 
[0.41425,1.3566], 
[0.418805556,1.3569], 
[0.498111111,1.3596], 
[0.523083333,1.3606], 
[0.598027778,1.3629], 
[0.695722222,1.3657], 
[0.703166667,1.3659], 
[0.707194444,1.3661], 
[0.719222222,1.3662], 
[0.72075,1.3663], 
[0.721694444,1.3664], 
[0.722027778,1.3664], 
[0.724222222,1.3665], 
[0.72475,1.3665], 
[0.727305556,1.3666], 
[0.728583333,1.3666], 
[0.729472222,1.3666], 
[0.730333333,1.3667], 
[0.736527778,1.3669], 
[0.772111111,1.3676], 
[0.830805556,1.3693], 
[0.840944444,1.3695], 
[0.874166667,1.3702], 
[0.8975,1.3709], 
[0.925472222,1.3715], 
[0.972472222,1.3726], 
[1.076138889,1.3749], 
[1.185138889,1.3769], 
[1.248666667,1.3782], 
[1.368944444,1.3803], 
[1.413138889,1.3809], 
[1.449638889,1.3815], 
[1.486416667,1.3822], 
[1.508166667,1.3825], 
[1.517972222,1.3827], 
[1.519361111,1.3827], 
[1.520083333,1.3828], 
[1.520444444,1.3828], 
[1.521222222,1.3828], 
[1.523361111,1.3827], 
[1.529333333,1.3828], 
[1.57975,1.3835], 
[1.596111111,1.3838], 
[1.596805556,1.3838], 
[1.599083333,1.3838], 
[1.600055556,1.3838], 
[1.600472222,1.3839], 
[1.600972222,1.3839], 
[1.601888889,1.3839], 
[1.603222222,1.3841], 
[1.603805556,1.3841], 
[1.604277778,1.3841], 
[1.604666667,1.384], 
[1.605777778,1.3841], 
[1.610444444,1.3841], 
[1.617222222,1.3842], 
[1.63,1.3845], 
[1.630833333,1.3845], 
[1.634083333,1.3845], 
[1.637055556,1.3845], 
[1.638055556,1.3845], 
[1.639944444,1.3846], 
[1.6405,1.3846], 
[1.641916667,1.3846], 
[1.642777778,1.3846], 
[1.644472222,1.3847], 
[1.6475,1.3847], 
[1.654777778,1.3847], 
[1.658111111,1.3848], 
[1.665138889,1.385], 
[1.666611111,1.3849], 
[1.670222222,1.385], 
[1.673416667,1.3851], 
[1.674666667,1.3851], 
[1.67575,1.3851], 
[1.676583333,1.3851], 
[1.680111111,1.3852], 
[1.705416667,1.3855], 
[1.70775,1.3856], 
[1.720916667,1.3858], 
[1.723305556,1.3857], 
[1.72375,1.3858], 
[1.723972222,1.3858], 
[1.724361111,1.3858], 
[1.725777778,1.3859], 
[1.732555556,1.3859], 
[1.748277778,1.3861], 
[1.765805556,1.3865], 
[1.777166667,1.3865], 
[1.785805556,1.3867], 
[1.817555556,1.3871], 
[1.825333333,1.3873], 
[1.829694444,1.3874], 
[1.838055556,1.3874], 
[1.839944444,1.3874], 
[1.840416667,1.3875], 
[1.840805556,1.3874], 
[1.841388889,1.3875], 
[1.841944444,1.3875], 
[1.842305556,1.3875], 
[1.843027778,1.3875], 
[1.843472222,1.3876], 
[1.844,1.3875], 
[1.844666667,1.3875], 
[1.845583333,1.3875], 
[1.846916667,1.3875], 
[1.847277778,1.3875], 
[1.8475,1.3875], 
[1.847805556,1.3875], 
[1.848222222,1.3875], 
[1.848444444,1.3875], 
[1.849138889,1.3875], 
[1.849416667,1.3875], 
[1.849777778,1.3875], 
[1.850277778,1.3876], 
[1.85075,1.3876], 
[1.851111111,1.3876], 
[1.851694444,1.3877], 
[1.852083333,1.3877], 
[1.853583333,1.3875], 
[1.853944444,1.3876], 
[1.854388889,1.3876], 
[1.854611111,1.3876], 
[1.854861111,1.3877], 
[1.855888889,1.3877], 
[1.856305556,1.3878], 
[1.856666667,1.3877], 
[1.857361111,1.3877], 
[1.85775,1.3876], 
[1.857972222,1.3876], 
[1.863638889,1.3877], 
[1.881527778,1.388], 
[1.882,1.388], 
[1.884722222,1.388], 
[1.892083333,1.3882], 
[1.893694444,1.3881], 
[1.893861111,1.3888], 
[2.193861111,1.3929], 
[2.493861111,1.3967], 
[2.793861111,1.4001], 
[3.093861111,1.4034], 
[3.393861111,1.4064], 
[3.693861111,1.4092], 
[3.993861111,1.4116], 
[4.293861111,1.4139], 
[4.593861111,1.416], 
[4.893861111,1.4179], 
[5.193861111,1.4196], 
[5.493861111,1.4215], 
[5.793861111,1.4234], 
[6.093861111,1.4254], 
[6.393861111,1.4277], 
[6.693861111,1.4305], 
[6.993861111,1.4339], 
[7.293861111,1.4383], 
[7.593861111,1.4439], 
[7.893861111,1.4516], 
[8.193861111,1.4621], 
[8.493861111,1.4763], 
[8.793861111,1.494], 
[9.093861111,1.5116], 
[9.393861111,1.5236], 
[9.693861111,1.5298], 
[9.993861111,1.533], 
[10.29386111,1.5351], 
[10.59386111,1.5365], 
[10.89386111,1.5375], 
[11.19386111,1.5383], 
[11.49386111,1.539], 
[11.79386111,1.5396], 
[12.09386111,1.5402], 
[12.39386111,1.5407], 
[12.69386111,1.5412], 
[12.99386111,1.5415], 
[13.29386111,1.5419], 
[13.59386111,1.5422], 
[13.89386111,1.5425], 
[14.19386111,1.5428], 
[14.49386111,1.5431], 
[14.79386111,1.5435], 
[15.09386111,1.5439], 
[15.39386111,1.5439], 
[15.69386111,1.5443], 
[15.99386111,1.5446], 
[16,1.5446]
            ]

 

顶部