def render(self, data, chart_type, options=None, div_id="<STR_LIT>", head="<STR_LIT>"):
if not self.is_valid_name(div_id):<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>".format(<EOL>div_id))<EOL><DEDENT>return Template(head + self.template).render(<EOL>div_id=div_id.replace("<STR_LIT:U+0020>", "<STR_LIT:_>"),<EOL>data=json.dumps(<EOL>data, indent=<NUM_LIT:4>).replace("<STR_LIT:'>", "<STR_LIT>").replace('<STR_LIT:">', "<STR_LIT:'>"),<EOL>chart_type=chart_type,<EOL>options=json.dumps(<EOL>options, indent=<NUM_LIT:4>).replace("<STR_LIT:'>", "<STR_LIT>").replace('<STR_LIT:">', "<STR_LIT:'>"))<EOL>
Render the data in HTML template.