A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.
fix(stock-price): align sparkline color with displayed price change (#5181)
Sergiobbf0adf31a1f
diff --git a/packages/widgets/src/stocks/component.tsx b/packages/widgets/src/stocks/component.tsxindex 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 }: WidgetCompoconst 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 (<Flex h="100%" w="100%">@@ -43,7 +44,7 @@ export default function StockPriceWidget({ options, width, height }: WidgetCompoh={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}/>