diff --git a/packages/widgets/src/stocks/component.tsx b/packages/widgets/src/stocks/component.tsx index 8cfc58b07..e9d7b98ad 100644 --- a/packages/widgets/src/stocks/component.tsx +++ b/packages/widgets/src/stocks/component.tsx @@ -33,6 +33,7 @@ export default function StockPriceWidget({ options, width, height }: WidgetCompo const stockValuesMin = Math.min(...data.priceHistory); const stockGraphValues = data.priceHistory.map((value) => value - stockValuesMin + 50); + const trendColor = stockValuesChange > 0 ? "green.7" : stockValuesChange < 0 ? "red.7" : "gray.6"; return ( @@ -43,7 +44,7 @@ export default function StockPriceWidget({ options, width, height }: WidgetCompo h={height > 280 ? "75%" : "50%"} data={stockGraphValues} curveType="linear" - trendColors={{ positive: "green.7", negative: "red.7", neutral: "gray.6" }} + color={trendColor} fillOpacity={0.6} strokeWidth={2.5} />