mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-15 12:44:03 +00:00
18 lines
319 B
Ruby
18 lines
319 B
Ruby
|
|
# frozen_string_literal: true
|
||
|
|
|
||
|
|
module ChartHelper
|
||
|
|
def chart_values(distribution_hash)
|
||
|
|
Hash[
|
||
|
|
distribution_hash.collect do |key, data|
|
||
|
|
[key, data['value']]
|
||
|
|
end
|
||
|
|
]
|
||
|
|
end
|
||
|
|
|
||
|
|
def chart_colors(distribution_hash)
|
||
|
|
distribution_hash.collect do |_key, data|
|
||
|
|
data['color']
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|