Sha256: a6667891f0df3786b02594d40911f528c9efdbdc4caf08db4a1f75588df09c86

Contents?: true

Size: 1.1 KB

Versions: 2

Compression:

Stored size: 1.1 KB

Contents

Prawn::ManualBuilder::Example.generate 'squid.pdf' do
  package 'squid' do |p|
    p.name = 'Squid'

    p.intro do
      prose('
        Prawn is a great library to generate PDF files from Ruby, but lacks high-level components to generate graphs.
        Squid integrates Prawn by providing methods to plot charts in PDF files with few lines of code.
        This manual shows:
      ')

      list(
        'How to create graphs',
      )
    end

    p.section 'Basics' do |s|
      s.example 'basic'
      s.example 'legend'
    end
    
    p.section 'Chart types' do |s|
      s.example 'point'
      s.example 'line'
    end
    
    p.section 'Styling' do |s|
      s.example 'height'
      s.example 'baseline'
      s.example 'ticks'
      s.example 'every'
      s.example 'gridlines'
      s.example 'format'
      s.example 'border'
      s.example 'labels'
      s.example 'line_width'
      s.example 'legend_offset'
    end
    
    p.section 'Multiple series' do |s|
      s.example 'columns'
      s.example 'lines'
      s.example 'points'
      s.example 'stacks'
      s.example 'two_axis'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
squid-1.0.0.beta2 examples/squid/squid.rb
squid-1.0.0.beta1 examples/squid/squid.rb