Axis percentage formatter that adapts to scale / zoom?

I’m trying to get an axis to display values as percentages at different levels of decimal points appropriate to how much the user zooms in. The BasicTickFormatter works well in this way except I can’t work out how to make it show in percentages without NumeralTickFormatter(format="0%"), which makes the number of decimal points constant.

I’ve got a line graph where y values are vastly different and extremely close at different points along the x axis. Comparisons at default zoom and when closely zoomed in are of interest. So when zoomed out I’d like it to say ##% and when zoomed in I’d like it to say ##.###%. Is this possible?

Here’s a simple demonstration:

from io import StringIO
import pandas as pd
from bokeh.plotting import figure, show
from bokeh.palettes import Category20_20
from bokeh.models import NumeralTickFormatter, WheelZoomTool

df = pd.read_csv(StringIO("""Year	New_ID	Peak_change
1980	1	0.99423
1980	2	0.995478
1980	3	0.991417
1980	4	0.971417
1980	5	0.891417
1990	1	0.9942
1990	2	0.996124
1990	3	0.98218
1990	4	0.970161
1990	5	0.820106
2000	1	0.995261
2000	2	0.996065
2000	3	0.995065
2000	4	0.964873
2000	5	0.768173"""), sep='\t')

p = figure()
for (name, group), color in zip(df.groupby('Year'), Category20_20):
    p.line(x=group.New_ID, y=group.Peak_change, legend_label=str(name), line_color=color)
p.yaxis[0].formatter = NumeralTickFormatter(format="0%")

wheel_zoom_tool = WheelZoomTool()
p.add_tools(wheel_zoom_tool)
p.toolbar.active_scroll = wheel_zoom_tool

show(p)