mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Fixed growing of doughnut charts on scrolling.
Charts were growing on many pages due to spaces in id. Fixes #1903
This commit is contained in:
parent
3afe905448
commit
0091d87dc9
1 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
.text-center
|
||||
%h4 #{title}
|
||||
%canvas.doughnut_chart{ id: "dough_#{title}", 'data-chart' => data.to_json }
|
||||
%canvas.doughnut_chart{ id: "dough_#{title.parameterize.underscore}", 'data-chart' => data.to_json }
|
||||
- if data
|
||||
- data.each do |key, value|
|
||||
%span{ 'style' => "border-bottom: 3px solid #{value['color']}" } #{key}: #{value['value']}
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
:javascript
|
||||
$(document).ready( function(){
|
||||
|
||||
var d = $("#dough_#{title}");
|
||||
var d = $("#dough_#{title.parameterize.underscore}");
|
||||
var dt = d.get(0).getContext('2d');
|
||||
|
||||
$(window).resize( respondCanvas );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue