Use ci colors for graphs.

This commit is contained in:
2025-02-03 17:09:01 +01:00
parent 92e9511550
commit a545e253d3
2 changed files with 12 additions and 6 deletions

View File

@@ -7,18 +7,21 @@
let monthly_invoices = {!! $monthly_invoices !!};
let monthly_incoming = {!! $monthly_incoming !!};
new Chart(document.getElementById('monthly'),
new Chart(
document.getElementById('monthly'),
{
type: 'line',
data: {
datasets: [
{
label: '{{ __('invoice.Invoices') }}',
data: monthly_invoices
data: monthly_invoices,
backgroundColor: 'rgb(25,48,90)',
},
{
label: '{{ __('incoming.Incoming') }}',
data: monthly_incoming
data: monthly_incoming,
backgroundColor: 'rgb(237,125,35)',
}
]
}

View File

@@ -7,18 +7,21 @@
let yearly_invoices = {!! $yearly_invoices !!};
let yearly_incoming = {!! $yearly_incoming !!};
new Chart(document.getElementById('yearly'),
new Chart(
document.getElementById('yearly'),
{
type: 'bar',
data: {
datasets: [
{
label: '{{ __('invoice.Invoices') }}',
data: yearly_invoices
data: yearly_invoices,
backgroundColor: 'rgb(25,48,90)',
},
{
label: '{{ __('incoming.Incoming') }}',
data: yearly_incoming
data: yearly_incoming,
backgroundColor: 'rgb(237,125,35)',
}
]
}