Browse Source

Add Storybook story for investment chart component

pull/8192/head
Thomas Kaul 2 days ago
parent
commit
9db8e11a57
  1. 75
      libs/ui/src/lib/investment-chart/investment-chart.component.stories.ts

75
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<GfInvestmentChartComponent>;
type Story = StoryObj<GfInvestmentChartComponent>;
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
}
};
Loading…
Cancel
Save