Sha256: bd806318f6b2c8bea8b354170297d3227123c8a58a0ac9d1d22fcaab0b215862
Contents?: true
Size: 1.2 KB
Versions: 13
Compression:
Stored size: 1.2 KB
Contents
//= require highcharts //= require highcharts/highcharts-more //= require highcharts/modules/drilldown (function( $ ){ $.fn.pie_chart = function(title, data) { // Create the chart $(this).highcharts({ chart: { type: 'pie' }, plotOptions: { series: { dataLabels: { enabled: true, format: '{point.name}: {point.y}' } } }, credits: { enabled: false }, tooltip: { headerFormat: '<span style="font-size:11px">{series.name}</span><br>', pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.percentage:.2f}%</b> of total<br/>' }, series: [{ name: title, colorByPoint: true, data: data.series }], title: null, drilldown: data.drilldown }); }; })( jQuery ); Blacklight.onLoad(function () { $('.stats-pie').each (function () { series = $(this).data('series'); title = $(this).data('title'); drilldown = $(this).data('drilldown'); $(this).pie_chart(title, series, drilldown); }); });
Version data entries
13 entries across 13 versions & 1 rubygems