Commit 31b8213f authored by nikogu's avatar nikogu

fixed Pie all 0 NaN #645

parent 522ddd88
...@@ -228,7 +228,9 @@ export default class Pie extends Component { ...@@ -228,7 +228,9 @@ export default class Pie extends Component {
/> />
<span className={styles.legendTitle}>{item.x}</span> <span className={styles.legendTitle}>{item.x}</span>
<Divider type="vertical" /> <Divider type="vertical" />
<span className={styles.percent}>{`${(item.percent * 100).toFixed(2)}%`}</span> <span className={styles.percent}>
{`${(isNaN(item.percent) ? 0 : item.percent * 100).toFixed(2)}%`}
</span>
<span <span
className={styles.value} className={styles.value}
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
......
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