class_docstr: `Page` A container object to present multiple charts vertically in a single page
class_docstr_tok: ["`","Page","`","A","container","object","to","present","multiple","charts","vertically","in","a","single","page"]
code: def save_resize_html(
      source: str = "render.html",
      *,
      cfg_file: types.Optional[str] = None,
      cfg_dict: types.Optional[list] = None,
      dest: str = "resize_render.html",
  ) -> str:
      with open(source, "r", encoding="utf8") as f:
          html = f.read()
  
      charts = []
      if cfg_dict is None and cfg_file is None:
          raise ValueError("Chart layout config is empty")
  
      if cfg_file:
          with open(cfg_file, "r", encoding="utf8") as f:
              charts = json.load(f)
  
      if cfg_dict:
          charts = cfg_dict
  
      for chart in charts:
          s = (
              '<div id="{cid}" class="chart-container" style="position: absolute; '
              'width: {width}; height: {height}; top: {top}; left: {left};">'.format(
                  cid=chart["cid"],
                  width=chart["width"],
                  height=chart["height"],
                  top=chart["top"],
                  left=chart["left"],
              )
          )
          html = re.sub(
              '<div id="{}" class="chart-container" style="(.*?)">'.format(
                  chart["cid"]
              ),
              s,
              html,
          )
          html = re.sub(
              "'border-width', '1px'", "'border-width', '0px'", html
          )
          html = re.sub(
              r'<button onclick="downloadCfg\(\)">Save Config</button>',
              "",
              html,
          )
          html = re.sub(r".resizable\(\).draggable\(\)", "", html)
  
      with open(dest, "w+", encoding="utf8") as f:
          f.write(html)
  
      return html
  
imports: import json
  import re
  import uuid
  from jinja2 import Environment
  from ...None import types
  from ...commons import utils
  from ...globals import CurrentConfig, ThemeType
  from ...options import PageLayoutOpts
  from ...render import engine
  from ..mixins import CompositeMixin
label_desc: Use image node_id 8 for calling the Page obj's underlying member method code with example usage: obj.save_resize_html(source) and returns: html