Skip to content

Commit dd3b165

Browse files
committed
fix(AnalyticalCard): fix line-chart in demo
1 parent 97158a3 commit dd3b165

File tree

1 file changed

+27
-31
lines changed

1 file changed

+27
-31
lines changed

packages/main/src/components/AnalyticalCard/demo.stories.tsx

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,29 @@ export default {
1515
}
1616
};
1717

18+
const simpleDataSet = [
19+
{
20+
name: 'January / Month',
21+
users: 100
22+
},
23+
{
24+
name: 'February / Month',
25+
users: 230
26+
},
27+
{
28+
name: 'March / Month',
29+
users: 240
30+
},
31+
{
32+
name: 'April / Month',
33+
users: 280
34+
},
35+
{
36+
name: 'May / Month',
37+
users: 100
38+
}
39+
];
40+
1841
export const defaultStory = () => (
1942
<AnalyticalCard
2043
header={
@@ -38,37 +61,10 @@ export const defaultStory = () => (
3861
}
3962
>
4063
<LineChart
41-
labels={[
42-
'201901',
43-
'201902',
44-
'201903',
45-
'201904',
46-
'201905',
47-
'201906',
48-
'201907',
49-
'201908',
50-
'201909',
51-
'201910',
52-
'201911',
53-
'201912'
54-
]}
55-
datasets={[
56-
{
57-
label: 'automated mapping quota',
58-
data: [65, 64, 68, 73, 75, 75, 79, 84, 88, 88.5, 89, 92]
59-
}
60-
]}
61-
height={200}
62-
width={270}
63-
options={{
64-
layout: {
65-
padding: { top: 25 }
66-
}
67-
}}
68-
valueAxisFormatter={(yValue) => {
69-
return `${yValue}%`;
70-
}}
71-
colors={['#607182']}
64+
noLegend
65+
dimensions={[{ accessor: 'name' }]}
66+
measures={[{ accessor: 'users', color: 'red' }]}
67+
dataset={simpleDataSet}
7268
/>
7369
</AnalyticalCard>
7470
);

0 commit comments

Comments
 (0)