From cc30005d0cc659c11c25ffd695bf16be06b551d6 Mon Sep 17 00:00:00 2001 From: Susie Kim Date: Thu, 25 Jan 2024 14:28:37 -0500 Subject: [PATCH] Add test data --- .../stories/playground/Playground.stories.tsx | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/packages/polaris-viz/src/components/LineChart/stories/playground/Playground.stories.tsx b/packages/polaris-viz/src/components/LineChart/stories/playground/Playground.stories.tsx index 79d4737dd6..63b29119b2 100644 --- a/packages/polaris-viz/src/components/LineChart/stories/playground/Playground.stories.tsx +++ b/packages/polaris-viz/src/components/LineChart/stories/playground/Playground.stories.tsx @@ -1,7 +1,7 @@ import type {Story} from '@storybook/react'; import {LineChart, LineChartProps} from '../../LineChart'; -import {randomNumber} from '../../../Docs/utilities'; +import {generateDataSet, randomNumber} from '../../../Docs/utilities'; import { formatLinearXAxisLabel, formatLinearYAxisLabel, @@ -1023,3 +1023,47 @@ LinearComparisonTooltip.args = { }, ], }; + +export const LongLegend: Story = Template.bind({}); + +LongLegend.args = { + data: [ + { + name: 'Garlic & Herb Biltong Slab - Family Size Super Pack', + data: generateDataSet(10, 'dates'), + }, + { + name: 'Chili Biltong Slab 8oz', + data: generateDataSet(10, 'dates'), + }, + { + name: 'Sale', + data: generateDataSet(10, 'dates'), + }, + { + name: '1', + data: generateDataSet(10, 'dates'), + }, + { + name: 'Smokehouse Biltong', + data: generateDataSet(10, 'dates'), + }, + { + name: 'Traditional Biltong Slab 8oz', + data: generateDataSet(10, 'dates'), + }, + { + name: '2', + data: generateDataSet(10, 'dates'), + }, + { + name: 'A Very Very Very Very Very Long Titled Biltong', + data: generateDataSet(10, 'dates'), + }, + + { + name: '3', + data: generateDataSet(10, 'dates'), + }, + ], +};