sinatra-hexacta 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c912964100b2001dba323aaf707a3300f0d1145dd35ca3cba9769c2a3be79665
4
- data.tar.gz: 766dd2b7b153e858f49a1e94b79bd7b94e6ea7aea4fd9352e67a890f346487a7
3
+ metadata.gz: 624ee7c381d7793171661f38711d7a3d5b269a9517363d1dab778baee42cf770
4
+ data.tar.gz: 1d47e583f1f8e16f4af003bcc918745f61205b3bcb0a060454e577bcaf6fe2f8
5
5
  SHA512:
6
- metadata.gz: dac1780cc09ea40bd8d3acb6fc5a38f61e64070ab8daa1d5608dc10fd03ddadeb5538a65813cf5be7908c08c94656d8b5492f0ce4fb5b749a2b0cb21761193d9
7
- data.tar.gz: 7a9327f4db415b60eb80817088dd4a50ff5cf4d592f3cd9b9c8048b994c172ca80086af48afd91750c04c26a7afe844ea0d9530c499e8e605fc1e96220a637ef
6
+ metadata.gz: 4dd4d4e9749696e47b66409203c82468be0fcc35deecda306e542d4b70c59299f33c676ae246c7f67a323fcc04212f19dd3839769b06f7d4e1c5daebde36f0bb
7
+ data.tar.gz: 64356f393cbe8b8b207fdc8cd63a56ef8038df92e68ab4aa16ca758dbeff0421a8034058e09ae335a4f92ad73acf8c02b3e32010e34d08efb004104ecc4499d1
@@ -1,38 +1,41 @@
1
- .ct-chart.pie id="#{id}"
1
+ -if serie.empty?
2
+ == empty_alert({ :title => "Sin datos suficientes", :message => "No hay suficientes datos para mostrar esta información."})
3
+ -else
4
+ .ct-chart.pie id="#{id}"
2
5
 
3
- .table-responsive.chart-table
4
- table.table.table-striped
5
- tbody
6
- tr
7
- -for label in labels
8
- th #{label}
9
- tr
10
- -for element in serie
11
- td #{element}
12
- tr
13
- -total = [1,serie.reduce(:+)].max
14
- -for element in serie
15
- td #{(element.to_f*100/total).round(0)}%
6
+ .table-responsive.chart-table
7
+ table.table.table-striped
8
+ tbody
9
+ tr
10
+ -for label in labels
11
+ th #{label}
12
+ tr
13
+ -for element in serie
14
+ td #{element}
15
+ tr
16
+ -total = [1,serie.reduce(:+)].max
17
+ -for element in serie
18
+ td #{(element.to_f*100/total).round(0)}%
16
19
 
17
- javascript:
18
- var labels = #{{labels}};
19
- var serie = #{{serie}};
20
+ javascript:
21
+ var labels = #{{labels}};
22
+ var serie = #{{serie}};
20
23
 
21
- new Chartist.Pie("##{id}", {
22
- labels: labels,
23
- series: serie
24
- }, {
25
- fullWidth: true,
26
- showLabel: false,
27
- height: '300px',
28
- plugins: [
29
- Chartist.plugins.legend()
30
- ]
31
- }
32
- );
24
+ new Chartist.Pie("##{id}", {
25
+ labels: labels,
26
+ series: serie
27
+ }, {
28
+ fullWidth: true,
29
+ showLabel: false,
30
+ height: '300px',
31
+ plugins: [
32
+ Chartist.plugins.legend()
33
+ ]
34
+ }
35
+ );
33
36
 
34
- css:
35
- .pie .ct-legend.ct-legend-inside {
36
- position: absolute;
37
- top: 60px;
38
- }
37
+ css:
38
+ .pie .ct-legend.ct-legend-inside {
39
+ position: absolute;
40
+ top: 60px;
41
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-hexacta
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Zanger