class_docstr: Chart public functions
class_docstr_tok: ["Chart","public","functions"]
docstr: Render the graph, convert it to png and write it to filename
docstr_tok: ["Render","the","graph",",","convert","it","to","png","and","write","it","to","filename"]
code: def render_to_png(self, filename=None, dpi=72, **kwargs):
      """Render the graph, convert it to png and write it to filename"""
      import cairosvg
  
      return cairosvg.svg2png(
          bytestring=self.render(**kwargs), write_to=filename, dpi=dpi
      )
  
imports: import base64
  import io
  from pygal._compat import is_list_like
  from pygal.graph.base import BaseGraph
label_desc: Use image node_id 13 for calling the PublicApi obj's underlying member method code with example usage: obj.render_to_png(filename, dpi) and returns: cairosvg