Download presentation
Presentation is loading. Please wait.
1
Sparklines
2
Galileo’s Sparklines
3
ET’s Sparklines
4
sudo gem install rmagick
sudo gem install sparklines sudo gem install sparklines_generator ruby script/generate sparklines require 'sparklines' class MyController < ApplicationController helper :sparklines end
5
Using the sparkline_tag Helper
<% sparkline_tag [array of ints 0-100], :type => "type", options… %> <%= sparkline_tag [49,23,89,10,86,37,32], :type => 'smooth' %> <%= sparkline_tag [49,23,89,10,86,37,32], :type => 'discrete', :upper => 50, :above_color => "red"%>
6
Creating Your Own Sparkline
def self.spark_name( array, options, max_value ) Must return a PNG image blob.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.