cytoscape.js - Change default size of nodes -


i'm starting use awesome library , want simple thing: change size of nodes.

when nodes server, have size attribute, integer between 1 , 6. display size of node in consequence.

i've tried weight attribute:

for (var = 0; < self.galaxy.nodes.length; i++) {         cy.add({             group: 'nodes',             data: { id: self.galaxy.nodes[i].id.tostring(), weight: self.galaxy.nodes[i].size },             position: { x: self.galaxy.nodes[i].x , y: self.galaxy.nodes[i].y}         });     } 

but unfortunately, size remains constant, , can't find direction in doc. have clue me?

you can set width , height of nodes in stylesheet, using mapper on weight.


Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

amazon web services - Installing MobileFirst 7.0 server on AWS -

Non Unique Username with ASP.Net Identity 2.0 -