Skip to content Skip to sidebar Skip to footer

How To Get On Hover Animation Of Pygal Graphs In Ipython On Mac Osx

I have just started using pygal in ipython after installing CairoSVG with pip and Cairo with homebrew. The graphs render but when I hover over them there is no interactivity (disp

Solution 1:

I stumbled across this issue today. It's the result of a slight typo in the pygal config file.

Fortunately it's simple to fix. Open the config.py file in the pygal directory and add http to the kozea github url as follows:

    js = Key(
    ('http://kozea.github.io/pygal.js/2.0.x/pygal-tooltips.min.js',),
    list, "Misc", "List of js file",
    "It can be any uri from file:///tmp/ext.js to //domain/ext.js",
    str)

That should fix it.


Solution 2:

I had the same problem, but after checking the code on git, the better solution would be not to change the config.py file, but instead add

force_uri_protocol='https'

as a parameter to your rendering function, e.g.

chart.render_to_file(output_file, force_uri_protocol='https')


Post a Comment for "How To Get On Hover Animation Of Pygal Graphs In Ipython On Mac Osx"