☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Hover data labels for bar charts

Community Support
silviaegt
silviaegt

I am following the Olympic Medals by Country example to create a grouped bar chart.

I pulled the data from my json like this:

members = np.array([statdata[a][‘members’] for a in assocsort], dtype=np.float)
maxim = np.array([statdata[a][‘maxim’] for a in assocsort], dtype=np.float)
mean = np.array([statdata[a][‘mean’] for a in assocsort], dtype=np.float)

``

and I used it to create this figure

p2 = figure(title='Mexican Literary Assoc. members\' co-occurrence', tools="save,resize,box_zoom,reset", x_range=assocsort, y_range=[0, max([maxim.max(), mean.max(), members.max()])], background_fill=None, plot_width=800, plot_height=400) p2.add_tools(HoverTool(tooltips=[("assoc.", " $x"),("result", " $y{int}")]))

However, when I hover over each bar I get all the values along the y-axis and I would like to get only their top-values (that is, the height of the bar)

⌁   Link to post

End of archived discussion · Replies are disabled