MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / render

Method render

openlibrary/plugins/admin/graphs.py:43–50  ·  view source on GitHub ↗

Renders the graphs as an img tag. Usage in templates: $:g.render(yLimit=100, width=300, height=400)

(self, **options)

Source from the content-addressed store, hash-verified

41 return options
42
43 def render(self, **options):
44 """Renders the graphs as an img tag.
45
46 Usage in templates:
47
48 $:g.render(yLimit=100, width=300, height=400)
49 """
50 return f'<img src="{get_graphite_base_url()}/render/?{urllib.parse.urlencode(self.get_queryparams(**options), doseq=True)}"/>'
51
52
53class Series:

Callers

nothing calls this directly

Calls 2

get_queryparamsMethod · 0.95
get_graphite_base_urlFunction · 0.85

Tested by

no test coverage detected