From 6393ebc20e563e07027c324b5d777c48e33cfe3d Mon Sep 17 00:00:00 2001 From: wayne-shih <0x26@wayneshih.com> Date: Tue, 29 Oct 2024 21:59:32 +1300 Subject: [PATCH] refactor: chartwidth in w --- apps/indexticker/index_ticker.star | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/indexticker/index_ticker.star b/apps/indexticker/index_ticker.star index 95f677f01..713ae9eaf 100644 --- a/apps/indexticker/index_ticker.star +++ b/apps/indexticker/index_ticker.star @@ -134,10 +134,7 @@ def print_chart(INDEX_JSON, TotalTicks, LastClose, Interval): DataElement = TickIndex[i], Percentage_Change Data.append(DataElement) - ChartWidth = len(Data) - - if ChartWidth > 64: - ChartWidth = 64 + ChartWidth = min(len(Data), 64) if Interval == "YTD": ChartWidth = int(ChartWidth * 1.23)