-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add HBarChart variations to stories (#669)
- Loading branch information
Showing
3 changed files
with
83 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/pages/dashboard/AllLineschart/OperatorHbarChart/OperatorHbarChart.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Meta, StoryObj } from '@storybook/react' | ||
import OperatorHbarChart from './OperatorHbarChart' | ||
|
||
const meta: Meta<typeof OperatorHbarChart> = { | ||
title: 'Components/MapLayers/HbarChart/OperatorHbarChart', | ||
component: OperatorHbarChart, | ||
tags: ['autodocs'], | ||
} | ||
|
||
export default meta | ||
type Story = StoryObj<typeof OperatorHbarChart> | ||
|
||
const mockOperatorsData = [ | ||
{ | ||
name: 'אגד', | ||
total: 10, | ||
actual: 5, | ||
}, | ||
{ | ||
name: 'סופרבוס', | ||
total: 8, | ||
actual: 3, | ||
}, | ||
] | ||
|
||
export const Default: Story = { | ||
args: { | ||
operators: mockOperatorsData, | ||
}, | ||
} |
44 changes: 44 additions & 0 deletions
44
src/pages/dashboard/WorstLinesChart/LineHbarChart/LinesHBarChart.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Meta, StoryObj } from '@storybook/react' | ||
import LinesHbarChart from './LinesHbarChart' | ||
|
||
const meta: Meta<typeof LinesHbarChart> = { | ||
title: 'Components/MapLayers/HbarChart/LinesHBarChart', | ||
component: LinesHbarChart, | ||
tags: ['autodocs'], | ||
} | ||
|
||
export default meta | ||
type Story = StoryObj<typeof LinesHbarChart> | ||
const mockLines = [ | ||
{ | ||
id: '1', | ||
short_name: '5', | ||
long_name: 'Long Name 1', | ||
operator_name: 'אגד', | ||
total: 10000, | ||
actual: 6000, | ||
}, | ||
{ | ||
id: '2', | ||
short_name: '8', | ||
long_name: 'Long Name 2', | ||
operator_name: 'אלקטרה אפיקים', | ||
total: 10000, | ||
actual: 7000, | ||
}, | ||
{ | ||
id: '3', | ||
short_name: '10', | ||
long_name: 'Long Name 3', | ||
operator_name: 'סופרבוס', | ||
total: 10000, | ||
actual: 8000, | ||
}, | ||
] | ||
|
||
export const Default: Story = { | ||
args: { | ||
lines: mockLines, | ||
complement: false, | ||
}, | ||
} |