/
HomeLineDemo.tsx
30 lines (28 loc) · 931 Bytes
/
HomeLineDemo.tsx
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
import React from 'react'
import { generateDrinkStats } from '@nivo/generators'
import { Line } from '@nivo/line'
import { useHomeTheme } from './theme'
import { dimensions } from './dimensions'
export const HomeLineDemo = () => {
const { colors, nivoTheme } = useHomeTheme()
return (
<div id="line">
<Line
width={dimensions.width}
height={dimensions.height}
margin={{ top: 10, bottom: 15, left: 24, right: 10 }}
data={generateDrinkStats(12)}
yScale={{ type: 'linear', stacked: true }}
lineWidth={4}
curve="monotoneX"
theme={nivoTheme}
colors={colors}
animate={false}
isInteractive={false}
pointSize={16}
axisLeft={null}
axisBottom={null}
/>
</div>
)
}