Highchart折线图工具提示显示索引值,而不是X轴格式的标签名称 [英] Highchart line chart Tooltip showing index value instead of X-axis formatted label name

查看:124
本文介绍了Highchart折线图工具提示显示索引值,而不是X轴格式的标签名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的对齐问题通过但是工具提示信息显示为索引而不是x轴标签.

But the tooltip information shown with index instead of x-axis label.

不调用下面的 Highcharts.Axis.prototype.init 是输出吗?

Without calling Highcharts.Axis.prototype.init below is the output?

http://jsfiddle.net/mkpasala/3s0prgau/

当我按如下所示调用 Highcharts.Axis.prototype.init 方法时,而不是xAxis标记其显示索引.

When I called the Highcharts.Axis.prototype.init method like below, instead of xAxis label its showing index.

http://jsfiddle.net/mkpasala/k94cfn8t/

请帮助我在 Highcharts.Axis.prototype.init 方法中解决此问题.

Please help me to fix this inside Highcharts.Axis.prototype.init method.

推荐答案

在调用 Highcharts.Axis.prototype.init 之前,我将类别归入变量,并使用tooltip.formatter函数解决了该问题.格式化工具提示.下面是该解决方案的链接.

I resolved the issue by taking categories into a variable before calling Highcharts.Axis.prototype.init and used tooltip.formatter function to format the tooltip. Below is the link to that solution.

jsfiddle.net/mkpasala/3s0prgau/14/

这篇关于Highchart折线图工具提示显示索引值,而不是X轴格式的标签名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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