Sha256: 74bbe36d5e970944b3ac6a8e3231c09f2cd3274a57782d53dd22013203d3d414

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

// SPARKLINE
// ----------------------------------- 

(function(window, document, $, undefined){

  $(function(){

    $('[data-sparkline]').each(initSparkLine);

    function initSparkLine() {
      var $element = $(this),
          options = $element.data(),
          values  = options.values && options.values.split(',');

      options.type = options.type || 'bar'; // default chart is bar
      options.disableHiddenCheck = true;

      $element.sparkline(values, options);

      if(options.resize) {
        $(window).resize(function(){
          $element.sparkline(values, options);
        });
      }
    }
  });

})(window, document, window.jQuery);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
radius-rails-3.1.4 app/assets/javascripts/radius-theme/modules/sparkline.js