toolkit/exemples/streamgraph/script.js
author Nicolas Sauret <nicolas.sauret@iri.centrepompidou.fr>
Fri, 18 Apr 2014 14:31:58 +0200
changeset 51 79833eaa394a
parent 50 f68ecaf5265e
permissions -rw-r--r--
set up second level for navigation


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);
}
//*/