added day hi lo vol
This commit is contained in:
parent
7b3e2449d4
commit
b383d6e029
@ -1971,6 +1971,21 @@ class StockTicker():
|
|||||||
day_low = '%.2f' % float(info['day_low'])
|
day_low = '%.2f' % float(info['day_low'])
|
||||||
day_high = '%.2f' % float(info['day_high'])
|
day_high = '%.2f' % float(info['day_high'])
|
||||||
volume = info['volume']
|
volume = info['volume']
|
||||||
|
|
||||||
|
daylow_img = self.textImage(day_low, font, r=0, g=255, b=0)
|
||||||
|
daylow_t_img = self.textImage('Lo', font, r=255, g=255, b=255)
|
||||||
|
dayhi_img = self.textImage(day_high, font, r=0,g=255,b=0)
|
||||||
|
dayhi_t_img = self.textImage('Hi', font, r=255,g=255,b=255)
|
||||||
|
vol_img = self.textImage(volume, font, r=0,g=255,b=0)
|
||||||
|
vol_t_img = self.textImage('Vol', font, r=255,g=255,b=255)
|
||||||
|
lohivol_img = Image.new('RGB', (max(daylow_img.size[0] + daylow_t_img.size[0], dayhi_img.size[0] + dayhi_t_img.size[0],
|
||||||
|
vol_img.size[0] + vol_t_img.size[0]) + 5, 32))
|
||||||
|
lohivol_img.paste(daylow_t_img, (0, 3))
|
||||||
|
lohivol_img.paste(daylow_img, (daylow_t_img.size[0],3))
|
||||||
|
lohivol_img.paste(dayhi_t_img, (0, 12))
|
||||||
|
lohivol_img.paste(dayhi_img, (dayhi_t_img.size[0], 12))
|
||||||
|
lohivol_img.paste(vol_t_img, (0, 21))
|
||||||
|
lohivol_img.paste(vol_img, (vol_t_img.size[0], 21))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user