179 lines
3.7 KiB
JavaScript
179 lines
3.7 KiB
JavaScript
|
import React from 'react';
|
||
|
import Graph from './Graph.js';
|
||
|
|
||
|
// const config = {
|
||
|
// automaticRearrangeAfterDropNode: true,
|
||
|
// node: {
|
||
|
// color: 'lightgreen',
|
||
|
// size: 240,
|
||
|
// fontSize: 14,
|
||
|
// highlightStrokeColor: 'blue',
|
||
|
// labelProperty: 'name'
|
||
|
// },
|
||
|
// link: {
|
||
|
// highlightColor: 'lightblue'
|
||
|
// }
|
||
|
// };
|
||
|
|
||
|
const nodes = {
|
||
|
Q2840: {
|
||
|
id: 'Q2840',
|
||
|
name: 'Grippe',
|
||
|
types: ['Maladie'],
|
||
|
weight: 0.000035
|
||
|
},
|
||
|
Q154882: {
|
||
|
id: 'Q154882',
|
||
|
name: 'Légionellose',
|
||
|
types: ['Maladie'],
|
||
|
weight: 0.000015
|
||
|
},
|
||
|
Q155098: {
|
||
|
id: 'Q155098',
|
||
|
name: 'Leptospirose',
|
||
|
types: ['Maladie'],
|
||
|
weight: 0.00001
|
||
|
},
|
||
|
Q326663: {
|
||
|
id: 'Q326663',
|
||
|
name: 'Encéphalite à tiques',
|
||
|
types: ['Maladie'],
|
||
|
weight: 0.000001
|
||
|
},
|
||
|
Q133780: {
|
||
|
id: 'Q133780',
|
||
|
name: 'Peste',
|
||
|
types: ['Maladie'],
|
||
|
weight: 0.000032
|
||
|
},
|
||
|
Q38933: {
|
||
|
id: 'Q38933',
|
||
|
name: 'Fièvre',
|
||
|
types: ['Symptôme']
|
||
|
},
|
||
|
Q474959: {
|
||
|
id: 'Q474959',
|
||
|
name: 'Myalgie',
|
||
|
types: ['Symptôme']
|
||
|
},
|
||
|
Q86: {
|
||
|
id: 'Q86',
|
||
|
name: 'Céphalée',
|
||
|
types: ['Signe']
|
||
|
},
|
||
|
Q1115038: {
|
||
|
id: 'Q1115038',
|
||
|
name: 'Rhinorrhée',
|
||
|
types: ['Symptôme']
|
||
|
},
|
||
|
Q9690: {
|
||
|
id: 'Q9690',
|
||
|
name: 'Fatigue',
|
||
|
types: ['Symptôme']
|
||
|
},
|
||
|
Q127076: {
|
||
|
id: 'Q127076',
|
||
|
name: 'Vomissement',
|
||
|
types: ['Symptôme', 'Signe']
|
||
|
},
|
||
|
Q178061: {
|
||
|
id: 'Q178061',
|
||
|
name: 'Choc circulatoire',
|
||
|
types: ['Maladie'],
|
||
|
weight: 0.000038
|
||
|
},
|
||
|
Q35805: {
|
||
|
id: 'Q35805',
|
||
|
name: 'Toux',
|
||
|
types: ['Symptôme', 'Signe']
|
||
|
},
|
||
|
Q647099: {
|
||
|
id: 'Q647099',
|
||
|
name: 'Hémoptysie',
|
||
|
types: ['Symptôme']
|
||
|
},
|
||
|
Q653197: {
|
||
|
id: 'Q653197',
|
||
|
name: 'Rash',
|
||
|
types: ['Symptôme', 'Signe']
|
||
|
},
|
||
|
Q160796: {
|
||
|
id: 'Q160796',
|
||
|
name: 'Syndrome confusionnel',
|
||
|
types: ['Maladie'],
|
||
|
weight: 0.000004
|
||
|
},
|
||
|
Q186235: {
|
||
|
id: 'Q186235',
|
||
|
name: 'Myocardite',
|
||
|
types: ['Maladie'],
|
||
|
weight: 0.0000075
|
||
|
},
|
||
|
Q476921: {
|
||
|
id: 'Q476921',
|
||
|
name: 'Insuffisance rénale',
|
||
|
types: ['Maladie'],
|
||
|
weight: 0.0000046
|
||
|
},
|
||
|
Q281289: {
|
||
|
id: 'Q281289',
|
||
|
name: 'Photophobie',
|
||
|
types: ['Signe']
|
||
|
},
|
||
|
Q159557: {
|
||
|
id: 'Q159557',
|
||
|
name: 'Coma',
|
||
|
types: ['Signe']
|
||
|
}
|
||
|
};
|
||
|
|
||
|
const edges = [
|
||
|
['Q2840', 'Q38933'],
|
||
|
['Q2840', 'Q1115038'],
|
||
|
['Q2840', 'Q474959'],
|
||
|
['Q2840', 'Q86'],
|
||
|
['Q2840', 'Q9690'],
|
||
|
|
||
|
['Q154882', 'Q86'],
|
||
|
['Q154882', 'Q38933'],
|
||
|
['Q154882', 'Q35805'],
|
||
|
['Q154882', 'Q474959'],
|
||
|
|
||
|
['Q155098', 'Q38933'],
|
||
|
['Q155098', 'Q474959'],
|
||
|
['Q155098', 'Q86'],
|
||
|
['Q155098', 'Q476921'],
|
||
|
['Q155098', 'Q186235'],
|
||
|
['Q155098', 'Q653197'],
|
||
|
|
||
|
['Q326663', 'Q86'],
|
||
|
['Q326663', 'Q474959'],
|
||
|
['Q326663', 'Q38933'],
|
||
|
['Q326663', 'Q9690'],
|
||
|
['Q326663', 'Q281289'],
|
||
|
['Q326663', 'Q159557'],
|
||
|
['Q326663', 'Q127076'],
|
||
|
|
||
|
['Q133780', 'Q38933'],
|
||
|
['Q133780', 'Q86'],
|
||
|
['Q133780', 'Q127076'],
|
||
|
['Q133780', 'Q474959'],
|
||
|
['Q133780', 'Q178061'],
|
||
|
['Q133780', 'Q35805'],
|
||
|
['Q133780', 'Q647099'],
|
||
|
['Q133780', 'Q653197'],
|
||
|
['Q133780', 'Q160796']
|
||
|
];
|
||
|
|
||
|
const ResultsGraph = () => (
|
||
|
<div className="ResultsGraph">
|
||
|
<Graph
|
||
|
nodes={Object.keys(nodes)}
|
||
|
edges={edges}
|
||
|
render={id => nodes[id].name}
|
||
|
/>
|
||
|
</div>
|
||
|
);
|
||
|
|
||
|
export default ResultsGraph;
|