@@ -27,6 +27,7 @@ import type { ValueGroups, OnClickPopoverDropdownProps } from 'views/components/
2727const PieOnClickPopoverDropdown = ( { clickPoint, config, setFieldData } : OnClickPopoverDropdownProps ) => {
2828 const { rowPivotValues, columnPivotValues, metricValue } = useMemo < ValueGroups > ( ( ) => {
2929 if ( ! clickPoint || ! config ) return { } ;
30+
3031 const traceColor = getHoverSwatchColor ( clickPoint ) ;
3132 const splitNames : Array < string | number > = ( clickPoint . data . originalName ?? clickPoint . data . name ) . split (
3233 keySeparator ,
@@ -57,17 +58,19 @@ const PieOnClickPopoverDropdown = ({ clickPoint, config, setFieldData }: OnClick
5758 metricValue : {
5859 value : clickPoint . value ,
5960 field : metric ,
60- text : `${ String ( clickPoint . text ?? clickPoint ?. value ) } ` ,
61+ text : `${ String ( clickPoint ?. value ) } ` ,
6162 traceColor,
6263 } ,
6364 } ;
6465 } , [ clickPoint , config ] ) ;
6566
6667 const formatedPercentageValue = useMemo ( ( ) => {
67- const { value, unit } = getPrettifiedValue ( clickPoint ?. percent , { abbrev : 'd%' , unitType : 'percent' } ) ;
68+ if ( ! clickPoint . percent ) return clickPoint . text ;
69+
70+ const { value, unit } = getPrettifiedValue ( clickPoint . percent , { abbrev : 'd%' , unitType : 'percent' } ) ;
6871
6972 return formatValueWithUnitLabel ( value , unit ?. abbrev ) ;
70- } , [ clickPoint ? .percent ] ) ;
73+ } , [ clickPoint . percent , clickPoint . text ] ) ;
7174
7275 return (
7376 < Popover . Dropdown title = { formatedPercentageValue } >
0 commit comments