Point.prototype.firePointEvent = function(eventType, eventArgs, defaultFunction) {
var point = this,
series = this.series,
seriesOptions = series.options;
// load event handlers on demand to save time on mouseover/out
if (seriesOptions.point.events[eventType] || (point.options && point.options.events && point.options.events[eventType])) {
this.importEvents();
}
// add default handler if in selection mode
if (eventType === 'click' && seriesOptions.allowPointSelect) {
defaultFunction = function(event) {
// Control key is for Windows, meta (= Cmd key) for Mac, Shift for Opera
if (point.select) { // Could be destroyed by prior event handlers (#2911)
2 个回复
john - 个人微博:http://weibo.com/u/2175683160
赞同来自:
1、在扇区(对应的是点,Point)的点击事件里做判断,具体的判断逻辑是判断是否已经有选中的点并对选中的点进行取消选择操作
关键部分代码是:
1)获取选中的点
2)对点进行取消选择操作
最终结果见:http://code.hcharts.cn/hcharts.cn/hhhGsl
2、修改源码,去掉 ctrl、shift 按钮的功能
具体是修改 Point.firePointEvent 函数,修改的内容是将 “point.select(null, event.ctrlKey || event.metaKey || event.shiftKey);” 修改为 “point.select(null);”
具体代码是(直接将下面的代码放在页面上就行了):
jsbome - 个人博客:http://highcharts.daxueba.net
赞同来自: