I am trying to add a hover tool that has a custom tooltip:
hover = HoverTool(
tooltips=[
(“Funding”, “(@y{int})”)
]
)
However, when I add the hover tool to the list of tools associated with the plot I get a default tooltip associated with the HoverTool rather than my tooltip. I am adding the HoverTool as follows:
p3.add_tools(hover())
Could someone please tell me what I am doing wrong?
Can you tell me where you saw an example or reference for the "{int}" syntax you are using? I am not sure that that is valid syntax, which might be an issue. Otherwise it looks fine, can you try it without the "{int}" and see if it makes a difference? And if not, can you provide a complete minimal example that can be run that demonstrates the issue?
However, when I add the hover tool to the list of tools associated with the plot I get a default tooltip associated with the HoverTool rather than my tooltip. I am adding the HoverTool as follows:
p3.add_tools(hover())
Could someone please tell me what I am doing wrong?
Thanks for your note. This seems to be getting more complicated… I tried running the script on another computer and am now getting a different error (below). Seems like something is wrong with the add_tools function or there is a problem with duplication of the name ‘hover’?
File “/Users/davidkynor/anaconda/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py”, line 699, in runfile
execfile(filename, namespace)
File “/Users/davidkynor/anaconda/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py”, line 81, in execfile
builtins.execfile(filename, *where)
File “/Users/davidkynor/Desktop/DBK Project Funding/dbkFinance.py”, line 125, in
p3.add_tools(hover())
TypeError: ‘HoverTool’ object is not callable
This error occurs both with and without the {int} specification. The original code did not change…
···
On Wednesday, December 30, 2015 at 8:17:23 PM UTC-5, [email protected] wrote:
I am trying to add a hover tool that has a custom tooltip:
hover = HoverTool(
tooltips=[
(“Funding”, “(@y{int})”)
]
)
However, when I add the hover tool to the list of tools associated with the plot I get a default tooltip associated with the HoverTool rather than my tooltip. I am adding the HoverTool as follows:
p3.add_tools(hover())
Could someone please tell me what I am doing wrong?
On Wednesday, December 30, 2015 at 8:17:23 PM UTC-5, [email protected] wrote:
I am trying to add a hover tool that has a custom tooltip:
hover = HoverTool(
tooltips=[
(“Funding”, “(@y{int})”)
]
)
However, when I add the hover tool to the list of tools associated with the plot I get a default tooltip associated with the HoverTool rather than my tooltip. I am adding the HoverTool as follows:
p3.add_tools(hover())
Could someone please tell me what I am doing wrong?
I had assumed that was a typo in your earlier message (because you would see exactly the situation you are reporting now). "hover = HoverTool(...)" creates a hover tool object, so "hover" is a instance of a HoverTool object, which is not a callable function. You just should pass it directly to .add_tools()
Thanks for your note. This seems to be getting more complicated.... I tried running the script on another computer and am now getting a different error (below). Seems like something is wrong with the add_tools function or there is a problem with duplication of the name 'hover'?
File "/Users/davidkynor/anaconda/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 699, in runfile
execfile(filename, namespace)
File "/Users/davidkynor/anaconda/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 81, in execfile
builtins.execfile(filename, *where)
File "/Users/davidkynor/Desktop/DBK Project Funding/dbkFinance.py", line 125, in <module>
p3.add_tools(hover())
TypeError: 'HoverTool' object is not callable
This error occurs both with and without the {int} specification. The original code did not change......
On Wednesday, December 30, 2015 at 8:17:23 PM UTC-5, d...@creare.com wrote:
I am trying to add a hover tool that has a custom tooltip:
However, when I add the hover tool to the list of tools associated with the plot I get a default tooltip associated with the HoverTool rather than my tooltip. I am adding the HoverTool as follows:
p3.add_tools(hover())
Could someone please tell me what I am doing wrong?
Thanks! It looks like the project is big enough that even I don't know about some things. Would you mind making an issue on GitHub to ask that this be documented this better?
However, when I add the hover tool to the list of tools associated with the plot I get a default tooltip associated with the HoverTool rather than my tooltip. I am adding the HoverTool as follows:
p3.add_tools(hover())
Could someone please tell me what I am doing wrong?
Will open an issue on github requested better documentation when I’m back in the office next week.
Happy New Year!
-Dave
···
On Wednesday, December 30, 2015 at 8:17:23 PM UTC-5, [email protected] wrote:
I am trying to add a hover tool that has a custom tooltip:
hover = HoverTool(
tooltips=[
(“Funding”, “(@y{int})”)
]
)
However, when I add the hover tool to the list of tools associated with the plot I get a default tooltip associated with the HoverTool rather than my tooltip. I am adding the HoverTool as follows:
p3.add_tools(hover())
Could someone please tell me what I am doing wrong?