parameters: (self)
return_statement: return serieses
docstring: Example usage:
              data = [
                 ['Year', 'Sales', 'Expenses', 'Items Sold', 'Net Profit'],
                 ['2004', 1000, 400, 100, 600],
                 ['2005', 1170, 460, 120, 310],
                 ['2006', 660, 1120, 50, -460],
                 ['2007', 1030, 540, 100, 200],
              ]
              sd = SimpleDataSource(data)
              hc = BaseHighCharts(sd)
              hc.get_series() would be [{"name": "Sales", "data": [1000, 1170, 660, 1030]}, {"name": "Expenses", "data": [400, 460, 1120, 540]} ....]
docstring_summary: Example usage:
              data = [
                 ['Year', 'Sales', 'Expenses', 'Items Sold', 'Net Profit'],
                 ['2004', 1000, 400, 100, 600],
                 ['2005', 1170, 460, 120, 310],
                 ['2006', 660, 1120, 50, -460],
                 ['2007', 1030, 540, 100, 200],
              ]
              sd = SimpleDataSource(data)
              hc = BaseHighCharts(sd)
              hc.get_series() would be [{"name": "Sales", "data": [1000, 1170, 660, 1030]}, {"name": "Expenses", "data": [400, 460, 1120, 540]} ....]
docstring_tokens: Example usage : data = [ [ Year Sales Expenses Items Sold Net Profit ] [ 2004 1000 400 100 600 ] [ 2005 1170 460 120 310 ] [ 2006 660 1120 50 - 460 ] [ 2007 1030 540 100 200 ] ] sd = SimpleDataSource ( data ) hc = BaseHighCharts ( sd ) hc . get_series () would be [ { name : Sales data : [ 1000 1170 660 1030 ] } { name : Expenses data : [ 400 460 1120 540 ] } .... ]
function: def get_series(self):
          """
          Example usage:
              data = [
                 ['Year', 'Sales', 'Expenses', 'Items Sold', 'Net Profit'],
                 ['2004', 1000, 400, 100, 600],
                 ['2005', 1170, 460, 120, 310],
                 ['2006', 660, 1120, 50, -460],
                 ['2007', 1030, 540, 100, 200],
              ]
              sd = SimpleDataSource(data)
              hc = BaseHighCharts(sd)
              hc.get_series() would be [{"name": "Sales", "data": [1000, 1170, 660, 1030]}, {"name": "Expenses", "data": [400, 460, 1120, 540]} ....]
          """
          data = self.get_data()
          series_names = data[0][1:]
          serieses = []
          options = self.get_options()
          if 'annotation' in options:
              data = self.get_data()
              annotation_list = options['annotation']
              for i, name in enumerate(series_names):
                  new_data = []
                  if name in annotation_list:
                      data_list = column(data, i + 1)[1:]
                      for k in data_list:
                          temp_data = {}
                          for j in annotation_list[name]:
                              if k == j['id']:
                                  temp_data['y'] = k
                                  temp_data['dataLabels'] = {'enabled': True, 'format': j['value']}
                              else:
                                  temp_data['y'] = k
                          new_data.append(temp_data)
                      series = {"name": name, "data": new_data}
                  else:
                      series = {"name": name, "data": column(data, i + 1)[1:]}
                  if 'colors' in options and len(options['colors']) > i:
                      series['color'] = options['colors'][i]
                  serieses.append(series)
          else:
              for i, name in enumerate(series_names):
                  series = {"name": name, "data": column(data, i+1)[1:]}
                  # If colors was passed then add color for the serieses
                  if 'colors' in options and len(options['colors']) > i:
                      series['color'] = options['colors'][i]
                  serieses.append(series)
          serieses = self.add_series_options(serieses)
          return serieses
function_tokens: def get_series ( self ) : data = self . get_data ( ) series_names = data [ 0 ] [ 1 : ] serieses = [ ] options = self . get_options ( ) if 'annotation' in options : data = self . get_data ( ) annotation_list = options [ 'annotation' ] for i , name in enumerate ( series_names ) : new_data = [ ] if name in annotation_list : data_list = column ( data , i + 1 ) [ 1 : ] for k in data_list : temp_data = { } for j in annotation_list [ name ] : if k == j [ 'id' ] : temp_data [ 'y' ] = k temp_data [ 'dataLabels' ] = { 'enabled' : True , 'format' : j [ 'value' ] } else : temp_data [ 'y' ] = k new_data . append ( temp_data ) series = { "name" : name , "data" : new_data } else : series = { "name" : name , "data" : column ( data , i + 1 ) [ 1 : ] } if 'colors' in options and len ( options [ 'colors' ] ) > i : series [ 'color' ] = options [ 'colors' ] [ i ] serieses . append ( series ) else : for i , name in enumerate ( series_names ) : series = { "name" : name , "data" : column ( data , i + 1 ) [ 1 : ] } # If colors was passed then add color for the serieses if 'colors' in options and len ( options [ 'colors' ] ) > i : series [ 'color' ] = options [ 'colors' ] [ i ] serieses . append ( series ) serieses = self . add_series_options ( serieses ) return serieses