Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
buche-cytoscape
Advanced tools
Buche plugin for the cytoscape graph library.
Provides the cytoscape-graph
component and the cytoscape
channel type.
First you must output the following buche
command:
{"command":"require","path":"/","pluginName":"cytoscape"}
Buche will prompt you to install the plugin if it is not available, although you can install it manually with buche --install cytoscape
.
cytoscape
channelThe cytoscape
channel lets you define a graph and add nodes and edges in real time.
{"command":"open","path":"/graph","type":"cytoscape","options":{"style":"<style or path>","layout":{"name":"cola"}, ...}}
For the possible options
, see: http://js.cytoscape.org/#core/initialisation
The style can be given as a string, as a path to a css file, or as a JSON structure as described in cytoscape's documentation. See: http://js.cytoscape.org/#style
Then you can use the element
command to add nodes and edges. There is a simple and basic way to do it, and a more full-featured one.
This create a node with id A
:
{"command":"element","path":"/graph","id":"A"}
This creates an edge between nodes A
and B
, but note that both must exist before the edge can be defined.
{"command":"element","path":"/graph","source":"A","target":"B"}
You can give an options
object with more customization. Available options: http://js.cytoscape.org/#notation/elements-json
{"command":"element","path":"/graph","options": {"data": {"source":"A","target":"B"},"classes":"abc"}}
cytoscape-graph
componentDefines a self-contained graph in a single tag.
Children of the cytoscape-graph
tag must be:
<style>...</style>
, a the style for the graph. See: http://js.cytoscape.org/#style<config>...</config>
contains the options. See: http://js.cytoscape.org/#core/initialisation<element>...</element>
defines a graph element. See: http://js.cytoscape.org/#notation/elements-json<cytoscape-graph>
<style>
node {
background-color: blue;
content: data(id);
}
edge {
line-color: green;
target-arrow-color: green;
target-arrow-shape: triangle;
curve-style: bezier;
}
</style>
<config>
{
"layout": {"name": "cose"}
}
</config>
<element>{"data": {"id": "A"}}</element>
<element>{"data": {"id": "B"}}</element>
<element>{"data": {"id": "C"}}</element>
<element>{"data": {"id": "D"}}</element>
<element>{"data": {"id": "E"}}</element>
<element>{"data": {"source": "A", "target": "B"}}</element>
<element>{"data": {"source": "B", "target": "C"}}</element>
<element>{"data": {"source": "C", "target": "A"}}</element>
<element>{"data": {"source": "A", "target": "D"}}</element>
<element>{"data": {"source": "D", "target": "E"}}</element>
</cytoscape-graph>
FAQs
Cytoscape channel and element for Buche.
We found that buche-cytoscape demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.