On Jun 11, 2015, at 6:26 PM, Sarah Bird <sbird@alum.mit.edu> wrote:
Try:
p.line('x', 'y', legend=[str(language)], size=10, line_color=colors.pop(), source=source)
And you definitely want @ as the prefix for all the fields.
Cheers,
Bird
On Thu, Jun 11, 2015 at 11:00 PM, piqo <piqoni@gmail.com> wrote:
Hi,
How do I show the line name (language variable, in my case) when hovering on a line chart?
Using hover, I can see X, and Y values, but no line name (indicator). It simply shows ??? (or when I use @language it shows single characters of the language names)
My hover is:
languages = ['English', 'German', 'Portugese']
hover = HoverTool(
tooltips = """
<div>
<span>$language</span>
<span>[$index]</span>
</div>
<div>
<span>Location</span>
<span>($x, $y)</span>
</div>
"""
)
for language in languages:
# I fill here x, y lists with data for each language appropriately...
source = ColumnDataSource(
data=dict(
x=x,
y=y,
language=language,
)
)
p.line('x', 'y', legend=str(language), size=10, line_color=colors.pop(), source=source)
--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/71a2ed03-eb26-4e79-858d-abfcd428481a%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CA%2BEr%2BdRLSXDQVYZutw3JQSEAJo%3DEHFRJPLKaxN%3DO_U-NJNqh1g%40mail.gmail.com\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.