> For the complete documentation index, see [llms.txt](https://docs.bdb.ai/feature-list/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bdb.ai/feature-list/8.x/team-feature/dashboard-charting/knowledge-graph-chart/sample-library-based-code.md).

# Sample Library based code

```
// Some code
var nodes = new vis.DataSet([
    {id: 1, label: 'Entity 1', color: 'red'},
    {id: 2, label: 'Entity 2', color: 'blue'},
    {id: 3, label: 'Entity 3', color: 'green'}
]);

var edges = new vis.DataSet([
    {from: 1, to: 2, label: 'Attribute 1'},
    {from: 2, to: 3, label: 'Attribute 2'},
    {from: 3, to: 1, label: 'Attribute 3'}
]);

var container = document.getElementById('visualization');

var data = {
    nodes: nodes,
    edges: edges
};

var options = {
    nodes: {
        shape: 'dot',
        size: 20
    },
    edges: {
        font: {
            size: 10
        },
        arrowStrikethrough: false
    }
};

var network = new vis.Network(container, data, options);

```
