-
- {#if options !== null}
-
+
+ {#if config !== null}
+
{/if}
@@ -256,20 +244,3 @@
{/if}
-
-
diff --git a/src/lib/highcharts.ts b/src/lib/highcharts.ts
index f72ff679..8d1467c4 100644
--- a/src/lib/highcharts.ts
+++ b/src/lib/highcharts.ts
@@ -1,7 +1,9 @@
import Highcharts from 'highcharts';
+import HighchartsMore from 'highcharts/highcharts-more'; // Add this import
import { browser } from '$app/environment';
if (browser) {
+ HighchartsMore(Highcharts); // Initialize the extension
Highcharts.setOptions({
lang: {
numericSymbols: ['K', 'M', 'B', 'T', 'P', 'E']
@@ -58,13 +60,11 @@ export default (node, config) => {
createChart();
- // Resize observer with optimized logic
+ // Resize observer remains the same
const resizeObserver = new ResizeObserver(() => {
if (chart) {
const newWidth = node.clientWidth;
- const newHeight = 360; // Let height be auto-adjusted
-
- // **Dynamically update size without recreating the chart**
+ const newHeight = 360;
chart?.setSize(newWidth, newHeight, false);
}
});
@@ -79,4 +79,4 @@ export default (node, config) => {
if (chart) chart?.destroy();
}
};
-};
+};
\ No newline at end of file
diff --git a/src/routes/stocks/[tickerID]/forecast/+page.svelte b/src/routes/stocks/[tickerID]/forecast/+page.svelte
index 6b2c8d21..aa5ef863 100644
--- a/src/routes/stocks/[tickerID]/forecast/+page.svelte
+++ b/src/routes/stocks/[tickerID]/forecast/+page.svelte
@@ -652,7 +652,7 @@