code: def get_chart(chart_type, time_span=None, rolling_average=None, api_code=None):
      
  
      resource = 'charts/' + chart_type + '?format=json'
      if time_span is not None:
          resource += '&timespan=' + time_span
      if rolling_average is not None:
          resource += '&rollingAverage=' + rolling_average
      if api_code is not None:
          resource += '&api_code=' + api_code
      response = util.call_api(resource)
      json_response = json.loads(response)
      return Chart(json_response)
docs: Get chart data of a specific chart type.
  
      :param str chart_type: type of chart
      :param str time_span: duration of the chart.
      Default is 1 year for most charts, 1 week for mempool charts (optional)
      (Example: 5weeks)
      :param str rolling_average: duration over which the data should be averaged (optional)
      :param str api_code: Blockchain.info API code (optional)
      :return: an instance of :class:`Chart` class