mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 17:45:38 +01:00
Funnel Table/Chart hooked up.
This commit is contained in:
parent
1130bca195
commit
07cb9f621d
13 changed files with 170 additions and 87 deletions
17
components/pages/reports/FunnelTable.js
Normal file
17
components/pages/reports/FunnelTable.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import DataTable from 'components/metrics/DataTable';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
import { useState } from 'react';
|
||||
|
||||
export function DevicesTable({ ...props }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const { data } = props;
|
||||
|
||||
const tableData =
|
||||
data?.map(a => ({ x: a.url, y: a.count, z: (a.count / data[0].count) * 100 })) || [];
|
||||
|
||||
console.log(tableData);
|
||||
|
||||
return <DataTable data={tableData} title="Url" type="device" />;
|
||||
}
|
||||
|
||||
export default DevicesTable;
|
||||
Loading…
Add table
Add a link
Reference in a new issue