本文整理汇总了Python中bokeh.models.HoverTool.tooltips方法的典型用法代码示例。如果您正苦于以下问题:Python HoverTool.tooltips方法的具体用法?Python HoverTool.tooltips怎么用?Python HoverTool.tooltips使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bokeh.models.HoverTool
的用法示例。
在下文中一共展示了HoverTool.tooltips方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: createBokehChart
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def createBokehChart(self):
keyFields = self.getKeyFields()
valueFields = self.getValueFields()
color = self.options.get("color")
xlabel = keyFields[0]
ylabel = valueFields[0]
wpdf = self.getWorkingPandasDataFrame().copy()
colors = self.colorPalette(None if color is None else len(wpdf[color].unique()))
p = figure(y_axis_label=ylabel, x_axis_label=xlabel)
for i,c in enumerate(list(wpdf[color].unique())) if color else enumerate([None]):
wpdf2 = wpdf[wpdf[color] == c] if c else wpdf
p.circle(list(wpdf2[xlabel]), list(wpdf2[ylabel]), color=colors[i], legend=str(c) if c and self.showLegend() else None, fill_alpha=0.5, size=8)
p.xaxis.axis_label = xlabel
p.yaxis.axis_label = ylabel
p.legend.location = "top_left"
hover = HoverTool()
hover.tooltips = [(xlabel, '@x'), (ylabel, '@y')]
p.add_tools(hover)
return p
示例2: __init__
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def __init__(self, **kwargs):
data = self.processing_update({'processing': {}, 'ncores': {}})
self.source = ColumnDataSource(data)
x_range = Range1d(-1, 1)
fig = figure(
title='Processing and Pending', tools='resize',
x_range=x_range, id='bk-processing-stacks-plot', **kwargs)
fig.quad(source=self.source, left=0, right='right', color=Spectral9[0],
top='top', bottom='bottom')
fig.xaxis.minor_tick_line_alpha = 0
fig.yaxis.visible = False
fig.ygrid.visible = False
hover = HoverTool()
fig.add_tools(hover)
hover = fig.select(HoverTool)
hover.tooltips = """
<div>
<span style="font-size: 14px; font-weight: bold;">Host:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@name</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">Processing:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@processing</span>
</div>
"""
hover.point_policy = 'follow_mouse'
self.root = fig
示例3: plot_lines
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def plot_lines(df, fig, x, y, group):
legends = []
groups = df.groupby(by=[group])
numlines = len(groups)
colors=Spectral11[0:numlines]
for i, (key, grp) in enumerate(groups):
grp = grp.sort_values(by=x,axis=0)
name = str(key)
source = ColumnDataSource(data=grp)
line = fig.line(x, y, source=source, line_width=4, line_color=colors[i])
point = fig.circle(x, y, source=source, name=name, size=8, fill_color=colors[i])
legends.append((name, [line]))
hover = HoverTool(names=[name])
hover.tooltips = [(c, '@' + c) for c in grp.columns]
hover.tooltips.append(('index', '$index'))
fig.add_tools(hover)
# place a legend outside the plot area
# http://bokeh.pydata.org/en/dev/docs/user_guide/styling.html#outside-the-plot-area
legend = Legend(legends=legends, location=(0, -30), name="foppo")
fig.add_layout(legend, 'right')
return fig
示例4: nbytes_plot
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def nbytes_plot(**kwargs):
data = {"name": [], "left": [], "right": [], "center": [], "color": [], "percent": [], "MB": [], "text": []}
source = ColumnDataSource(data)
fig = figure(title="Memory Use", tools="", toolbar_location=None, id="bk-nbytes-plot", **kwargs)
fig.quad(source=source, top=1, bottom=0, left="left", right="right", color="color", alpha=1)
fig.grid.grid_line_color = None
fig.grid.grid_line_color = None
fig.axis.visible = None
fig.outline_line_color = None
hover = HoverTool()
fig.add_tools(hover)
hover = fig.select(HoverTool)
hover.tooltips = """
<div>
<span style="font-size: 14px; font-weight: bold;">Name:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@name</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">Percent:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@percent</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">MB:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@MB</span>
</div>
"""
hover.point_policy = "follow_mouse"
return source, fig
示例5: nbytes_plot
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def nbytes_plot(**kwargs):
data = {'name': [], 'left': [], 'right': [], 'center': [], 'color': [],
'percent': [], 'MB': [], 'text': []}
source = ColumnDataSource(data)
fig = figure(title='Memory Use', tools='', toolbar_location=None, **kwargs)
fig.quad(source=source, top=1, bottom=0,
left='left', right='right', color='color', alpha=0.8)
fig.text(source=source, x='center', y=0.5, text='text',
text_baseline='middle', text_align='center')
fig.grid.grid_line_color = None
fig.grid.grid_line_color = None
fig.axis.visible = None
fig.outline_line_color = None
hover = HoverTool()
fig.add_tools(hover)
hover = fig.select(HoverTool)
hover.tooltips = """
<div>
<span style="font-size: 14px; font-weight: bold;">Name:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@name</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">Percent:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@percent</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">MB:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@MB</span>
</div>
"""
hover.point_policy = 'follow_mouse'
return source, fig
示例6: tagsDistributionScatterPlot
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def tagsDistributionScatterPlot(NbTags, dates, plotname='Tags Distribution Plot'):
output_file(plotname + ".html")
counts = {}
glyphs = {}
desc = {}
hover = HoverTool()
plot = figure(plot_width=800, plot_height=800, x_axis_type="datetime", x_axis_label='Date', y_axis_label='Number of tags', tools=[hover])
for name in NbTags.keys():
desc[name] = []
for date in dates[name]:
desc[name].append(date_tools.datetimeToString(date, "%Y-%m-%d"))
counts[name] = plot.circle(dates[name], NbTags[name], legend="Number of events with y tags", source=ColumnDataSource(
data=dict(
desc=desc[name]
)
))
glyphs[name] = counts[name].glyph
glyphs[name].size = int(name) * 2
hover.tooltips = [("date", "@desc")]
if int(name) != 0:
glyphs[name].fill_alpha = 1/int(name)
show(plot)
示例7: lineChart
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def lineChart(df, xlabel, vFields, color=None, clustered=None, title=None):
ylabel = ','.join(v for v in vFields)
x = list(df[xlabel].values)
if df[xlabel].dtype == object:
p = figure(y_axis_label=ylabel, x_axis_label=xlabel, title=title, x_range=x, **self.get_common_figure_options())
else:
p = figure(y_axis_label=ylabel, x_axis_label=xlabel, title=title, **self.get_common_figure_options())
if clustered is not None:
colors = self.colorPalette(len(df[clustered].unique())) if color is None else color
df[clustered] = df[clustered].astype(str)
for j,c in enumerate(list(df[clustered].unique())) if clustered else enumerate([None]):
df2 = df[df[clustered] == c] if c else df
df2 = df2.drop(clustered, axis=1) if c else df2
for i,v in enumerate(vFields):
y = list(df2[v].values)
l = v if self.isSubplot() else c
p.line(x, y, line_width=2, color=colors[i] if self.isSubplot() else colors[j], legend=l if self.showLegend() else None)
else:
colors = self.colorPalette(len(vFields)) if color is None else color
for i,v in enumerate(vFields):
y = list(df[v].values)
p.line(x, y, line_width=2, color=colors[i], legend=v if self.showLegend() else None)
p.legend.location = "top_left"
hover = HoverTool()
hover.tooltips = [(xlabel, '@x'), (ylabel, '@y{0.00}'), ('x', '$x'), ('y', '$y')]
p.add_tools(hover)
return p
示例8: data_usage_plot
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def data_usage_plot(df):
def create_data_source(df):
return ColumnDataSource(data=dict(filesystem=df['filesystem'],total_size=df['total_size'],used=df['used'],available=df['available'],use_percent=df['use_percent'],mounted=['mounted'],submittime=[x.strftime("%Y-%m-%d") for x in df['submittime']]))
hover = HoverTool(names=['points'])
TOOLS = [BoxZoomTool(),PanTool(),ResetTool(),WheelZoomTool(),hover]
Colors = ['red','navy','olive','firebrick','lightskyblue','yellowgreen','lightcoral','yellow', 'green','blue','gold']
# Change percents to format bokeh can use
fp_list = []
for row in df['use_percent']:
fp_list.append(float(row.replace('%','')))
df['f_percent'] = fp_list
# Begin Plotting
x_max = datetime.now()
p = figure(height=500, width=1000, x_axis_type="datetime", x_range=((x_max-timedelta(14)),x_max), y_axis_label='Percent Full', tools=TOOLS, title='Data Usage by Filesystem')
# Points with hover info
p.scatter(x=df['submittime'], y=df['f_percent'], name='points', source=create_data_source(df), color='black', size=6)
df = df.groupby(by = ['filesystem'])
# Connecting lines
count = 0
for filesystem, group in df:
count += 1
p.line(x=group['submittime'] ,y=group['f_percent'], color=Colors[count], legend=str(filesystem), line_width=3)
# Formating
p.legend.orientation = "top_left"
hover.point_policy = "follow_mouse"
hover.tooltips = [("Filesystem", "@filesystem"),("Size","@total_size"),("Available","@available"),("Percent Used","@use_percent"),("Time","@submittime")]
return p
示例9: __init__
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def __init__(self, scheduler, **kwargs):
with log_errors():
self.scheduler = scheduler
self.source = ColumnDataSource({'occupancy': [0, 0],
'worker': ['a', 'b'],
'x': [0.0, 0.1],
'y': [1, 2],
'ms': [1, 2]})
fig = figure(title='Occupancy', tools='resize', id='bk-occupancy-plot',
x_axis_type='datetime', **kwargs)
fig.rect(source=self.source, x='x', width='ms', y='y', height=1,
color='blue')
fig.xaxis.minor_tick_line_alpha = 0
fig.yaxis.visible = False
fig.ygrid.visible = False
# fig.xaxis[0].formatter = NumeralTickFormatter(format='0.0s')
fig.x_range.start = 0
hover = HoverTool()
hover.tooltips = "@worker : @occupancy s"
hover.point_policy = 'follow_mouse'
fig.add_tools(hover)
self.root = fig
示例10: task_stream_plot
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def task_stream_plot(sizing_mode="scale_width", **kwargs):
data = {
"start": [],
"duration": [],
"key": [],
"name": [],
"color": [],
"worker": [],
"y": [],
"worker_thread": [],
"alpha": [],
}
source = ColumnDataSource(data)
x_range = DataRange1d(range_padding=0)
fig = figure(
x_axis_type="datetime",
title="Task stream",
tools="xwheel_zoom,xpan,reset,box_zoom",
toolbar_location="above",
sizing_mode=sizing_mode,
x_range=x_range,
id="bk-task-stream-plot",
**kwargs
)
fig.rect(
x="start",
y="y",
width="duration",
height=0.8,
fill_color="color",
line_color="color",
line_alpha=0.6,
alpha="alpha",
line_width=3,
source=source,
)
fig.xaxis.axis_label = "Time"
fig.yaxis.axis_label = "Worker Core"
fig.ygrid.grid_line_alpha = 0.4
fig.xgrid.grid_line_color = None
fig.min_border_right = 35
fig.yaxis[0].ticker.num_minor_ticks = 0
hover = HoverTool()
fig.add_tools(hover)
hover = fig.select(HoverTool)
hover.tooltips = """
<div>
<span style="font-size: 12px; font-weight: bold;">@name:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@duration</span>
<span style="font-size: 10px;">ms</span>
</div>
"""
hover.point_policy = "follow_mouse"
return source, fig
示例11: worker_table_plot
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def worker_table_plot(**kwargs):
""" Column data source and plot for host table """
with log_errors():
# names = ['host', 'cpu', 'memory_percent', 'memory', 'cores', 'processes',
# 'processing', 'latency', 'last-seen', 'disk-read', 'disk-write',
# 'network-send', 'network-recv']
names = ['processes', 'disk-read', 'cores', 'cpu', 'disk-write',
'memory', 'last-seen', 'memory_percent', 'host']
source = ColumnDataSource({k: [] for k in names})
columns = {name: TableColumn(field=name,
title=name.replace('_percent', ' %'))
for name in names}
cnames = ['host', 'cores', 'processes', 'memory', 'cpu', 'memory_percent']
formatters = {'cpu': NumberFormatter(format='0.0 %'),
'memory_percent': NumberFormatter(format='0.0 %'),
'memory': NumberFormatter(format='0 b'),
'latency': NumberFormatter(format='0.00000'),
'last-seen': NumberFormatter(format='0.000'),
'disk-read': NumberFormatter(format='0 b'),
'disk-write': NumberFormatter(format='0 b'),
'net-send': NumberFormatter(format='0 b'),
'net-recv': NumberFormatter(format='0 b')}
table = DataTable(source=source, columns=[columns[n] for n in cnames],
**kwargs)
for name in cnames:
if name in formatters:
table.columns[cnames.index(name)].formatter = formatters[name]
x_range = Range1d(0, 1)
y_range = Range1d(-.1, .1)
mem_plot = figure(title="Memory Usage (%)",
tools='box_select', height=90, width=600,
x_range=x_range, y_range=y_range, toolbar_location=None)
mem_plot.circle(source=source, x='memory_percent', y=0, size=10,
alpha=0.5)
mem_plot.yaxis.visible = False
mem_plot.xaxis.minor_tick_line_width = 0
mem_plot.ygrid.visible = False
mem_plot.xaxis.minor_tick_line_alpha = 0
hover = HoverTool()
mem_plot.add_tools(hover)
hover = mem_plot.select(HoverTool)
hover.tooltips = """
<div>
<span style="font-size: 10px; font-family: Monaco, monospace;">@host: </span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@memory_percent</span>
</div>
"""
hover.point_policy = 'follow_mouse'
return source, [mem_plot, table]
示例12: progress_plot
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def progress_plot(height=300, width=800, **kwargs):
from ..diagnostics.progress_stream import progress_quads
data = progress_quads({'all': {}, 'in_memory': {},
'erred': {}, 'released': {}})
source = ColumnDataSource(data)
fig = figure(width=width, height=height, tools=['resize'],
responsive=True, **kwargs)
fig.quad(source=source, top='top', bottom='bottom',
left=0, right=1, color='#aaaaaa', alpha=0.2)
fig.quad(source=source, top='top', bottom='bottom',
left=0, right='released_right', color='#0000FF', alpha=0.4)
fig.quad(source=source, top='top', bottom='bottom',
left='released_right', right='in_memory_right',
color='#0000FF', alpha=0.8)
fig.quad(source=source, top='top', bottom='bottom',
left='erred_left', right=1,
color='#000000', alpha=0.3)
fig.text(source=source, text='fraction', y='center', x=-0.01,
text_align='right', text_baseline='middle')
fig.text(source=source, text='name', y='center', x=1.01,
text_align='left', text_baseline='middle')
fig.scatter(x=[-0.2, 1.4], y=[0, 5], alpha=0)
fig.xgrid.grid_line_color = None
fig.ygrid.grid_line_color = None
fig.axis.visible = None
fig.min_border_left = 0
fig.min_border_right = 10
fig.min_border_top = 0
fig.min_border_bottom = 0
fig.outline_line_color = None
hover = HoverTool()
fig.add_tools(hover)
hover = fig.select(HoverTool)
hover.tooltips = """
<div>
<span style="font-size: 14px; font-weight: bold;">Name:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@name</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">All:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@all</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">In Memory:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@in_memory</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">Erred:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@erred</span>
</div>
"""
hover.point_policy = 'follow_mouse'
return source, fig
示例13: progress_plot
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def progress_plot(**kwargs):
from ..diagnostics.progress_stream import progress_quads
data = progress_quads({'all': {}, 'in_memory': {},
'erred': {}, 'released': {}})
x_range = Range1d(-0.5, 1.5)
y_range = Range1d(5.1, -0.1)
source = ColumnDataSource(data)
fig = figure(tools='', toolbar_location=None, y_range=y_range, x_range=x_range, **kwargs)
fig.quad(source=source, top='top', bottom='bottom',
left=0, right=1, color='#aaaaaa', alpha=0.2)
fig.quad(source=source, top='top', bottom='bottom',
left=0, right='released_right', color=Spectral9[0], alpha=0.4)
fig.quad(source=source, top='top', bottom='bottom',
left='released_right', right='in_memory_right',
color=Spectral9[0], alpha=0.8)
fig.quad(source=source, top='top', bottom='bottom',
left='erred_left', right=1,
color='#000000', alpha=0.3)
fig.text(source=source, text='fraction', y='center', x=-0.01,
text_align='right', text_baseline='middle')
fig.text(source=source, text='name', y='center', x=1.01,
text_align='left', text_baseline='middle')
fig.xgrid.grid_line_color = None
fig.ygrid.grid_line_color = None
fig.axis.visible = None
fig.outline_line_color = None
hover = HoverTool()
fig.add_tools(hover)
hover = fig.select(HoverTool)
hover.tooltips = """
<div>
<span style="font-size: 14px; font-weight: bold;">Name:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@name</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">All:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@all</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">In Memory:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@in_memory</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">Erred:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@erred</span>
</div>
"""
hover.point_policy = 'follow_mouse'
return source, fig
示例14: progress_plot
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def progress_plot(**kwargs):
with log_errors():
from ..diagnostics.progress_stream import progress_quads
data = progress_quads({'all': {}, 'memory': {},
'erred': {}, 'released': {}})
y_range = Range1d(-8, 0)
source = ColumnDataSource(data)
fig = figure(tools='', toolbar_location=None, y_range=y_range, **kwargs)
fig.quad(source=source, top='top', bottom='bottom',
left='left', right='right', color='#aaaaaa', alpha=0.2)
fig.quad(source=source, top='top', bottom='bottom',
left='left', right='released-loc', color=Spectral9[0], alpha=0.4)
fig.quad(source=source, top='top', bottom='bottom',
left='released-loc', right='memory-loc', color=Spectral9[0], alpha=0.8)
fig.quad(source=source, top='top', bottom='bottom',
left='erred-loc', right='erred-loc', color='#000000', alpha=0.3)
fig.text(source=source, text='show-name', y='bottom', x='left',
x_offset=5, text_font_size='10pt')
fig.text(source=source, text='done', y='bottom', x='right', x_offset=-5,
text_align='right', text_font_size='10pt')
fig.xaxis.visible = False
fig.yaxis.visible = False
fig.grid.grid_line_alpha = 0
hover = HoverTool()
fig.add_tools(hover)
hover = fig.select(HoverTool)
hover.tooltips = """
<div>
<span style="font-size: 14px; font-weight: bold;">Name:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@name</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">All:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@all</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">Memory:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@memory</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">Erred:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@erred</span>
</div>
"""
hover.point_policy = 'follow_mouse'
return source, fig
示例15: progress_plot
# 需要导入模块: from bokeh.models import HoverTool [as 别名]
# 或者: from bokeh.models.HoverTool import tooltips [as 别名]
def progress_plot(**kwargs):
with log_errors():
from ..diagnostics.progress_stream import progress_quads
data = progress_quads({"all": {}, "memory": {}, "erred": {}, "released": {}})
y_range = Range1d(-8, 0)
source = ColumnDataSource(data)
fig = figure(tools="", toolbar_location=None, y_range=y_range, id="bk-progress-plot", **kwargs)
fig.quad(source=source, top="top", bottom="bottom", left="left", right="right", color="#aaaaaa", alpha=0.2)
fig.quad(source=source, top="top", bottom="bottom", left="left", right="released-loc", color="color", alpha=0.6)
fig.quad(
source=source, top="top", bottom="bottom", left="released-loc", right="memory-loc", color="color", alpha=1
)
fig.quad(
source=source, top="top", bottom="bottom", left="erred-loc", right="erred-loc", color="#000000", alpha=0.3
)
fig.text(source=source, text="show-name", y="bottom", x="left", x_offset=5, text_font_size="10pt")
fig.text(
source=source, text="done", y="bottom", x="right", x_offset=-5, text_align="right", text_font_size="10pt"
)
fig.xaxis.visible = False
fig.yaxis.visible = False
fig.grid.grid_line_alpha = 0
hover = HoverTool()
fig.add_tools(hover)
hover = fig.select(HoverTool)
hover.tooltips = """
<div>
<span style="font-size: 14px; font-weight: bold;">Name:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@name</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">All:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@all</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">Memory:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@memory</span>
</div>
<div>
<span style="font-size: 14px; font-weight: bold;">Erred:</span>
<span style="font-size: 10px; font-family: Monaco, monospace;">@erred</span>
</div>
"""
hover.point_policy = "follow_mouse"
return source, fig