From 9db8e11a5715b1eaacc46e19434daafcbb8e8d09 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 15 Oct 2026 20:00:09 +0200 Subject: [PATCH] Add Storybook story for investment chart component --- .../investment-chart.component.stories.ts | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 libs/ui/src/lib/investment-chart/investment-chart.component.stories.ts diff --git a/libs/ui/src/lib/investment-chart/investment-chart.component.stories.ts b/libs/ui/src/lib/investment-chart/investment-chart.component.stories.ts new file mode 100644 index 0000000000..225857c7da --- /dev/null +++ b/libs/ui/src/lib/investment-chart/investment-chart.component.stories.ts @@ -0,0 +1,75 @@ +import { moduleMetadata } from '@storybook/angular'; +import type { Meta, StoryObj } from '@storybook/angular'; +import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; + +import { GfInvestmentChartComponent } from './investment-chart.component'; + +export default { + title: 'Investment Chart', + component: GfInvestmentChartComponent, + decorators: [ + moduleMetadata({ + imports: [NgxSkeletonLoaderModule] + }) + ] +} as Meta; + +type Story = StoryObj; + +export const PerformanceByYear: Story = { + args: { + benchmarkDataItems: [ + { + date: '2015-01-01', + investment: -0.02783300898051616 + }, + { + date: '2016-01-01', + investment: 0.2955008663975502 + }, + { + date: '2017-01-01', + investment: 0.5581973009289353 + }, + { + date: '2018-01-01', + investment: -0.27056776062551113 + }, + { + date: '2019-01-01', + investment: 0.27802802888773426 + }, + { + date: '2020-01-01', + investment: 0.11264960377555408 + }, + { + date: '2021-01-01', + investment: 0.31365756351078433 + }, + { + date: '2022-01-01', + investment: -0.23865494728984496 + }, + { + date: '2023-01-01', + investment: 0.07752911954819477 + }, + { + date: '2024-01-01', + investment: 0.24854314905668837 + }, + { + date: '2025-01-01', + investment: 0.05351048565996891 + }, + { + date: '2026-01-01', + investment: 0.1037188655512382 + } + ], + benchmarkDataLabel: 'Net Performance', + groupBy: 'year', + isInPercentage: true + } +};