📈 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!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
improved charts
Blue Mouseeb0084f32750
diff --git a/app/pages/Project/View/ViewProject.helpers.tsx b/app/pages/Project/View/ViewProject.helpers.tsxindex e279b26a6..0c296c643 100644--- a/app/pages/Project/View/ViewProject.helpers.tsx+++ b/app/pages/Project/View/ViewProject.helpers.tsx@@ -410,7 +410,7 @@ const getSettings = (forecasedChartData: {[key: string]: string[],},- rotateXAxias: boolean,+ rotateXAxis: boolean,chartType: string,customEvents?: {[key: string]: string[],@@ -552,7 +552,7 @@ const getSettings = (clipPath: false,tick: {fit: true,- rotate: rotateXAxias ? 45 : 0,+ rotate: rotateXAxis ? 45 : 0,format: timeFormat === TimeFormat['24-hour'] ? (x: string) => d3.timeFormat(tbsFormatMapper24h[timeBucket])(x) : (x: string) => d3.timeFormat(tbsFormatMapper[timeBucket])(x),},localtime: timeFormat === TimeFormat['24-hour'],@@ -710,8 +710,8 @@ const getSettings = (area: {linearGradient: true,},- padding: {- right: (rotateXAxias && !(activeChartMetrics.bounce || activeChartMetrics.sessionDuration)) && 35,+ bar: {+ linearGradient: true,},bindto: '#dataChart',}@@ -852,6 +852,9 @@ const getSettingsFunnels = (padding: {left: 40,},+ bar: {+ linearGradient: true,+ },bindto: '#dataChart',}}@@ -864,7 +867,7 @@ const getSettingsPerf = (},timeBucket: string,activeChartMetrics: string,- rotateXAxias: boolean,+ rotateXAxis: boolean,chartType: string,timeFormat: string,compareChart?: {@@ -932,7 +935,7 @@ const getSettingsPerf = (clipPath: false,tick: {fit: true,- rotate: rotateXAxias ? 45 : 0,+ rotate: rotateXAxis ? 45 : 0,format: timeFormat === TimeFormat['24-hour'] ? (x: string) => d3.timeFormat(tbsFormatMapper24h[timeBucket])(x) : (x: string) => d3.timeFormat(tbsFormatMapper[timeBucket])(x),},localtime: timeFormat === TimeFormat['24-hour'],@@ -1041,8 +1044,8 @@ const getSettingsPerf = (area: {linearGradient: true,},- padding: {- right: rotateXAxias && 35,+ bar: {+ linearGradient: true,},bindto: '#dataChart',}diff --git a/app/pages/Project/View/ViewProject.tsx b/app/pages/Project/View/ViewProject.tsxindex dfd5d87a1..db8903af6 100644--- a/app/pages/Project/View/ViewProject.tsx+++ b/app/pages/Project/View/ViewProject.tsx@@ -2,6 +2,7 @@import React, {useState, useEffect, useMemo, memo, useRef, useCallback,} from 'react'+import { ClientOnly } from 'remix-utils'import useSize from 'hooks/useSize'import { useNavigate, useParams, Link } from '@remix-run/react'// @ts-ignore@@ -2410,43 +2411,51 @@ const ViewProject = ({headless/>)}- <TBPeriodSelector- activePeriod={activePeriod}- updateTimebucket={updateTimebucket}- timeBucket={timeBucket}- items={isActiveCompare ? _filter(periodPairs, (el) => {- return _includes(filtersPeriodPairs, el.period)- }) : _includes(filtersPeriodPairs, period) ? periodPairs : _filter(periodPairs, (el) => {- return el.period !== PERIOD_PAIRS_COMPARE.COMPARE- })}- title={activePeriod?.label}- onSelect={(pair) => {- if (pair.period === PERIOD_PAIRS_COMPARE.COMPARE) {- if (activeTab === PROJECT_TABS.alerts) {- return- }-- if (isActiveCompare) {- compareDisable()- } else {- setIsActiveCompare(true)- }-- return- }-- if (pair.isCustomDate) {- setTimeout(() => {- // @ts-ignore- refCalendar.current.openCalendar()- }, 100)- } else {- setPeriodPairs(tbPeriodPairs(t, undefined, undefined, language))- setDateRange(null)- updatePeriod(pair)- }- }}- />+ <ClientOnly+ fallback={(+ <div className='w-44' />+ )}+ >+ {() => (+ <TBPeriodSelector+ activePeriod={activePeriod}+ updateTimebucket={updateTimebucket}+ timeBucket={timeBucket}+ items={isActiveCompare ? _filter(periodPairs, (el) => {+ return _includes(filtersPeriodPairs, el.period)+ }) : _includes(filtersPeriodPairs, period) ? periodPairs : _filter(periodPairs, (el) => {+ return el.period !== PERIOD_PAIRS_COMPARE.COMPARE+ })}+ title={activePeriod?.label}+ onSelect={(pair) => {+ if (pair.period === PERIOD_PAIRS_COMPARE.COMPARE) {+ if (activeTab === PROJECT_TABS.alerts) {+ return+ }++ if (isActiveCompare) {+ compareDisable()+ } else {+ setIsActiveCompare(true)+ }++ return+ }++ if (pair.isCustomDate) {+ setTimeout(() => {+ // @ts-ignore+ refCalendar.current.openCalendar()+ }, 100)+ } else {+ setPeriodPairs(tbPeriodPairs(t, undefined, undefined, language))+ setDateRange(null)+ updatePeriod(pair)+ }+ }}+ />+ )}+ </ClientOnly>{isActiveCompare && (<><div className='mx-2 text-md font-medium text-gray-600 whitespace-pre-line dark:text-gray-200'>diff --git a/app/redux/constants/index.ts b/app/redux/constants/index.tsindex 06b987fc1..17e7d8d46 100644--- a/app/redux/constants/index.ts+++ b/app/redux/constants/index.ts@@ -197,8 +197,8 @@ interface IStringObject {}// the order of panels in the project view-export const TRAFFIC_PANELS_ORDER: string[] = ['cc', 'pg', 'lc', 'br', 'os', 'dv', 'ref', 'so']-export const FILTERS_PANELS_ORDER: string[] = ['cc', 'pg', 'lc', 'br', 'os', 'dv', 'ref']+export const TRAFFIC_PANELS_ORDER: string[] = ['cc', 'pg', 'br', 'os', 'ref', 'lc', 'dv', 'so']+export const FILTERS_PANELS_ORDER: string[] = ['cc', 'pg', 'br', 'os', 'ref', 'lc', 'dv']export const PERFORMANCE_PANELS_ORDER: string[] = ['cc', 'pg', 'br', 'dv']// the maximum amount of months user can go back when picking a date in flat picker (project view)diff --git a/app/styles/ProjectViewStyle.css b/app/styles/ProjectViewStyle.cssindex d04fdfad7..59ab4ca97 100644--- a/app/styles/ProjectViewStyle.css+++ b/app/styles/ProjectViewStyle.css@@ -10,6 +10,79 @@ html.dark .bb-axis .domain {stroke: #334155;}+.bb-bar {+ fill-opacity: 0.3;+ stroke-width: 1 !important;+}++.bb-target-unique .bb-bar {+ stroke: #2563EB !important;+}++.bb-target-total .bb-bar {+ stroke: #D97706 !important;+}++.bb-target-sessionDuration .bb-bar {+ stroke: #c945ed !important;+}++.bb-target-bounce .bb-bar {+ stroke: #2AC4B3 !important;+}++.bb-target-viewsPerUnique .bb-bar {+ stroke: #F87171 !important;+}++.bb-target-dns .bb-bar {+ stroke: #EC4319 !important;+}++.bb-target-tls .bb-bar {+ stroke: #F27059 !important;+}++.bb-target-conn .bb-bar {+ stroke: #F7A265 !important;+}++.bb-target-response .bb-bar {+ stroke: #F5D376 !important;+}++.bb-target-render .bb-bar {+ stroke: #709775 !important;+}++.bb-target-dom_load .bb-bar {+ stroke: #A5E6AB !important;+}++.bb-target-ttfb .bb-bar {+ stroke: #00A8E8 !important;+}++.bb-target-frontend .bb-bar {+ stroke: #709775 !important;+}++.bb-target-network .bb-bar {+ stroke: #F7A265 !important;+}++.bb-target-backend .bb-bar {+ stroke: #00A8E8 !important;+}++.bb-target-events .bb-bar {+ stroke: #2563eb !important;+}++.bb-target-dropoff .bb-bar {+ stroke: rgba(37, 99, 235, 0.4) !important;+}+html.dark .bb-axis .tick line {stroke: #334155;}