【发布时间】:2019-10-22 15:53:26
【问题描述】:
我目前正在尝试找到一种使用布尔数组的方法,以确定哪些元素在散景中接收 HoverTooltips,同时仅使用一个字典来绘制情节。
我已经尝试过使用散景渲染功能,但这并不奏效。
source.data = dict(
x=data_source.loc[:, 'x_col_name'],
y=data_source.loc[:, 'y_col_name'],
color=color_selection(selected), # Translates bool to color
alpha=alpha_selection(selected), # Translates bool to transparency
active=selection # boolean array of selected elements
)
只有活动数据点才能收到 HoverTooltip
【问题讨论】:
标签: python-3.x hover tooltip bokeh