Fixed font.
This commit is contained in:
@@ -42,6 +42,10 @@ export const refFilter = data => {
|
||||
return Object.keys(map).map(key => ({ x: key, y: map[key], w: links[key] }));
|
||||
};
|
||||
|
||||
export const emptyFilter = data => {
|
||||
return data.map(item => (item.x ? item : null)).filter(n => n);
|
||||
};
|
||||
|
||||
export const percentFilter = data => {
|
||||
const total = data.reduce((n, { y }) => n + y, 0);
|
||||
return data.map(({ x, y, ...props }) => ({ x, y, z: total ? (y / total) * 100 : 0, ...props }));
|
||||
|
||||
Reference in New Issue
Block a user