Build the HTML representation for IPython.
(self)
| 112 | ) |
| 113 | |
| 114 | def html(self): |
| 115 | """Build the HTML representation for IPython.""" |
| 116 | id = random.randint(0, 2**16) |
| 117 | html = '<div id="vis%d"></div>' % id |
| 118 | html += "<script>\n" |
| 119 | html += VEGA_TEMPLATE % (json.dumps(self.specification), id) |
| 120 | html += "</script>\n" |
| 121 | return html |
| 122 | |
| 123 | def _repr_html_(self): |
| 124 | return self.html() |
no outgoing calls
no test coverage detected