Elevator Pitch
Provide a read/write JSON-compatible structure for instantiating and "serializing" the configuration of a forcegraph
Motivation
Having a single, JSON-schema constrained description of a force graph's configuration would simplify a number of use cases.
Additionally, as JSON, it would be theoretically possible to create a mime renderer of a force graph, with this as the metadata. This might be a lower-touch way for other modules to emit a snaphshot of a graph.
Design Ideas
This would allow for something like:
ForceGraph(
source=src,
json={
"alpha_decay": {},
"node_labels": {"template": "{{ node.label }}"},
"node_selection": {"selected": [1,2,3]}
}
)
Under the hood these would map to the existing behaviors.
It should then also be possible to extract this back out.
Limitations
It would be challenging to extract de-referenced pointers to the behaviors: this could be somewhat fixed by one of:
- make
behaviors an OrderedDict or InstanceDict
- adding a
name to each of the behaviors, and exposing them as a "squishy" @property or other getter approach
- this would then need a
@T.validate to ensure each has a unique name
Elevator Pitch
Provide a read/write JSON-compatible structure for instantiating and "serializing" the configuration of a forcegraph
Motivation
Having a single, JSON-schema constrained description of a force graph's configuration would simplify a number of use cases.
Additionally, as JSON, it would be theoretically possible to create a mime renderer of a force graph, with this as the metadata. This might be a lower-touch way for other modules to emit a snaphshot of a graph.
Design Ideas
This would allow for something like:
Under the hood these would map to the existing behaviors.
It should then also be possible to extract this back out.
Limitations
It would be challenging to extract de-referenced pointers to the behaviors: this could be somewhat fixed by one of:
behaviorsanOrderedDictorInstanceDictnameto each of the behaviors, and exposing them as a "squishy"@propertyor other getter approach@T.validateto ensure each has a unique name