Sha256: b8c67574674c945b9bbd41f8e41f9ee138e02525cea8450fea9b7e867f35b75b

Contents?: true

Size: 343 Bytes

Versions: 2

Compression:

Stored size: 343 Bytes

Contents

var d3c3_rails = {graphs: {}, actions: {}};

d3c3_rails.actions.generate = function(name, options){
  return d3c3_rails.graphs[name] = c3.generate(options);
}

d3c3_rails.actions.get = function(name){
  graph = d3c3_rails[name];
  if(graph){
    return graph;
  } else {
    throw new Error('Failed to located requested graph: ' + name);
  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
d3c3-rails-0.1.2 app/assets/javascripts/d3c3_rails/base.js
d3c3-rails-0.1.0 app/assets/javascripts/d3c3_rails/base.js