Browse Source

all

hanyuqing
hanyuqing 3 months ago
parent
commit
d55d9374bf
  1. 6
      vue/src/system/GraphDemo.vue

6
vue/src/system/GraphDemo.vue

@ -597,13 +597,13 @@ export default {
labelText: (d) => d.data.relationship.properties.label,
stroke: (d) => {
// target label
const targetLabel = this._nodeLabelMap.get(d.target); // d.target ID
const targetLabel = this._nodeLabelMap.get(d.source); // d.target ID
// target
if (targetLabel === 'Disease') return 'rgba(239,68,68,0.5)';
if (targetLabel === 'Drug') return 'rgba(145,204,117,0.5)';
if (targetLabel === 'Symptom') return 'rgba(250,200,88,0.5)';
if (targetLabel === 'Check') return 'rgba(89,209,212,0.5)'; //
return 'rgba(51,110,238,0.5)'; // default
if (targetLabel === 'Check') return 'rgba(51,110,238,0.5)'; //
return 'rgba(89,209,212,0.5)'; // default
},
// labelFill: (d) => {
// // target label

Loading…
Cancel
Save