demarches-normaliennes/config/initializers/chartkick.rb
2024-08-22 09:26:48 +02:00

36 lines
942 B
Ruby
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# frozen_string_literal: true
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'
}
}
}
}
}
}