Commit 5b2daa65 authored by wonderjar's avatar wonderjar Committed by 偏右

fix: Pie chart disappears when percent is 0

parent 985b81e2
......@@ -167,7 +167,7 @@ class Pie extends Component {
},
};
if (percent) {
if (percent || percent === 0) {
selected = false;
tooltip = false;
formatColor = value => {
......@@ -227,7 +227,7 @@ class Pie extends Component {
tooltip={tooltip && tooltipFormat}
type="intervalStack"
position="percent"
color={['x', percent ? formatColor : defaultColors]}
color={['x', percent || percent === 0 ? formatColor : defaultColors]}
selected={selected}
/>
</Chart>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment