Sha256: fe194ebacf0272d47894395349b4310c0d785a78b332c7d65f4fe0c32b60b4c5
Contents?: true
Size: 598 Bytes
Versions: 29
Compression:
Stored size: 598 Bytes
Contents
<h3><%=vanity_h metric.name %></h3> <%= vanity_simple_format vanity_h(Vanity::Metric.description(metric).to_s), :class=>"description" %> <%= begin data = Vanity::Metric.data(metric) min, max = data.map(&:last).minmax js = data.map { |date,value| "['#{date.to_time.httpdate}',#{value}]" }.join(",") vanity_html_safe(%{<div class="chart"></div> <script type="text/javascript"> $(function(){Vanity.metric("#{vanity_h id.to_s}").plot([{label:"#{vanity_h metric.name}", data: [#{js}]}])}) </script>}) rescue Exception=>ex %{<div class="error">#{vanity_h ex.message}</div>} end %>
Version data entries
29 entries across 29 versions & 5 rubygems