highchart中的标签悬停功能 [英] Label hover function in highchart

查看:134
本文介绍了highchart中的标签悬停功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 highchart.js 文件在我的应用程序中渲染图表。

I am using highchart.js file for rendering chart in my application. I want to show customize label for Bar chart.

我的要求是如果我的标签名称有长文本,例如我的标签文本长,它应该在条形图前面显示名称标签( My Label ... )。当鼠标移到标签名称时,它应该在小 tooltip 中显示一个完整的标签名称。我查阅了Highchart文档,但没有找到任何解决方案。

My requirements are if my label name has long text like "My Label Text Long", It should show name label like (My Label...) in front of bar chart. On mouse over to label name, it should show me a full label name in small tooltip. I consulted Highchart documentation but did not find any solution for it.

推荐答案

因为你在.ja文件中获取值。在显示之前切片这些值。

Slice down the value. As you are getting values in .ja file. Slice those values before displaying.

this.value.slice(0,21) +"...";

这篇关于highchart中的标签悬停功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆