Published
Edited
Jan 27, 2019
Insert cell
Insert cell
dot = require("@observablehq/graphviz@0.2")
Insert cell
dot`graph{a -- {b c};b--c;c--d}`
Insert cell
dot`graph { Мос -- к -- ва ; к --рем -- ль; ва -- рем}`
Insert cell
dot`digraph { a -> b -> c -> a; c -> b -> b;a->a}`
Insert cell
Insert cell
Insert cell
function haddock() {
var txt = "";
var personne = {
ANN : [ "en","fr","pt" ],
BIB : [ "en", "pt", "ru" ],
CHA : [ "en", "ru" ],
ДМИ : [ "en", "de", "pt", "ru" ],
EVI : [ "de", "sp", "ne"],
FRÉ : [ "fr", "sp", "ne" ],
GÜN : [ "de", "it" ],
HEL : [ "sp", "it" ]
};
var x;
for (x in personne) {
personne[x].map(function(s) {
txt += x + " -- " + s + " ; " ;
});
};
return txt
}
Insert cell
haddock()
Insert cell
dot `strict graph { ${haddock()} }`
Insert cell
Insert cell
Insert cell
dot `strict graph { ${haddock()} ${solution1} [color=red, penwidth=3]}`
Insert cell
Insert cell
Insert cell
Insert cell
// code de Tintin
function tintin() {
var txt = "";
var person = {
An : [ "Bi", "Ch", "Di", "Fr" ],
Bi : [ "An", "Ch", "Di" ],
Ch : [ "An", "Bi", "Di" ],
Di : [ "An", "Bi", "Ch", "Gu", "Ev" ],
Ev : [ "Di", "Gu", "He", "Fr"],
Fr : [ "An", "Ev", "He" ],
Gu : [ "Di", "Ev", "He" ],
He : [ "Ev", "Gu", "Fr" ]
};
var x;
for (x in person) {
person[x].map(function(s) {
txt += x + " -- " + s + " ; " ;
});
};
return txt
}
Insert cell
Insert cell
Insert cell
dot `strict graph { ${tintin()} ${solution2} [color=red, penwidth=3] }`
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more