(fix)(chat-sdk)Fix the pie chart display conditions (#2255)

This commit is contained in:
WDEP
2025-05-20 22:26:13 +08:00
committed by GitHub
parent 2fd82cc259
commit 1b8cd7f0d3

View File

@@ -122,7 +122,7 @@ const ChatMsg: React.FC<Props> = ({
}
const isMetricPie =
metricFields.length > 0 &&
categoryField.length > 0 &&
metricFields?.length === 1 &&
(isMobile ? dataSource?.length <= 5 : dataSource?.length <= 10) &&
dataSource.every(item => item[metricFields[0].bizName] > 0);