Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalyehia authored Dec 14, 2023
1 parent a9caac9 commit 5d3dc4c
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import type { Meta, StoryObj } from '@storybook/react'
import { HbarChart, Entry } from './HbarChart'

const meta = {
title: 'Components/MapLayers/HbarChart',
component: HbarChart,
tags: ['map', 'tooltip', 'autodocs'],
} satisfies Meta<typeof HbarChart>

export default meta

type Story = StoryObj<typeof meta>

const operatorsPT: Entry[] = [
{
name: 'כפיר',
total: 1883,
actual: 0,
color: '#5840c0',
},
{
name: 'Unknown',
total: 2318,
actual: 0,
color: '#2a443e',
},
{
name: 'כרמלית',
total: 998,
actual: 0,
color: '#5cbcec',
},
{
name: 'כבל אקספרס',
total: 12824,
actual: 0,
color: '#0d2b58',
},
{
name: 'מועצה אזורית גולן',
total: 1992,
actual: 1506,
color: '#957476',
},
]

export const Chart: Story = {
args: {
entries: operatorsPT,
complement: false,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TEXTS } from 'src/resources/texts'
import './HbarChart.scss'
import { Tooltip } from '@mui/material'

type Entry = { name: string; total: number; actual: number; color?: string }
export type Entry = { name: string; total: number; actual: number; color?: string }
const numberFormatter = new Intl.NumberFormat('he-IL')

export function HbarChart({
Expand Down

0 comments on commit 5d3dc4c

Please sign in to comment.