mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 16:17:13 +01:00
Move date range selection into redux.
This commit is contained in:
parent
d06c077019
commit
c5cb19a3bf
21 changed files with 141 additions and 138 deletions
|
|
@ -1,9 +1,8 @@
|
|||
import React from 'react';
|
||||
import CheckVisible from 'components/helpers/CheckVisible';
|
||||
import BarChart from './BarChart';
|
||||
import { getDateLength } from '../../lib/date';
|
||||
|
||||
export default function PageviewsChart({ websiteId, data, startDate, endDate, unit, className }) {
|
||||
export default function PageviewsChart({ websiteId, data, unit, records, className }) {
|
||||
const handleUpdate = chart => {
|
||||
const {
|
||||
data: { datasets },
|
||||
|
|
@ -44,7 +43,7 @@ export default function PageviewsChart({ websiteId, data, startDate, endDate, un
|
|||
},
|
||||
]}
|
||||
unit={unit}
|
||||
records={getDateLength(startDate, endDate, unit)}
|
||||
records={records}
|
||||
animationDuration={visible ? 300 : 0}
|
||||
onUpdate={handleUpdate}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue