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 { ...@@ -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 { ...@@ -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>
......
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