function drawCases(cfg, group, repeat) {
const shape = group.get('children')[0];
const metrics = cfg.metrics;
const performance = metrics.performance;
const startPoint = shape.getPoint(0);
for (const [key, value] of Object.entries(performance)) {
if (key == 'label') {
continue;
}
const circle = group.addShape('circle', {
attrs: {
x: startPoint.x,
y: startPoint.y,
fill: '#5B8FF9',
r: 3
},
name: 'marker-shape'
});
const duration = Math.log10(value);
circle.animate(ratio => shape.getPoint(ratio), {
callback: () => {
if (!repeat) {
group.removeChild(circle);
}
},
repeat: repeat,
duration: duration * 2 * SECOND
});
}
}