Interface NeovisConfig

Example

//simple
{
containerId: "viz",
neo4j: {
serverUrl: "bolt://localhost:7687",
serverUser: "neo4j",
serverPassword: "sorts-swims-burglaries"
},
labels: {
Character: {
label: "name",
value: "pagerank",
group: "community"
}
},
relationships: {
INTERACTS: {
value: "weight"
}
},
initialCypher: "MATCH (n)-[r:INTERACTS]->(m) RETURN n,r,m"
}
// advance
{
containerId: 'viz',
neo4j: {
serverUrl: 'bolt://localhost:7687',
serverUser: 'neo4j',
serverPassword: 'gland-presentation-worry'
},
visConfig: {
nodes: {
shape: 'square'
},
edges: {
arrows: {
to: {enabled: true}
}
},
},
labels: {
Character: {
label: 'pagerank',
group: 'community',
[Neovis.NEOVIS_ADVANCED_CONFIG]: {
cypher: {
value: "MATCH (n) WHERE id(n) = $id RETURN n.size"
},
function: {
title: (node) => {
return viz.nodeToHtml(node, undefined);
}
},
}
}
},
relationships: {
INTERACTS: {
value: 'weight',
[Neovis.NEOVIS_ADVANCED_CONFIG]: {
function: {
title: (edge) => {
return viz.nodeToHtml(edge, undefined);
}
},
}
}
},
initialCypher: 'MATCH (n)-[r]->(m) RETURN n,r,m'
}

Hierarchy

Properties

consoleDebug?: boolean

Should output debug messages to console

Default

false
containerId: string

Html id of the element you want Neovis to render on

dataFunction?: DataFunctionType

function to get fetch data instead of neo4j driver

it needs to return a list of records

example in examples/simple-dataFunction-example.html

groupAsLabel?: boolean

Should group be the label

Default

true
initialCypher?: string

The Cypher query that will get the data

labels?: {
    [NEOVIS_DEFAULT_CONFIG]?: LabelConfig;
    [label: string]: LabelConfig;
}

Example

{
Character: {
label: 'pagerank',
group: 'community',
[Neovis.NEOVIS_ADVANCED_CONFIG]: {
cypher: {
value: "MATCH (n) WHERE id(n) = $id RETURN n.size"
},
function: {
title: (node) => {
return viz.nodeToHtml(node, undefined);
}
},
}
}
}

Type declaration

neo4j?: Driver | Neo4jConfig

Neo4j Driver instance or configuration to make one

nonFlat?: false

Tells Neovis is the config is flat or not

Default

false
relationships?: {
    [NEOVIS_DEFAULT_CONFIG]?: RelationshipConfig;
    [relationship: string]: RelationshipConfig;
}

Example

{
INTERACTS: {
value: 'weight',
[Neovis.NEOVIS_ADVANCED_CONFIG]: {
function: {
title: (edge) => {
return viz.nodeToHtml(edge, undefined);
}
},
}
}
}

Type declaration

serverDatabase?: string

database name you want to connect to

Default

neo4j
visConfig?: Options

Vis network config to override neovis defaults

Link

https://visjs.github.io/vis-network/docs/network/#options

Generated using TypeDoc