docstr: Render a chart or page to local html files.
  
  :param chart: A Chart or Page object
  :param path: The destination file which the html code write to
  :param template_name: The name of template file.
docstr_tok: ["Render","a","chart","or","page","to","local","html","files",".",":","param","chart",":","A","Chart","or","Page","object",":","param","path",":","The","destination","file","which","the","html","code","write","to",":","param","template_name",":","The","name","of","template","file","."]
code: def render_chart_to_file(
      self, template_name: str, chart: Any, path: str, **kwargs
  ):
      """
      Render a chart or page to local html files.
  
      :param chart: A Chart or Page object
      :param path: The destination file which the html code write to
      :param template_name: The name of template file.
      """
      tpl = self.env.get_template(template_name)
      html = utils.replace_placeholder(
          tpl.render(chart=self.generate_js_link(chart), **kwargs)
      )
      write_utf8_html_file(path, html)
  
file_path: pyecharts/pyecharts/render/engine.py
imports: import os
  from jinja2 import Environment
  from ..commons import utils
  from ..datasets import EXTRA, FILENAMES
  from ..globals import CurrentConfig, NotebookType
  from ..types import Any, Optional
  from .display import HTML, Javascript
label_desc: Use image node_id 3 for calling the RenderEngine obj's underlying member method code with example usage: obj.render_chart_to_file(template_name, chart, path) without return types