Sha256: c86a917611fa3690e02143dc37a0e72efdcbdec20fabba37f59b23015a482145
Contents?: true
Size: 943 Bytes
Versions: 48
Compression:
Stored size: 943 Bytes
Contents
-if serie.empty? == empty_alert({ :title => "Sin datos suficientes", :message => "No hay suficientes datos para mostrar esta informaciĆ³n."}) -else .ct-chart.pie id="#{id}" .table-responsive.chart-table table.table.table-striped tbody tr -for label in labels th #{label} tr -for element in serie td #{element} tr -total = [1,serie.reduce(:+)].max -for element in serie td #{(element.to_f*100/total).round(0)}% javascript: var labels = #{{labels}}; var serie = #{{serie}}; new Chartist.Pie("##{id}", { labels: labels, series: serie }, { fullWidth: true, showLabel: false, height: '300px', plugins: [ Chartist.plugins.legend() ] } ); css: .pie .ct-legend.ct-legend-inside { position: absolute; top: 60px; }
Version data entries
48 entries across 48 versions & 1 rubygems