The reason assigning to is_major doesn't work is because two other pygal modules import is_major
into their local namepace before you assign to it.
from pygal.util import deg, cached_property, compute_scale, is_major
And the pygal.graph.graph module:
from pygal.util import (
is_major, truncate, reverse_text_len, get_texts_box, cut, rad, decorate)
If you can monkey path the is_major
function before importing either of those modules, it should work. If you can't, you may be able to reload the graph modules after monkey patching.
Something like this:
import pygal.util
import pygal.graph
import pygal.graph.radar
pygal.util.is_major = my_function
reload(pygal.graph)
reload(pygal.graph.radar)