Beispiel #1
0
 def add_dimension(self, name, lst, options={}):
     mapped = []
     if self.top:
         for a, b in itertools.izip_longest(self.top, lst):
             b = b if b else 0
             c = a + b if a else b
             mapped.append(c)
     else:
         mapped = lst
         self.top = mapped
     LineChart.add_dimension(self, name, mapped, options)
     col = options.get("fill_color", "rgba(151,187,205,1)")
     self.y[name]['fill_color'] = colors.construct_color(col, 1)
     self.y[name]['stacked'] = 'true'
     self.params.update({'datasetFill': 'true', 'animation': True})
Beispiel #2
0
	def add_dimension(self, name ,lst, options={}):
		mapped = []
		if self.top:
			for a,b in itertools.izip_longest(self.top,lst):
				b = b if b else 0
				c = a + b if a else b
				mapped.append(c)  
		else:
			mapped =lst
			self.top = mapped
		LineChart.add_dimension(self,name,mapped,options)
		col = options.get("fill_color", "rgba(151,187,205,1)")
		self.y[name]['fill_color'] = colors.construct_color(col, 1)
		self.y[name]['stacked'] = 'true'
		self.params.update( {'datasetFill' : 'true', 'animation' : True})
Beispiel #3
0
 def __init__(self, labels, width=450, height=450, params={}):
     self.top = None
     self.opac = 1
     LineChart.__init__(self, labels, width, height, params)
Beispiel #4
0
 def __init__(self, labels, width=450, height=450, params={}):
     LineChart.__init__(self, labels, width, height, params)
     self.type = 'Bar'
     self.struct = 'bars'
Beispiel #5
0
	def __init__(self, labels, width=450, height=450, params={}):
		self.top = None
		self.opac = 1
		LineChart.__init__(self,labels,width,height,params)
Beispiel #6
0
	def __init__(self, labels, width=450, height=450, params={}):
		LineChart.__init__(self,labels,width,height,params)
		self.type = 'Bar'
		self.struct = 'bars'