mirror of
https://github.com/umami-software/umami.git
synced 2026-02-15 01:55:36 +01:00
Refactored funnel report. Made BarChart more generic.
This commit is contained in:
parent
050cd2f5d9
commit
fb4dd75e18
24 changed files with 327 additions and 367 deletions
|
|
@ -1,12 +1,17 @@
|
|||
import DataTable from 'components/metrics/DataTable';
|
||||
import { useMessages } from 'hooks';
|
||||
|
||||
export function FunnelTable({ ...props }) {
|
||||
const { data } = props;
|
||||
export function FunnelTable({ data }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
const tableData =
|
||||
data?.map(a => ({ x: a.x, y: a.y, z: Math.floor(a.y / data[0].y) * 100 })) || [];
|
||||
|
||||
return <DataTable data={tableData} title="Url" type="device" />;
|
||||
return (
|
||||
<DataTable
|
||||
data={data}
|
||||
title={formatMessage(labels.url)}
|
||||
metric={formatMessage(labels.visitors)}
|
||||
showPercentage={false}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
export default FunnelTable;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue