parameters: (self, table, itemname, stats, attrs, link=None)
docstring: Adds a bar graph to the element.  This is a series of <td> elements.
  
      Args:
        table: Table to add item to.
        itemname: Name of item.
        stats: Stats object.
        attrs: Attributes dictionary; if None, no attributes will be printed.
        link: Destination for itemname hyperlink, if not None.
docstring_summary: Adds a bar graph to the element.  This is a series of <td> elements.
docstring_tokens: Adds a bar graph to the element . This is a series of <td > elements .
function: def AddItem(self, table, itemname, stats, attrs, link=None):
      """Adds a bar graph to the element.  This is a series of <td> elements.
  
      Args:
        table: Table to add item to.
        itemname: Name of item.
        stats: Stats object.
        attrs: Attributes dictionary; if None, no attributes will be printed.
        link: Destination for itemname hyperlink, if not None.
      """
      row = table.E('tr')
  
      # Add item name
      if itemname is not None:
        item_elem = row.E('td')
        if link is not None:
          item_elem = item_elem.E('a', href=link)
        item_elem.Text(itemname)
  
      # Get stats
      stat_exe = stats.get('lines_executable', 0)
      stat_ins = stats.get('lines_instrumented', 0)
      stat_cov = stats.get('lines_covered', 0)
  
      percent = row.E('td')
  
      # Add text
      row.E('td', e_class='number').Text(stat_cov)
      row.E('td', e_class='number').Text(stat_ins)
      row.E('td', e_class='number').Text(stat_exe - stat_ins)
  
      # Add percent and graph; only fill in if there's something in there
      graph = row.E('td', e_class='graph', width=100)
      if stat_exe:
        percent_cov = 100.0 * stat_cov / stat_exe
        percent_ins = 100.0 * stat_ins / stat_exe
  
        # Color percent based on thresholds
        percent.Text('%.1f%%' % percent_cov)
        if percent_cov >= 80:
          percent.element.setAttribute('class', 'high_pct')
        elif percent_cov >= 60:
          percent.element.setAttribute('class', 'mid_pct')
        else:
          percent.element.setAttribute('class', 'low_pct')
  
        # Graphs use integer values
        percent_cov = int(percent_cov)
        percent_ins = int(percent_ins)
  
        graph.Text('.')
        graph.E('span', style='padding-left:%dpx' % percent_cov,
                e_class='g_covered')
        graph.E('span', style='padding-left:%dpx' % (percent_ins - percent_cov),
                e_class='g_instr')
        graph.E('span', style='padding-left:%dpx' % (100 - percent_ins),
                e_class='g_missing')
  
      if attrs:
        row.E('td', e_class='stat').Text(attrs.get('language'))
        row.E('td', e_class='stat').Text(attrs.get('group'))
      else:
        row.E('td', colspan=2)
function_tokens: def AddItem ( self , table , itemname , stats , attrs , link = None ) : row = table . E ( 'tr' ) # Add item name if itemname is not None : item_elem = row . E ( 'td' ) if link is not None : item_elem = item_elem . E ( 'a' , href = link ) item_elem . Text ( itemname ) # Get stats stat_exe = stats . get ( 'lines_executable' , 0 ) stat_ins = stats . get ( 'lines_instrumented' , 0 ) stat_cov = stats . get ( 'lines_covered' , 0 ) percent = row . E ( 'td' ) # Add text row . E ( 'td' , e_class = 'number' ) . Text ( stat_cov ) row . E ( 'td' , e_class = 'number' ) . Text ( stat_ins ) row . E ( 'td' , e_class = 'number' ) . Text ( stat_exe - stat_ins ) # Add percent and graph; only fill in if there's something in there graph = row . E ( 'td' , e_class = 'graph' , width = 100 ) if stat_exe : percent_cov = 100.0 * stat_cov / stat_exe percent_ins = 100.0 * stat_ins / stat_exe # Color percent based on thresholds percent . Text ( '%.1f%%' % percent_cov ) if percent_cov >= 80 : percent . element . setAttribute ( 'class' , 'high_pct' ) elif percent_cov >= 60 : percent . element . setAttribute ( 'class' , 'mid_pct' ) else : percent . element . setAttribute ( 'class' , 'low_pct' ) # Graphs use integer values percent_cov = int ( percent_cov ) percent_ins = int ( percent_ins ) graph . Text ( '.' ) graph . E ( 'span' , style = 'padding-left:%dpx' % percent_cov , e_class = 'g_covered' ) graph . E ( 'span' , style = 'padding-left:%dpx' % ( percent_ins - percent_cov ) , e_class = 'g_instr' ) graph . E ( 'span' , style = 'padding-left:%dpx' % ( 100 - percent_ins ) , e_class = 'g_missing' ) if attrs : row . E ( 'td' , e_class = 'stat' ) . Text ( attrs . get ( 'language' ) ) row . E ( 'td' , e_class = 'stat' ) . Text ( attrs . get ( 'group' ) ) else : row . E ( 'td' , colspan = 2 )