File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
src/Common/SegmentedBarChart Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -45,22 +45,19 @@ const SegmentedBarChart: React.FC<SegmentedBarChartProps> = ({
45
45
46
46
const renderContent = ( ) => {
47
47
if ( isProportional ) {
48
- return entities ?. map ( ( entity ) => {
49
- if ( entity . value === 0 ) {
50
- return null
51
- }
52
- return (
48
+ return entities
49
+ . filter ( ( entity ) => ! ! entity . value )
50
+ . map ( ( entity ) => (
53
51
< div className = "flexbox-col" >
54
52
{ renderValue ( entity . value , entity . label ) }
55
53
< div className = "flex left dc__gap-6" >
56
54
< span style = { { backgroundColor : entity . color } } className = "h-12 dc__border-radius-2 w-4" />
57
55
{ renderLabel ( entity . label ) }
58
56
</ div >
59
57
</ div >
60
- )
61
- } )
58
+ ) )
62
59
}
63
- return entities ? .map ( ( entity ) => (
60
+ return entities . map ( ( entity ) => (
64
61
< div className = { `${ isProportional ? 'flexbox-col' : 'flexbox dc__gap-4 dc__align-items-center' } ` } >
65
62
< div className = "dot" style = { { backgroundColor : entity . color , width : '10px' , height : '10px' } } />
66
63
{ renderValue ( entity . value , entity . label ) }
You can’t perform that action at this time.
0 commit comments