toolkit/exemples/streamgraph/script.js
author Nicolas Sauret <nicolas.sauret@iri.centrepompidou.fr>
Wed, 16 Apr 2014 14:59:23 +0200
changeset 50 f68ecaf5265e
parent 47 c0b4a8b5a012
permissions -rw-r--r--
add visualisation dossiers + general editing


var r = new Relations();

var couleurs = new Couleurs(20);

//*
var parametresStreamgraph = {
	name: "streamgraph",
	selector: "#streamgraph",
	hauteur: 300,
	largeur: 830,
	relations: r,
	couleurs: couleurs
};


var streamgraph = new Streamgraph(json, parametresStreamgraph);

var parametresStreamgraphTimeline = {
		name: "streamgraphTimeline",
		selector: "#streamgraphTimeline",
		activerSelection : true,
		activerTimeline: true,
		hauteur: 50,
		largeur: 830,
		relations: r
	};

var streamgraphTimeline = new Streamgraph(json, parametresStreamgraphTimeline);
//*/

//*
r.get("streamgraphTimeline").bind("selectionResize","streamgraph",
		function(objet, params) { objet.resize(params[0], params[1]); });

for (var i = 0; i<10; ++i) {
	r.get("streamgraph.cluster." + i)
		.mouseover(streamgraph.focus)
		.mouseout(streamgraph.blur);
}
//*/