 				dots.on("mouseover", mouseOn)
 				dots.on("mouseout", mouseOff)
 
+
+
+			#controls
+			$(container).append("<div></div>")
+			that.controls = $(container).find("div")
+			#create svg
+			$(container).append("<svg></svg>")
+
+
+			console.log "Graph initInstance"
+			that.render=(container,model,id)->
+				rendering = {}
+				
+				that.updateSVG(container,model)
+
+				updateControls(that.controls)
+
 				rendering.update = (item)->
 					console.log "render.update called"
 

			# Not sure 
			that.hasLensFor = -> true

			#create svg
			$(container).append("<svg></svg>")

			console.log "Graph initInstance"
			that.render=(container,model,id)->
				rendering = {}
				console.log "graph render called"
				#clean the svg
				d3.select(container).select("svg").remove()
				#svg specs

				data = []
				while i < items.length
					d = {}
					d[xvar] = model.getItem(items[i])[xvar]
					d[yvar]= model.getItem(items[i])[yvar]
					d.name = model.getItem(items[i]).name
					data.push d
					i++
				x.domain(d3.extent(data, (d) ->
					d[xvar]
				)).nice()
				y.domain(d3.extent(data, (d) ->
					d[yvar]
				)).nice()
				svg.append("g").attr("class", "x axis").attr("transform", "translate(0," + height + ")").call(xAxis).append("text").attr("class", "label").attr("x", width).attr("y", -6).style("text-anchor", "end").text xvar
				svg.append("g").attr("class", "y axis").call(yAxis).append("text").attr("class", "label").attr("transform", "rotate(-90)").attr("y", 6).attr("dy", ".71em").style("text-anchor", "end").text yvar
				svg.selectAll(".dot").data(data).enter().append("circle").attr("class", "dot").attr("r", 6).style("opacity", 0.5).attr("cx", (d) ->
					x d[xvar]
				).attr("cy", (d) ->
					y d[yvar]
				).style "fill", (d) ->
					color d.name

