dashboard produksi & ganti warna chart
This commit is contained in:
@@ -219,6 +219,10 @@
|
||||
@push('scripts')
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const pastelChart = config.chartColors || {};
|
||||
const pastelSemantic = pastelChart.semantic || {};
|
||||
const pastelCategory = pastelChart.categories || {};
|
||||
const gridColor = pastelChart.grid || '#E8EDF5';
|
||||
|
||||
// Inisialisasi Icons (Khusus Mockup, Vuexy mungkin pakai library icon sendiri seperti Tabler/FontAwesome)
|
||||
if(typeof lucide !== 'undefined') {
|
||||
@@ -233,23 +237,23 @@
|
||||
data: {
|
||||
labels: ['2021', '2022', '2023', '2024'],
|
||||
datasets: [
|
||||
{
|
||||
label: 'Baseline (Tanpa Intervensi)',
|
||||
data: [12, 12.5, 13, 13.5],
|
||||
borderColor: '#9ca3af',
|
||||
backgroundColor: 'transparent',
|
||||
{
|
||||
label: 'Baseline (Tanpa Intervensi)',
|
||||
data: [12, 12.5, 13, 13.5],
|
||||
borderColor: pastelSemantic.gray || '#9EA6B0',
|
||||
backgroundColor: 'transparent',
|
||||
borderDash: [5, 5],
|
||||
fill: false,
|
||||
tension: 0.4
|
||||
fill: false,
|
||||
tension: 0.4
|
||||
},
|
||||
{
|
||||
label: 'Pendapatan Aktual',
|
||||
data: [12, 15, 22, 31],
|
||||
borderColor: '#10b981',
|
||||
backgroundColor: 'rgba(16, 185, 129, 0.15)', // Light green fill
|
||||
fill: true,
|
||||
{
|
||||
label: 'Pendapatan Aktual',
|
||||
data: [12, 15, 22, 31],
|
||||
borderColor: pastelCategory.marketGreen || '#6FD68F',
|
||||
backgroundColor: 'rgba(111, 214, 143, 0.20)',
|
||||
fill: true,
|
||||
tension: 0.4,
|
||||
pointBackgroundColor: '#10b981',
|
||||
pointBackgroundColor: pastelCategory.marketGreen || '#6FD68F',
|
||||
pointBorderWidth: 2,
|
||||
pointRadius: 4
|
||||
}
|
||||
@@ -265,7 +269,7 @@
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: false,
|
||||
grid: { color: '#f3f4f6' },
|
||||
grid: { color: gridColor },
|
||||
ticks: { callback: function(val) { return 'Rp ' + val + 'M'; } }
|
||||
},
|
||||
x: {
|
||||
@@ -296,7 +300,12 @@
|
||||
labels: ['Kopi', 'Vanili', 'Kakao', 'Kemiri'],
|
||||
datasets: [{
|
||||
data: [45, 25, 15, 15],
|
||||
backgroundColor: ['#6F4E37', '#eab308', '#D2691E', '#9ca3af'],
|
||||
backgroundColor: [
|
||||
pastelCategory.coffee || '#6FD68F',
|
||||
pastelCategory.vanilla || '#FFB46F',
|
||||
pastelCategory.cacao || '#9D8EF0',
|
||||
pastelCategory.candlenut || '#9EA6B0'
|
||||
],
|
||||
borderWidth: 2,
|
||||
borderColor: '#ffffff',
|
||||
hoverOffset: 4
|
||||
@@ -324,4 +333,4 @@
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@endpush
|
||||
|
||||
Reference in New Issue
Block a user