|
|
|
@ -10,16 +10,18 @@ module BurndownChartsHelper |
|
|
|
|
|
|
|
|
|
labels << "[#{(mvalue) * 25}, '<span class=\"axislabel\">#{l('backlogs.hours')}/<br>#{l('backlogs.points')}</span>']" |
|
|
|
|
|
|
|
|
|
labels.join(', ') |
|
|
|
|
result = labels.join(', ') |
|
|
|
|
|
|
|
|
|
result.html_safe |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def xaxis_labels(burndown) |
|
|
|
|
burndown.days.enum_for(:each_with_index).collect{|d,i| "[#{i+1}, '#{escape_javascript(::I18n.t('date.abbr_day_names')[d.wday % 7])}']"}.join(',') + |
|
|
|
|
", [#{burndown.days.length + 1}, '<span class=\"axislabel\">#{I18n.t('backlogs.date')}</span>']" |
|
|
|
|
burndown.days.enum_for(:each_with_index).collect{|d,i| "[#{i+1}, '#{escape_javascript(::I18n.t('date.abbr_day_names')[d.wday % 7])}']"}.join(',').html_safe + |
|
|
|
|
", [#{burndown.days.length + 1}, '<span class=\"axislabel\">#{I18n.t('backlogs.date')}</span>']".html_safe |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def dataseries(burndown) |
|
|
|
|
burndown.series.collect{|s| "#{s.first.to_s}: {label: '#{l('backlogs.' + s.first.to_s)}', data: [#{s.last.enum_for(:each_with_index).collect{|s, i| "[#{i+1}, #{s}] "}.join(', ')}]} "} |
|
|
|
|
burndown.series.collect{|s| "#{s.first.to_s}: {label: '#{l('backlogs.' + s.first.to_s)}', data: [#{s.last.enum_for(:each_with_index).collect{|s, i| "[#{i+1}, #{s}] "}.join(', ')}]} "}.join(', ').html_safe |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def burndown_series_checkboxes(burndown) |
|
|
|
@ -27,6 +29,6 @@ module BurndownChartsHelper |
|
|
|
|
burndown.series(:all).collect{|s| s.first.to_s }.sort.each do |series| |
|
|
|
|
boxes += "<input class=\"series_enabled\" type=\"checkbox\" id=\"#{series}\" name=\"#{series}\" value=\"#{series}\" checked>#{l('backlogs.' + series.to_s)}<br/>" |
|
|
|
|
end |
|
|
|
|
boxes |
|
|
|
|
boxes.html_safe |
|
|
|
|
end |
|
|
|
|
end |