Add or highlight a single points on a jQuery flot graph?

一世执手 提交于 2019-12-08 13:37:32

The API provides the following methods:

The Plot object returned from the plot function has some methods you can call:

  • highlight(series, datapoint)

    Highlight a specific datapoint in the data series. You can either specify the actual objects, e.g. if you got them from a "plotclick" event, or you can specify the indices, e.g. highlight(1, 3) to highlight the fourth point in the second series (remember, zero-based indexing).

  • unhighlight(series, datapoint) or unhighlight()

    Remove the highlighting of the point, same parameters as highlight.

    If you call unhighlight with no parameters, e.g. as plot.unhighlight(), all current highlights are removed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!