ui: fix sank sizes in db/in builder

This commit is contained in:
nick-delirium 2025-02-12 10:48:59 +01:00
parent 7dc70c0ce5
commit 2654273f97
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
2 changed files with 6 additions and 11 deletions

View file

@ -32,6 +32,7 @@ interface Props {
height?: number;
onChartClick?: (filters: any[]) => void;
isUngrouped?: boolean;
inGrid?: boolean;
}
function buildSubgraph(
@ -474,22 +475,16 @@ const EChartsSankey: React.FC<Props> = (props) => {
}
return (
<div style={{ maxHeight: 620, overflow: 'auto', maxWidth: 840, }}>
<div style={{ maxHeight: 620, overflow: 'auto', maxWidth: 1240, }}>
<div
ref={chartRef}
style={containerStyle}
className="min-w-[600px] overflow-scroll"
className="min-w-[600px]"
/>
</div>
);
};
const icons = {
LOCATION: 'locationIcon',
INPUT: 'inputIcon',
CUSTOM_EVENT: 'customEventIcon',
CLICK: 'clickIcon',
}
function getIcon(type: string) {
if (type === 'LOCATION') {
return '{locationIcon|}'

View file

@ -33,7 +33,6 @@ import CustomMetricTableSessions from 'App/components/Dashboard/Widgets/CustomMe
import CustomMetricTableErrors from 'App/components/Dashboard/Widgets/CustomMetricsWidgets/CustomMetricTableErrors';
import ClickMapCard from 'App/components/Dashboard/Widgets/CustomMetricsWidgets/ClickMapCard';
import InsightsCard from 'App/components/Dashboard/Widgets/CustomMetricsWidgets/InsightsCard';
import { filterMinorPaths } from 'Shared/Insights/SankeyChart/utils'
import CohortCard from '../../Widgets/CustomMetricsWidgets/CohortCard';
import SessionsBy from 'Components/Dashboard/Widgets/CustomMetricsWidgets/SessionsBy';
import { useInView } from 'react-intersection-observer';
@ -504,11 +503,12 @@ function WidgetChart(props: Props) {
if (metricType === USER_PATH && data && data.links) {
const isUngrouped = props.isPreview ? (!(_metric.hideExcess ?? true)) : false;
const height = props.isPreview ? 550 : 500;
const height = props.isPreview ? 550 : 240;
return (
<SankeyChart
height={height}
height={height}
data={data}
inGrid={!props.isPreview}
onChartClick={(filters: any) => {
dashboardStore.drillDownFilter.merge({ filters, page: 1 });
}}