From 742449d50a308165ff349b2682cec5ba06df0b9a Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Sun, 30 Mar 2025 14:17:58 +0200 Subject: [PATCH] ui fix --- src/lib/components/AnalystEstimate.svelte | 16 +- .../stocks/[tickerID]/forecast/+page.svelte | 54 +++---- .../[tickerID]/forecast/analyst/+page.svelte | 141 ++++++++++++------ 3 files changed, 121 insertions(+), 90 deletions(-) diff --git a/src/lib/components/AnalystEstimate.svelte b/src/lib/components/AnalystEstimate.svelte index 4c08cbbc..602dd686 100644 --- a/src/lib/components/AnalystEstimate.svelte +++ b/src/lib/components/AnalystEstimate.svelte @@ -367,14 +367,14 @@ endOnTick: false, categories: dates, crosshair: { - color: $mode === "light" ? "black" : "white", // Set the color of the crosshair line + color: $mode === "light" ? "#545454" : "white", // Set the color of the crosshair line width: 1, // Adjust the line width as needed dashStyle: "Solid", }, labels: { style: { - color: $mode === "light" ? "black" : "white", + color: $mode === "light" ? "#545454" : "white", fontSize: "12px", }, }, @@ -383,7 +383,7 @@ gridLineWidth: 1, gridLineColor: $mode === "light" ? "#e5e7eb" : "#111827", labels: { - style: { color: $mode === "light" ? "black" : "white" }, + style: { color: $mode === "light" ? "#545454" : "white" }, }, title: { text: null }, opposite: true, @@ -394,6 +394,7 @@ data: valueList, color: $mode === "light" ? "#2C6288" : "white", animation: false, + lineWidth: 2.5, }, { name: "Avg", @@ -404,6 +405,7 @@ marker: { enabled: false, }, + lineWidth: 2.5, }, { name: "Low", @@ -412,6 +414,7 @@ color: $mode === "light" ? "#8AAAC0" : "#c2c7cf", dashStyle: "Dash", animation: false, + lineWidth: 2.5, }, { name: "High", @@ -419,6 +422,7 @@ color: $mode === "light" ? "#8AAAC0" : "#c2c7cf", dashStyle: "Dash", animation: false, + lineWidth: 2.5, }, ], }; @@ -518,7 +522,7 @@ type: "datetime", labels: { style: { - color: $mode === "light" ? "black" : "white", + color: $mode === "light" ? "#545454" : "white", fontSize: "12px", }, }, @@ -527,7 +531,7 @@ gridLineWidth: 1, gridLineColor: $mode === "light" ? "#e5e7eb" : "#111827", labels: { - style: { color: $mode === "light" ? "black" : "white" }, + style: { color: $mode === "light" ? "#545454" : "white" }, }, title: { text: null }, opposite: true, @@ -573,7 +577,7 @@ // If either high or low is null/undefined, return nulls. return high != null && low != null ? [low, high] : [null, null]; }), - color: $mode === "light" ? "black" : "white", + color: $mode === "light" ? "#545454" : "white", lineWidth: 1, // Thicker lines for error bars whiskerLength: 10, // Adjust whisker length as needed zIndex: 10, diff --git a/src/routes/stocks/[tickerID]/forecast/+page.svelte b/src/routes/stocks/[tickerID]/forecast/+page.svelte index 813082c3..f7b2cd4e 100644 --- a/src/routes/stocks/[tickerID]/forecast/+page.svelte +++ b/src/routes/stocks/[tickerID]/forecast/+page.svelte @@ -91,7 +91,7 @@ categories = ["Strong Buy", "Buy", "Hold", "Sell", "Strong Sell"]; } - optionsBarChart = getPlotOptions() || null; + optionsBarChart = getBarChart() || null; optionsPieChart = getPieChart() || null; config = getPriceForecastChart() || null; } @@ -199,7 +199,7 @@ categories: xCategories, labels: { style: { - color: "#fff", + color: $mode === "light" ? "#545454" : "white", }, }, }, @@ -210,22 +210,22 @@ borderColor: "rgba(255, 255, 255, 0.2)", borderWidth: 1, style: { - color: "#fff", + color: $mode === "light" ? "#545454" : "white", fontSize: "16px", padding: "10px", }, borderRadius: 4, headerFormat: - '{point.key}
', + '{point.key}
', pointFormat: '\u25CF ' + - "{series.name}: {point.originalValue}
", + "{series.name}: {point.originalValue}
", }, yAxis: { gridLineWidth: 1, gridLineColor: $mode === "light" ? "#e5e7eb" : "#111827", labels: { - style: { color: "white" }, + style: { color: $mode === "light" ? "#545454" : "white" }, }, title: { text: null }, }, @@ -1290,46 +1290,26 @@ - + + @@ -707,3 +724,33 @@ + + + + + + + + + +