def save(self,<EOL>data,<EOL>chart_type,<EOL>chart_package='<STR_LIT>',<EOL>options=None,<EOL>filename='<STR_LIT>',<EOL>overwrite=True):
html = self.render(<EOL>data=data,<EOL>chart_type=chart_type,<EOL>chart_package=chart_package,<EOL>options=options,<EOL>div_id=filename,<EOL>head=self.head)<EOL>if overwrite:<EOL><INDENT>with open(filename.replace("<STR_LIT:U+0020>", "<STR_LIT:_>") + '<STR_LIT>', '<STR_LIT:w>') as f:<EOL><INDENT>f.write(html)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if not os.path.exists(filename.replace("<STR_LIT:U+0020>", "<STR_LIT:_>") + '<STR_LIT>'):<EOL><INDENT>with open(filename.replace("<STR_LIT:U+0020>", "<STR_LIT:_>") + '<STR_LIT>', '<STR_LIT:w>') as f:<EOL><INDENT>f.write(html)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise IOError('<STR_LIT>')<EOL><DEDENT><DEDENT>
Save the rendered html to a file in the same directory as the notebook.