Update chartkick to 4.1.3
This commit is contained in:
parent
e79cfe0f91
commit
c967a0b9a4
4 changed files with 6 additions and 21 deletions
|
|
@ -133,7 +133,7 @@ GEM
|
||||||
caxlsx_rails (0.6.2)
|
caxlsx_rails (0.6.2)
|
||||||
actionpack (>= 3.1)
|
actionpack (>= 3.1)
|
||||||
caxlsx (>= 3.0)
|
caxlsx (>= 3.0)
|
||||||
chartkick (3.4.2)
|
chartkick (4.1.3)
|
||||||
childprocess (3.0.0)
|
childprocess (3.0.0)
|
||||||
chronic (0.10.2)
|
chronic (0.10.2)
|
||||||
chunky_png (1.4.0)
|
chunky_png (1.4.0)
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ GEM
|
||||||
caxlsx_rails (0.6.2)
|
caxlsx_rails (0.6.2)
|
||||||
actionpack (>= 3.1)
|
actionpack (>= 3.1)
|
||||||
caxlsx (>= 3.0)
|
caxlsx (>= 3.0)
|
||||||
chartkick (3.4.2)
|
chartkick (4.1.3)
|
||||||
childprocess (3.0.0)
|
childprocess (3.0.0)
|
||||||
chronic (0.10.2)
|
chronic (0.10.2)
|
||||||
chunky_png (1.4.0)
|
chunky_png (1.4.0)
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,8 @@
|
||||||
:ruby
|
:ruby
|
||||||
combined_data ||= {}
|
combined_data ||= {}
|
||||||
data ||= chart_values(combined_data)
|
data ||= chart_values(combined_data)
|
||||||
colors ||= chart_colors(combined_data)
|
|
||||||
|
|
||||||
options = {
|
|
||||||
donut: true,
|
|
||||||
legend: 'bottom',
|
|
||||||
download: true,
|
|
||||||
messages: { empty: 'No data' }
|
|
||||||
}
|
|
||||||
options[:colors] = colors if colors.present?
|
|
||||||
|
|
||||||
.text-center
|
.text-center
|
||||||
%h4= title
|
%h4
|
||||||
= pie_chart data, options
|
= title
|
||||||
|
= pie_chart data, donut: true, legend: 'bottom', download: true, messages: { empty: 'No data' }, colors: chart_colors(combined_data)
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,3 @@
|
||||||
:ruby
|
|
||||||
options = {
|
|
||||||
legend: 'bottom',
|
|
||||||
download: true,
|
|
||||||
messages: { empty: 'No data' }
|
|
||||||
}
|
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
.text-center
|
.text-center
|
||||||
|
|
@ -12,4 +5,4 @@
|
||||||
= title
|
= title
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
= line_chart data, options
|
= line_chart data, legend: 'bottom', download: true, messages: { empty: 'No data' }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue