toolkit/exemples/streamgraph/script.js
author Nicolas Sauret <nicolas.sauret@iri.centrepompidou.fr>
Thu, 10 Apr 2014 14:20:23 +0200
changeset 47 c0b4a8b5a012
child 50 f68ecaf5265e
permissions -rw-r--r--
add toolkit.html + démonstrateurs


var r = new Relations();

var couleurs = new Couleurs(20);

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


var streamgraph = new Streamgraph(json, parametresStreamgraph);

var parametresStreamgraphTimeline = {
		name: "streamgraphTimeline",
		selector: "#streamgraphTimeline",
		activerSelection : true,
		activerTimeline: true,
		hauteur: 50,
		largeur: 900,
		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);
}
//*/