Sha256: a19a0e153c19ff60fb7169e678d3788ebdde34c2193ce6fc1d99ba61b8bc632c

Contents?: true

Size: 457 Bytes

Versions: 14

Compression:

Stored size: 457 Bytes

Contents

class ChartCandy
  constructor: () ->
    @charts = []

    if @d3IsLoaded()
      $('div[data-chart-candy]').each (i, chart) =>
        switch $(chart).data('chart-candy')
          when 'counter' then @charts.push new ChartCandyCounter $(chart)
          when 'donut' then @charts.push new ChartCandyDonut $(chart)
          when 'line' then @charts.push new ChartCandyLine $(chart)

  d3IsLoaded: () -> if d3? then true else false



$ -> new ChartCandy

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
chart-candy-0.1.7 app/assets/javascripts/chart_candy/base.coffee
chart-candy-0.1.6 app/assets/javascripts/chart_candy/base.coffee
chart-candy-0.1.5 app/assets/javascripts/chart_candy/base.coffee
chart-candy-0.1.4 app/assets/javascripts/chart_candy/base.coffee
chart-candy-0.1.3 app/assets/javascripts/chart_candy/base.coffee
chart-candy-0.1.2 app/assets/javascripts/chart_candy/base.coffee
chart-candy-0.1.1 app/assets/javascripts/chart_candy/base.coffee
chart-candy-0.1.0 app/assets/javascripts/chart_candy/base.coffee
chart-candy-0.0.12 app/assets/javascripts/chart_candy/base.coffee
chart-candy-0.0.11 app/assets/javascripts/chart_candy/base.coffee
chart-candy-0.0.10 app/assets/javascripts/chart_candy/base.coffee
chart-candy-0.0.9 app/assets/javascripts/chart_candy/base.coffee
chart-candy-0.0.8 app/assets/javascripts/chart_candy/base.coffee
chart-candy-0.0.7 app/assets/javascripts/chart_candy/base.coffee