Sha256: 716de3e77eb312e70eb1a7ea2cc1783166962d2e83d99de366d7c87c47d59d53

Contents?: true

Size: 292 Bytes

Versions: 14

Compression:

Stored size: 292 Bytes

Contents

class ChartCandy::Builder::Counter < ChartCandy::Builder::Base

  def initialize(id, options={})
    super

    @chart.merge! nature: 'count', data: []
  end

  def add_primary(id, value)
    @chart[:data] << { nature: :primary, label: t("data.#{id}.label"), id: id, value: value }
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
chart-candy-0.1.7 lib/chart-candy/builder/counter.rb
chart-candy-0.1.6 lib/chart-candy/builder/counter.rb
chart-candy-0.1.5 lib/chart-candy/builder/counter.rb
chart-candy-0.1.4 lib/chart-candy/builder/counter.rb
chart-candy-0.1.3 lib/chart-candy/builder/counter.rb
chart-candy-0.1.2 lib/chart-candy/builder/counter.rb
chart-candy-0.1.1 lib/chart-candy/builder/counter.rb
chart-candy-0.1.0 lib/chart-candy/builder/counter.rb
chart-candy-0.0.12 lib/chart-candy/builder/counter.rb
chart-candy-0.0.11 lib/chart-candy/builder/counter.rb
chart-candy-0.0.10 lib/chart-candy/builder/counter.rb
chart-candy-0.0.9 lib/chart-candy/builder/counter.rb
chart-candy-0.0.8 lib/chart-candy/builder/counter.rb
chart-candy-0.0.7 lib/chart-candy/builder/counter.rb