Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | 1x 1x | import React from 'react';
import { Story, Meta } from '@storybook/react';
import * as chartConstants from '../../constants/charts';
import Line, { ILineProps } from './Line';
export default {
title: 'Visualizations/Line',
component: Line,
parameters: {
docs: {
description: {
component: Line.peek.description,
},
},
},
} as Meta;
/* Basic */
export const Basic: Story<ILineProps> = (args) => {
return (
<div>
<svg width={200} height={120}>
<Line {...args} color={chartConstants.COLOR_0} d='M0,0 L120,120' />
<Line {...args} color={chartConstants.COLOR_1} d='M0,20 L120,100' />
<Line {...args} color={chartConstants.COLOR_2} d='M0,40 L120,80' />
<Line {...args} color={chartConstants.COLOR_3} d='M0,60 L120,60' />
<Line {...args} color={chartConstants.COLOR_4} d='M0,80 L120,40' />
<Line {...args} color={chartConstants.COLOR_5} d='M0,100 L120,20' />
<Line {...args} color={chartConstants.COLOR_6} d='M0,120 L120,0' />
</svg>
<svg width={200} height={120}>
<Line
{...args}
isDotted
color={chartConstants.COLOR_0}
d='M0,0 L120,120'
/>
<Line
{...args}
isDotted
color={chartConstants.COLOR_1}
d='M0,20 L120,100'
/>
<Line
{...args}
isDotted
color={chartConstants.COLOR_2}
d='M0,40 L120,80'
/>
<Line
{...args}
isDotted
color={chartConstants.COLOR_3}
d='M0,60 L120,60'
/>
<Line
{...args}
isDotted
color={chartConstants.COLOR_4}
d='M0,80 L120,40'
/>
<Line
{...args}
isDotted
color={chartConstants.COLOR_5}
d='M0,100 L120,20'
/>
<Line
{...args}
isDotted
color={chartConstants.COLOR_6}
d='M0,120 L120,0'
/>
</svg>
</div>
);
};
|