mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 11:58:10 +08:00
fix:避免 sparklink 相同值的时候除零 (#1261)
This commit is contained in:
parent
d2af76fc2a
commit
3c3b5a251d
@ -39,7 +39,7 @@ export class SparkLine extends React.Component<SparkLineProps> {
|
||||
const values = value!.map(item => this.normalizeValue(item));
|
||||
const max = Math.max(...values);
|
||||
const min = Math.min(...values);
|
||||
const duration = max - min;
|
||||
const duration = max - min || 1;
|
||||
|
||||
const gap = width / (values.length - 1);
|
||||
const points: Array<{
|
||||
|
Loading…
Reference in New Issue
Block a user