This commit is contained in:
MuslemRahimi 2025-03-05 12:52:09 +01:00
parent ff6143fe1c
commit 8450842ef3
3 changed files with 20 additions and 10 deletions

View File

@ -36,7 +36,7 @@
const options = { const options = {
chart: { chart: {
type: "column", type: "bar",
backgroundColor: "#09090B", backgroundColor: "#09090B",
plotBackgroundColor: "#09090B", plotBackgroundColor: "#09090B",
height: 360, // Set the maximum height for the chart height: 360, // Set the maximum height for the chart
@ -49,7 +49,7 @@
itemStyle: { color: "#fff" }, itemStyle: { color: "#fff" },
}, },
title: { title: {
text: `<h3 class="mt-3 mb-1">${removeCompanyStrings($displayCompanyName)} Ownership Distribution</h3>`, text: `<h3 class="mt-3 mb-1 text-center">${removeCompanyStrings($displayCompanyName)} Ownership Distribution</h3>`,
useHTML: true, useHTML: true,
style: { color: "white" }, style: { color: "white" },
}, },
@ -64,10 +64,22 @@
gridLineColor: "#111827", gridLineColor: "#111827",
labels: { labels: {
formatter: function () { formatter: function () {
return this.value + "%"; return this?.value + "%";
}, },
style: { color: "#fff" }, style: { color: "#fff" },
}, },
tickPositioner: function () {
// Create custom tick positions with wider spacing
const positions = [];
const info = this.getExtremes();
const tickCount = 3; // Reduce number of ticks displayed
const interval = Math.floor((info.max - info.min) / tickCount);
for (let i = 0; i <= tickCount; i++) {
positions.push(info.min + i * interval);
}
return positions;
},
}, },
tooltip: { tooltip: {
enabled: false, enabled: false,
@ -93,6 +105,7 @@
animation: false, animation: false,
color: "#1E40AF", color: "#1E40AF",
borderColor: "#1E40AF", borderColor: "#1E40AF",
borderRadius: "1px",
}, },
{ {
name: "Other Owner", name: "Other Owner",
@ -100,6 +113,7 @@
animation: false, animation: false,
color: "#D97706", color: "#D97706",
borderColor: "#D97706", borderColor: "#D97706",
borderRadius: "1px",
}, },
], ],
}; };

View File

@ -19,7 +19,7 @@ type FlyAndScaleParams = {
}; };
export function removeCompanyStrings(name) { export function removeCompanyStrings(name) {
const wordsToRemove = ["Technologies", "Inc.","Corp.","Corporation","Holding","Limited","Group"]; const wordsToRemove = ["Technologies", "Inc.","Corp.","Corporation","Holding","Limited","Group","N.V."];
if (!name) return ""; if (!name) return "";
return wordsToRemove?.reduce((acc, word) => acc.replace(word, "").trim(), name); return wordsToRemove?.reduce((acc, word) => acc.replace(word, "").trim(), name);
} }

View File

@ -1,9 +1,5 @@
<script lang="ts"> <script lang="ts">
import { import { displayCompanyName, stockTicker } from "$lib/store";
displayCompanyName,
numberOfUnreadNotification,
stockTicker,
} from "$lib/store";
import ShareHolders from "$lib/components/ShareHolders.svelte"; import ShareHolders from "$lib/components/ShareHolders.svelte";
import SEO from "$lib/components/SEO.svelte"; import SEO from "$lib/components/SEO.svelte";
@ -12,7 +8,7 @@
</script> </script>
<SEO <SEO
title={`${$displayCompanyName} (${$stockTicker}) 13F Institute Ownership · Stocknear`} title={`${$displayCompanyName} (${$stockTicker}) 13F Institute Ownership`}
description={`Get the latest 13F Institute Ownership of ${$displayCompanyName} (${$stockTicker}).`} description={`Get the latest 13F Institute Ownership of ${$displayCompanyName} (${$stockTicker}).`}
/> />