将任意数据附加到Highcharts数据点 [英] Attach arbitrary data to Highcharts data points

查看:81
本文介绍了将任意数据附加到Highcharts数据点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将附加数据附加到数据点,然后直接从事件处理程序访问该数据?

 系列:[{
data:[
{x:...,y:...,customProperty:...}
]
}]

http: //jsfiddle.net/JGCmt/1/

解决方案

是的,可以从事件中访问日期

  event.point.options.customProperty 

DEMO

Is it possible to attach additional data to a data point, and later access that data directly from an event handler?

series: [{
    data: [
        { x: ..., y: ..., customProperty:... }
    ]
}]

http://jsfiddle.net/JGCmt/1/

解决方案

Yes it is possible to access the date from an event handler.

event.point.options.customProperty

DEMO

这篇关于将任意数据附加到Highcharts数据点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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