Check visibility performance optimization.

This commit is contained in:
Mike Cao 2020-08-01 23:37:46 -07:00
parent 418793feaf
commit cb7f267212
7 changed files with 172 additions and 67 deletions

View file

@ -13,6 +13,7 @@ export default function WebsiteChart({
websiteId,
defaultDateRange = '7day',
stickHeader = false,
animate = true,
onDateChange = () => {},
}) {
const [data, setData] = useState();
@ -80,6 +81,7 @@ export default function WebsiteChart({
websiteId={websiteId}
data={{ pageviews, uniques }}
unit={unit}
animationDuration={animate ? 300 : 0}
>
<QuickButtons value={value} onChange={handleDateChange} />
</PageviewsChart>