Невозможно создать цвет для узлов, выполнив запрос labelPropogation - PullRequest
0 голосов
/ 28 декабря 2018

Чтобы получить кластер узлов одного цвета, нам нужно выполнить этот запрос:

 CALL algo.labelPropagation('cabinet_2','Parameter','privileges_2', 
{  write:true,   
 partitionProperty:'community', weightProperty:'count'})

Я также запустил это:

CALL algo.labelPropagation(null,null,'OUTGOING',{write:true, 
partitionProperty:'partition',   
   weightProperty:'count'})

Теперь, несмотря на выполнение этого запроса,нет разницы в узлах:

enter image description here

Я хочу равномерный цвет, как показано здесь:

enter image description here

Кроме того, должен ли я выполнить запрос Call algo .labelPropogation для всех узлов?

 var cypherQuery = "MATCH (n)-[r]->(m) RETURN n,r,m;";

     var config = {
         container_id: "viz",
         server_url: "bolt://localhost:11001/",
         server_user: "neo4j",
         server_password: "Virtuallib1",
         labels: {

             "ngoconnectionserviceimplhttpsoap11endpoint": {
                "thickness": "weight",
                "caption": true,
               "community": "partition",
                "sizeCypher": "MATCH (n) WHERE id(n) = {id} MATCH (n)-[r]-() RETURN sum(r.weight) AS c"
            },
            "ngoconnectionserviceimplhttpsoap12endpoint": {
               "thickness": "weight",
               "caption": true,
               "community": "partition",
               "sizeCypher": "MATCH (n) WHERE id(n) = {id} MATCH (n)-[r]-() RETURN sum(r.weight) AS c"
           },
           "connparams_2": {
            "thickness": "weight",
            "caption": true,
           "community": "partition",
            "sizeCypher": "MATCH (n) WHERE id(n) = {id} MATCH (n)-[r]-() RETURN sum(r.weight) AS c"
        },

        "connparams": {
            "thickness": "weight",
            "caption": true,
           "community": "partition",
            "sizeCypher": "MATCH (n) WHERE id(n) = {id} MATCH (n)-[r]-() RETURN sum(r.weight) AS c"
        },            

           "System": {
               "thickness": "weight",
               "caption": true,
               "community": "partition"
           },

         },
         relationships: {
             "Parameter": {
                 "thickness": "weight",
                 "caption": true,
                 "community": "partition",
                 "color":'red'
             },
             "Method": {
                "thickness": "weight",
                "caption": true,
                "community": "Blue",

            },

            "System": {
                "thickness": "weight",
                "caption": true,
                "community": "partition",

            },
         },

         cluster_labels: {
            "Parameter": "partition"
          },

         initial_cypher:cypherQuery ,        
        arrows: true,
        hierarchical_layout:true,
        hierarchical_sort_method:"directed",

     };  
...