how to cytoscape.js with mysql database? would you please give me some example?

418 views
Skip to first unread message

tony bhuk

unread,
Oct 29, 2013, 11:01:44 AM10/29/13
to cytoscap...@googlegroups.com
Dear all
            i'm studying about social network and i would like to develope some app in php with mysql. i want to create social network analysis from database . please help.

best regards,
tony

Amp

unread,
Oct 30, 2013, 1:15:47 AM10/30/13
to cytoscap...@googlegroups.com
Hi Tony,

So, your data must be in a format which represent some connection. See this example which I have copied from the website:

elements: {
      nodes: [
        {
          data: { id: 'j', name: 'Jerry', weight: 65, height: 174 }
        },

        {
          data: { id: 'e', name: 'Elaine', weight: 48, height: 160 }
        },

        {
          data: { id: 'k', name: 'Kramer', weight: 75, height: 185 }
        }
      ],

      edges: [ //Show connections to whom ... j to e, j to k etc
        { data: { source: 'j', target: 'e' } },
        { data: { source: 'j', target: 'k' } }
      ],
    },

the above is static one, to make it dynamic you have to the pull data from database and convert to JSON fromat and add to those arrays 'nodes' and 'edges'.
Reply all
Reply to author
Forward
0 new messages