python 3.x - Missing value on a Bar chart tooltip -


this question has answer here:

i having problem bokeh bar chart. here code:

from bkcharts import bar bokeh.models import factorrange  # make bokeh push push output jupyter notebook. bokeh.io import push_notebook, show, output_notebook bokeh.resources import inline output_notebook(resources=inline)  bokeh.models import hovertool  data = {     'name' : [chan['name'] chan in full_channels_info],     'members' : [chan['num_members'] chan in full_channels_info] }  hover = hovertool(tooltips=[     ("channel", "@name"),     ("users", "@members"), ])  chart = bar(data, values='members', label='name',       title="channels population", plot_width=1000, xlabel="channel", ylabel="members",             legend=none, tools=[hover])  show(chart) 

the problem being when hover on 1 of bars, tooltip looks this:

enter image description here

the issue in hovertool() should refer @height instead of @members.

hover = hovertool(tooltips=[     ("channel", "@name"),     ("users", "@height"), ]) 

Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -