docs: def _chart_support(self, name, data, caller, **kwargs):
          "template chart support function"
          id = 'chart-%s' % next(self.id)
          name = self._chart_class_name(name)
          options = dict(self.environment.options)
          options.update(name=name, id=id)
  
          # jinja2 prepends 'l_' or 'l_{{ n }}'(ver>=2.9) to keys
          if jinja2.__version__ >= '2.9':
              kwargs = dict((k[4:], v) for (k, v) in kwargs.items())
          else:
              kwargs = dict((k[2:], v) for (k, v) in kwargs.items())
  
          if self._library is None:
              self._library = self.load_library()
          id = kwargs.get('id', '')
          library = self._library.get(id, {})
  
          # apply options from a tag
          library.update(kwargs.get('library', {}))
          # apply options from chartkick.json
          kwargs.update(library=library)
  
          options.update(kwargs)
          return CHART_HTML.format(data=data, options=json.dumps(kwargs),
                                   **options)