mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-14 04:04:03 +00:00
* Clean up legacy charting imports * Update existing donut and line charts * Create helpers for parsing out existing chart data * Move chart partials to a more common path
16 lines
329 B
Text
16 lines
329 B
Text
:ruby
|
|
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
|
|
%h4= title
|
|
= pie_chart data, options
|