def render(self,<EOL>data,<EOL>chart_type,<EOL>options=None,<EOL>div_id="<STR_LIT>",<EOL>head="<STR_LIT>",<EOL>w=<NUM_LIT>,<EOL>h=<NUM_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>w=w,<EOL>h=h)<EOL>
Render the data in HTML template.