3

我正在尝试通过 Neovis 更改gene_gene 关系边缘的颜色,但什么也没发生。我的配置代码如下,我想更改 Neovis 中gene_gene 关系的边缘,我试图设置“color”:“#F4606C”但失败了。我想问一下如何更改 Neovis 中边缘的显示颜色?

var sid = $("#inferred_title_name").val();
var config = {
    container_id: "viz_gene",
    server_url: "bolt://localhost:7687",
    server_user: "neo4j",
    server_password: "lucas",
    // arrows: true,
    initial_cypher: "MATCH (g1:Gene)-[r1]-(s1:Symptom) where s1.SymptomId=\""+sid+"\" optional match (g1)-[r2]-(g2:Gene)-[r3]-(s1) RETURN *",
    labels: {
        "Symptom": {
            caption: "SymptomId",
            size: 1,
            community: "community",
            image: '../static/images/sym.png',
            "font": {
                "size":10,
                "color":"#000000"
                }
            },
        "Disease": {
            caption: "DiseaseId",
            size: "degree",
            community: "community",
            image: '../static/images/dis.png',
            "font": {
                "size":10,
                "color":"#000000"
                }
            },
        "Gene": {
            caption: "GeneId",
            size: "degree",
            community: "community",
            image: '../static/images/gene.png',
            "font": {
                "size":10,
                "color":"#000000"
                }
            },
        "Drug": {
            caption: "DrugId",
            size: "degree",
            community: "community",
            image: '../static/images/drug.png',
            "font": {
                "size":10,
                "color":"#000000"
                }
            }
        },
    relationships: {
        "Symptom_Disease": {
            caption: "false",
            thickness: "count",
            "font": {
                "size":10,
                "color":"#000000"
            }
        },
        "Symptom_Drug": {
            caption: "false",
            thickness: "count",
            "font": {
                "size":10,
                "color":"#000000"
            }
        },
        "Disease_Drug": {
            caption: "false",
            thickness: "count",
            "font": {
                "size":10,
                "color":"#000000"
            }
        },
        "Symptom_Gene": {
            caption: "false",
            thickness: "count",
            "font": {
                "size":10,
                "color":"#000000"
            },
            "line":{
                "color":"#FD978F"
            }
        },
        "Gene_Gene": {
            caption: "false",
            thickness: "count",
            "font": {
                "size":10,
                "color":"#000000"
            },
            "color":"F4606C"
        },
        "Drug_Drug": {
            caption: "false",
            thickness: "count",
            "font": {
                "size":10,
                "color":"#FD978F"
            }
        }
    },
    };
viz_gene = new NeoVis.default(config);
viz_gene.render();
4

0 回答 0