demarches-normaliennes/config/initializers/chartkick.rb

37 lines
942 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-06-07 14:53:10 +02:00
Chartkick.options = {
content_for: :charts_js,
colors: ["var(--background-action-high-blue-france)"],
thousands: ' ',
decimal: ',',
default_library_config: {
chart: { backgroundColor: 'var(--background-contrast-grey)' },
xAxis: {
lineColor: 'var(--border-action-high-grey)',
labels: { style: { color: "var(--text-default-grey)" } }
},
yAxis: {
gridLineColor: 'var(--border-plain-grey)',
lineColor: 'var(--border-action-high-grey)',
labels: { style: { color: "var(--text-default-grey)" } }
},
legend: {
itemStyle: {
color: "var(--text-default-grey)"
}
},
plotOptions: {
pie: {
dataLabels: {
color: "var(--text-default-grey)",
enabled: true, format: '{point.name} : {point.percentage: .1f}%',
style: {
textOutline: 'none'
}
}
}
}
}
2017-06-07 14:53:10 +02:00
}