We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b381b2 commit 457d046Copy full SHA for 457d046
src/components/LineChart.tsx
@@ -10,11 +10,34 @@ export default function LineChart(): ReactElement {
10
const options: AgChartOptions = useMemo(() => {
11
return {
12
data,
13
- series: [],
14
- axes: [],
+ title: {
+ text: 'Flight Time',
15
+ },
16
+ series: [
17
+ {
18
+ type: 'line',
19
+ xKey: 'date',
20
+ yKey: 'time',
21
+ yName: 'Flight Time',
22
23
+ ],
24
+ axes: [
25
26
+ type: 'number',
27
+ position: 'left',
28
29
30
+ type: 'time',
31
+ position: 'bottom',
32
+ interval: { step: time.month },
33
+ label: {
34
+ format: '%b %Y',
35
36
37
38
theme,
39
};
40
}, [data]);
41
- return <></>;
42
+ return <AgCharts options={options} />;
43
}
0 commit comments