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 -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -