how to load and apply json vizmap (exported from Cy3) to cytoscape.js? -
Cy3- To load the exported network, it works great:
cy.add (network.elements); // Where 'Network' is exported to the GSN object by SI3
What loads the command and applies to the exported vizmap? This command was completed, but the visual style of the network does not give us any similarity in the appearance of the SI3.
cystyle () FromJson (vizmap) .update () // Where 'Vizmap' is a JSON vizmap object from C3
Advice, any? Maybe a small example?
Thank you!
- Paul
after this init Instead of loading, instead you have tried to use the init option instead where the style is specified.
cytoscape ({style: networkJson.path.to.style, element: networkJson.path.to.elements // ...});
Edit: It seems that the cytoscape desktop generates JSON in this way
[{"title": "hallmarksOfCancer", "style" 1.0, "font-size": 20, "size": "oval", "border-width": ["background-color": "RGB (255255255)", "background-color": "side" opacity " : 1.0, "border-color": "RGB (0,0,0)", "color": "sanser", "fonts-family": "sanserf", "font-family", "font-family": "RGB (0,0,0)", "height": 30.0, "text-valve": "center", "text-halen" "" "" ("broad" ("Width": 140.0}}, {"width": 140.0}}, "" "" "", "content": "data (label)"}}, {"selector": "node [score> 4.6] Selector ":" node [score = 4.6] "," CSS ": {" width ": 140.0}}, {" selector ":" node [score> 0.0] [score and lt; 4.6] "," CSS " In that situation, you can use some code: Style: "Width": "map data (Score, 0.04.6, 70.0,140.0)"}},
Vision [i]. Style is located in your init options, where i
0 code> 0> i
) you want to use.
Comments
Post a Comment