JSFiddle - React, Tailwind, and code Playground
by Osvaldo
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.min.js" defer></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.min.css" rel="stylesheet" type="text/css" />
<div id="mynetwork" style="background-color: #f6f6f5; height: 400px; border: none; margin-bottom: 1em;"></div>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(event) {
var nodes = null;
var edges = null;
var network = null;
function draw() {
var DIR = 'https://apps.greenpeace.es/data-vis/img/network/';
nodes = [{
id: 1,
shape: 'image',
image: DIR + '1.png',
label: "Flor1"
},
{
id: 2,
shape: 'image',
image: DIR + '2.png',
label: "Flor2"
},
{
id: 3,
shape: 'image',
image: DIR + '3.png',
label: "Flor3"
},
{
id: 4,
shape: 'image',
image: DIR + '4.png',
label: "El jefe"
},
{
id: 5,
shape: 'image',
image: DIR + '5.png',
label: "Fruto"
},
{
id: 6,
shape: 'image',
image: DIR + '6.png',
label: "Insecto"
},
{
id: 7,
shape: 'image',
image: DIR + '7.png',
label: "Perro"
},
{
id: 8,
shape: 'image',
image: DIR + '8.png',
label:...