<%= javascript_include_tag "rickshaw" %>
<%= javascript_include_tag "underscore.min" %>

<%= stylesheet_link_tag    "graphs_stacked" %>
<script src="/assets/graphs/stacked.js"></script>

<div class="slider" id="slider"></div>
<div id="chart_container">
	<div class="axis0" id="axis0">
		<div class="stub stub_left" id="axis0_stub"></div>
	</div>
	<div class="chart"  id="chart"></div>
	<% (1..@metrics.length-1).each do |n| %>
		<div class="axis1" id="axis<%=n%>" style="left: <%= 700 + 60 * n %>px" >
			<div class="stub stub_right" id="axis<%=n%>_stub"></div>
		</div>
	<% end %>
	<div class="x_axis" id="x_axis"></div>
	<div class="legend legend-indent" id="legend"></div>
</div>

<script>
	var data = []
	metrics =  []
	<% @metrics.each do |m| %>
		metrics.push("<%= m %>")
	<%end%>

	var graph;
	renderWaiting("chart")
	data = getMetrics(metrics)

	var intervalID;
	function startUpdates(){ intervalID = updateStacked() } 
	function stopUpdates() { clearInterval(intervalID) } 
</script>

<%= javascript_include_tag "rickshaw" %>
<%= javascript_include_tag "underscore.min" %>

<%= stylesheet_link_tag    "graphs_stacked" %>
<script src="/assets/graphs/stacked.js"></script>

<div class="col-md-10">
	<div class="slider" id="slider"></div>
</div>
<div class="col-md-10">
	<div id="chart_container">
		<div class="axis0" id="axis0">
			<div class="stub stub_left" id="axis0_stub"></div>
		</div>
		<div class="chart"  id="chart"></div>
		<% (1..@metrics.length-1).each do |n| %>
		<div class="axis1" id="axis<%=n%>" style="left: <%= 700 + 60 * n %>px" >
			<div class="stub stub_right" id="axis<%=n%>_stub"></div>
		</div>
		<% end %>
		<div class="x_axis" id="x_axis"></div>
		<div class="legend legend-indent" id="legend"></div>
	</div>
</div>

<script>
	var data = []
	metrics =  []
	<% @metrics.each do |m| %>
		metrics.push("<%= m %>")
	<%end%>

	var graph;
	renderWaiting("chart")
	data = getMetrics(metrics)

	var intervalID;
	function startUpdates(){ intervalID = updateStacked() } 
	function stopUpdates() { clearInterval(intervalID) } 
</script>

Put slider and chart into col div to prevent slider slipping off to the left on epic window width, batman
Put slider and chart into col div to prevent slider slipping off to the left on epic window width, batman
