Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix userflow

Maksim Mrugbc8940bb3fa1
diff --git a/app/pages/Project/View/components/UserFlow.tsx b/app/pages/Project/View/components/UserFlow.tsx
index 230ee2ac5..d3aa1bbc7 100644
--- a/app/pages/Project/View/components/UserFlow.tsx
+++ b/app/pages/Project/View/components/UserFlow.tsx
@@ -1,5 +1,5 @@
import React, { useEffect, useState, useMemo } from 'react'
-// import { ResponsiveSankey } from '@nivo/sankey'
+import { ResponsiveSankey } from '@nivo/sankey'
import { connect } from 'react-redux'
import { StateType, AppDispatch } from 'redux/store'
import UIActions from 'redux/reducers/ui'
@@ -135,73 +135,73 @@ const UserFlow = ({
)
}
- return null
- // <ResponsiveSankey
- // // @ts-ignore
- // data={isReversed ? userFlowDescending : userFlowAscending}
- // margin={{
- // top: 0,
- // // right: disableLegend ? 0 : 120,
- // right: 0,
- // bottom: 0,
- // left: 20,
- // }}
- // align='justify'
- // colors={{ scheme: 'nivo' }}
- // nodeOpacity={1}
- // nodeHoverOthersOpacity={0.35}
- // nodeThickness={18}
- // nodeSpacing={24}
- // nodeBorderWidth={0}
- // nodeBorderColor={{
- // from: 'color',
- // modifiers: [
- // [
- // 'darker',
- // 0.8,
- // ],
- // ],
- // }}
- // nodeBorderRadius={3}
- // linkOpacity={0.5}
- // linkHoverOthersOpacity={0.1}
- // linkContract={3}
- // enableLinkGradient
- // labelPosition='outside'
- // labelOrientation='vertical'
- // labelPadding={16}
- // labelTextColor={{
- // from: 'color',
- // modifiers: [
- // [
- // 'darker',
- // 1,
- // ],
- // ],
- // }}
- // // legends={!disableLegend ? [
- // // {
- // // anchor: 'bottom-right',
- // // direction: 'column',
- // // translateX: 100,
- // // itemWidth: 100,
- // // itemHeight: 14,
- // // itemDirection: 'right-to-left',
- // // itemsSpacing: 2,
- // // itemTextColor: '#999',
- // // symbolSize: 14,
- // // effects: [
- // // {
- // // on: 'hover',
- // // style: {
- // // itemTextColor: '#000',
- // // },
- // // },
- // // ],
- // // },
- // // ] : []}
- // />
- // )
+ return (
+ <ResponsiveSankey
+ // @ts-ignore
+ data={isReversed ? userFlowDescending : userFlowAscending}
+ margin={{
+ top: 0,
+ // right: disableLegend ? 0 : 120,
+ right: 0,
+ bottom: 0,
+ left: 20,
+ }}
+ align='justify'
+ colors={{ scheme: 'nivo' }}
+ nodeOpacity={1}
+ nodeHoverOthersOpacity={0.35}
+ nodeThickness={18}
+ nodeSpacing={24}
+ nodeBorderWidth={0}
+ nodeBorderColor={{
+ from: 'color',
+ modifiers: [
+ [
+ 'darker',
+ 0.8,
+ ],
+ ],
+ }}
+ nodeBorderRadius={3}
+ linkOpacity={0.5}
+ linkHoverOthersOpacity={0.1}
+ linkContract={3}
+ enableLinkGradient
+ labelPosition='outside'
+ labelOrientation='vertical'
+ labelPadding={16}
+ labelTextColor={{
+ from: 'color',
+ modifiers: [
+ [
+ 'darker',
+ 1,
+ ],
+ ],
+ }}
+ // legends={!disableLegend ? [
+ // {
+ // anchor: 'bottom-right',
+ // direction: 'column',
+ // translateX: 100,
+ // itemWidth: 100,
+ // itemHeight: 14,
+ // itemDirection: 'right-to-left',
+ // itemsSpacing: 2,
+ // itemTextColor: '#999',
+ // symbolSize: 14,
+ // effects: [
+ // {
+ // on: 'hover',
+ // style: {
+ // itemTextColor: '#000',
+ // },
+ // },
+ // ],
+ // },
+ // ] : []}
+ />
+ )
}
UserFlow.defaultProps = {
diff --git a/remix.config.js b/remix.config.js
index ac42f2c32..41d632a4e 100644
--- a/remix.config.js
+++ b/remix.config.js
@@ -18,5 +18,8 @@ module.exports = {
'axios',
'd3',
/^d3-*/,
+ 'nivo',
+ /^nivo-*/,
+ /^@nivo*/,
],
}