code: def chart(colors, data, args, labels):
      
      len_categories = len(data[0])
      if len_categories > 1:
          # Stacked graph
          if args['stacked']:
              normal_dat = normalize(data, args['width'])
              stacked_graph(labels, data, normal_dat, len_categories,
                            args, colors)
              return
  
          if not colors:
              colors = [None] * len_categories
  
          # Multiple series graph with different scales
          # Normalization per category
          if args['different_scale']:
              for i in range(len_categories):
                  cat_data = []
                  for dat in data:
                      cat_data.append([dat[i]])
  
                  # Normalize data, handle negatives.
                  normal_cat_data = normalize(cat_data, args['width'])
  
                  # Generate data for a row.
                  for row in horiz_rows(labels, cat_data, normal_cat_data,
                                        args, [colors[i]]):
                      # Print the row
                      if not args['vertical']:
                          print_row(*row)
                      else:
                          vertic = vertically(*row, args=args)
  
                  # Vertical graph
                  if args['vertical']:
                      print_vertical(vertic, labels, colors[i], args)
  
                  print()
                  value_list.clear(), zipped_list.clear(), vertical_list.clear()
                  return
  
      # One category/Multiple series graph with same scale
      # All-together normalization
      if not args['stacked']:
          normal_dat = normalize(data, args['width'])
          for row in horiz_rows(labels, data, normal_dat, args, colors):
              if not args['vertical']:
                  print_row(*row)
              else:
                  vertic = vertically(*row, args=args)
  
          if args['vertical'] and len_categories == 1:
              if colors:
                  color = colors[0]
              else:
                  color = None
  
              print_vertical(vertic, labels, color, args)
  
          print()
docs: Handle the normalization of data and the printing of the graph.