parameters: (data='1,2,3',names='a,b,c',width=300,height=150,align='center')
return_statement: return XML('<img src="http://chart.apis.google.com/chart?chxt=x,y&cht=bvs&chd=s:cEj9U&chls=2.0&chs=%(width)sx%(height)s&chxl=0:|%(names)s&chd=t:%(data)s" align="%(align)s">' % dict(data=data,width=width,height=height,names=names,align=align))
docstring: ## Uses Google charting API to embed a bar chart
          - ``data`` is a list of comma separated values 
          - ``names`` is a list of comma separated labels (one for data item)
          - ``width`` is the width of the image
          - ``height`` is the height of the image
          - ``align`` determines the alignment of the image
docstring_summary: ## Uses Google charting API to embed a bar chart
          - ``data`` is a list of comma separated values 
          - ``names`` is a list of comma separated labels (one for data item)
          - ``width`` is the width of the image
          - ``height`` is the height of the image
          - ``align`` determines the alignment of the image
docstring_tokens: ## Uses Google charting API to embed a bar chart - data is a list of comma separated values - names is a list of comma separated labels ( one for data item ) - width is the width of the image - height is the height of the image - align determines the alignment of the image
function: def bar_chart(data='1,2,3',names='a,b,c',width=300,height=150,align='center'):
          """
          ## Uses Google charting API to embed a bar chart
          - ``data`` is a list of comma separated values 
          - ``names`` is a list of comma separated labels (one for data item)
          - ``width`` is the width of the image
          - ``height`` is the height of the image
          - ``align`` determines the alignment of the image
          """
          if isinstance(data,str):
              data = data.replace(' ','')
          elif isinstance(data,dict):
              data = '|'.join(','.join(str(y) for y in s) for s in data.values())
          elif isinstance(data,list):
              data = ','.join(str(y) for y in data)
          if isinstance(names,str):
              names = '|'.join(name.strip() for name in names.split(','))
          else:
              names = '|'.join(name for name in names)
          height=int(width)/2
          return XML('<img src="http://chart.apis.google.com/chart?chxt=x,y&cht=bvs&chd=s:cEj9U&chls=2.0&chs=%(width)sx%(height)s&chxl=0:|%(names)s&chd=t:%(data)s" align="%(align)s">' % dict(data=data,width=width,height=height,names=names,align=align))
function_tokens: def bar_chart ( data = '1,2,3' , names = 'a,b,c' , width = 300 , height = 150 , align = 'center' ) : if isinstance ( data , str ) : data = data . replace ( ' ' , '' ) elif isinstance ( data , dict ) : data = '|' . join ( ',' . join ( str ( y ) for y in s ) for s in data . values ( ) ) elif isinstance ( data , list ) : data = ',' . join ( str ( y ) for y in data ) if isinstance ( names , str ) : names = '|' . join ( name . strip ( ) for name in names . split ( ',' ) ) else : names = '|' . join ( name for name in names ) height = int ( width ) / 2 return XML ( '<img src="http://chart.apis.google.com/chart?chxt=x,y&cht=bvs&chd=s:cEj9U&chls=2.0&chs=%(width)sx%(height)s&chxl=0:|%(names)s&chd=t:%(data)s" align="%(align)s">' % dict ( data = data , width = width , height = height , names = names , align = align ) )