以编程方式为高散点图上的点触发单击事件 [英] programatically fire a click event for a point on highchart scatter plot

查看:118
本文介绍了以编程方式为高散点图上的点触发单击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上,我有一个小小的需求,那里有一个带有点列表和下拉列表的散点图。当我从下拉列表中选择一个项目时,其相应的数据点击应该被触发。当我在图表上选择一个数据点时,一些动作必须发生,而下拉列表应根据选择进行更新。



有什么方法可以这样做吗?



我试过firePointClick,事件是未定义的,我想要的事件与我们在手动点击时发生的事件相同,在那里任何其他方式?或任何改进

解决方案

它不是API的一部分,但可以使用内部API函数 firePointEvent 这种方式:

$ p $ chart.series [0] .data [0] .firePointEvent('点击',事件);

要为下拉菜单执行类似操作,可以使用 point.events.click事件处理程序


Actually I am in a small requirement where in there is a scatter chart with a list of points and drop down list. When I select an item from the drop down list its corresponding data point click should be fired. And when I select a data point on the chart, some actions has to happen and the drop down list should get updated according to the selection.

Is there any way we can do this?

I've tried firePointClick, the event is coming as undefined, I want the event same as the event which we get when a manual click happens, is there any other way?? or any improvements

解决方案

It's not part of the API, but could be done using internal API function called firePointEvent that way:

chart.series[0].data[0].firePointEvent('click', event);

To do something similar for dropdown, you can use point.events.click event handler.

这篇关于以编程方式为高散点图上的点触发单击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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