Sha256: b529afb28ea18ddf26796906dbc1959636d3a452188dd189ba0fe08103b97a91

Contents?: true

Size: 458 Bytes

Versions: 1

Compression:

Stored size: 458 Bytes

Contents

<h3><%=h metric.name %></h3>
<%= simple_format h(Vanity::Metric.description(metric).to_s), :class=>"description" %>
<%  data = Vanity::Metric.data(metric)
    min, max = data.map(&:last).minmax
    js = data.map { |date,value| "['#{date.to_time.httpdate}',#{value}]" }.join(",") %>
<div class="chart"></div>
<script type="text/javascript">
$(function () { Vanity.metric("<%= id %>").plot([{ label: "<%=h metric.name %>", data: [<%= js %>] }]); });
</script>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vanity-1.2.0 lib/vanity/templates/_metric.erb