def update(self):
     #recupera una nuova lista di dati
     datalist = csvline_to_queryresult_yahoo_finance(next(self.chrono_linegen))##; print(datalist)
     #aggiorna dati quad
     self.ds_quads.data["top"].append(datalist[4])
     self.ds_quads.data["bottom"].append(datalist[1])
     self.ds_quads.data["left"].append(datalist[0] - self.quadwidth / 2)
     self.ds_quads.data["right"].append(datalist[0] + self.quadwidth / 2)
     if datalist[4] > datalist[1]: self.ds_quads.data["fill_color"].append("green")
     else: self.ds_quads.data["fill_color"].append("red")
     #aggiorna dati segment
     self.ds_segments.data["x0"].append(datalist[0])
     self.ds_segments.data["x1"].append(datalist[0])
     self.ds_segments.data["y0"].append(datalist[3])
     self.ds_segments.data["y1"].append(datalist[2])
     #aggiorna i dati x_range di plot
     self.plot.x_range.start = datalist[0] - (candle_visualized_n + 1) * self.tmscale
     self.plot.x_range.end = datalist[0] + self.tmscale
     #ritorna una lista degli oggetti di cui fare push: data sources dei glifi e x_range di plot
     return [self.ds_quads, self.ds_segments, self.plot.x_range] 
 def update(self):
     datalist = csvline_to_queryresult_yahoo_finance(next(self.chrono_linegen), "str")
     shift_insert(self.plot.source.data["dates"], datalist[0])
     shift_insert(self.plot.source.data["close"], datalist[4])
     shift_insert(self.plot.source.data["delta"], self.plot.source.data["close"][-1] - self.plot.source.data["close"][-2])
     return [self.plot.source]