Browse Source

fix: Pie chart disappears when percent is 0

pull/2214/merge
wonderjar 8 years ago
committed by 偏右
parent
commit
5b2daa657b
  1. 4
      src/components/Charts/Pie/index.js

4
src/components/Charts/Pie/index.js

@ -167,7 +167,7 @@ class Pie extends Component {
}, },
}; };
if (percent) { if (percent || percent === 0) {
selected = false; selected = false;
tooltip = false; tooltip = false;
formatColor = value => { formatColor = value => {
@ -227,7 +227,7 @@ class Pie extends Component {
tooltip={tooltip && tooltipFormat} tooltip={tooltip && tooltipFormat}
type="intervalStack" type="intervalStack"
position="percent" position="percent"
color={['x', percent ? formatColor : defaultColors]} color={['x', percent || percent === 0 ? formatColor : defaultColors]}
selected={selected} selected={selected}
/> />
</Chart> </Chart>

Loading…
Cancel
Save