network = {
if (jsonNetwork.edges.length) {
jsonNetwork.edges.forEach(edge => {
let linewidth;
let label;
const primarySelectedMetric =
edge.metrics[perf_mapping[primaryEdgeInfoSelect]];
const primaryEdgeInfo = getSelectedMetric(
primarySelectedMetric,
primaryEdgeInfoSelect
);
const secondarySelectedMetric =
edge.metrics[perf_mapping[secondaryEdgeInfoSelect]];
const secondaryEdgeInfo = getSelectedMetric(
secondarySelectedMetric,
secondaryEdgeInfoSelect
);
edge.primaryLabel = primaryEdgeInfo.label;
edge.secondaryLabel = secondaryEdgeInfo.label;
edge.lineWidth = primaryEdgeInfo.lineWidth;
});
return jsonNetwork;
}
}