461 lines
25 KiB
HTML
Executable file
461 lines
25 KiB
HTML
Executable file
<!DOCTYPE html>
|
||
<html lang="fa" dir="rtl">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>داشبورد تحلیل حقوق و دستمزد پرسنل باغ کتاب - مرداد ۱۴۰۵</title>
|
||
<!-- Tailwind CSS -->
|
||
<script src="https://cdn.tailwindcss.com"></script>
|
||
<!-- Chart.js -->
|
||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||
<!-- Google Fonts: Vazirmatn -->
|
||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet">
|
||
<style>
|
||
body {
|
||
font-family: 'Vazirmatn', sans-serif;
|
||
background-color: #f8fafc;
|
||
color: #0f172a;
|
||
}
|
||
.card {
|
||
background: #ffffff;
|
||
border: 1px solid #e2e8f0;
|
||
border-radius: 1rem;
|
||
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
|
||
}
|
||
.tnum {
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body class="p-4 md:p-8">
|
||
|
||
<div class="max-w-7xl mx-auto space-y-6">
|
||
|
||
<!-- Header -->
|
||
<header class="card p-6 flex flex-col md:flex-row justify-between items-start md:items-center gap-4 border-r-4 border-r-indigo-600">
|
||
<div>
|
||
<div class="flex items-center gap-2">
|
||
<span class="px-2.5 py-1 bg-indigo-100 text-indigo-700 text-xs font-bold rounded-md">شعبه باغ کتاب</span>
|
||
<span class="px-2.5 py-1 bg-slate-100 text-slate-700 text-xs font-semibold rounded-md">مرداد ۱۴۰۵</span>
|
||
</div>
|
||
<h1 class="text-2xl md:text-3xl font-extrabold text-slate-900 mt-2">داشبورد تحلیلی حقوق، ساعات کار و بهرهوری پرسنل</h1>
|
||
<p class="text-sm text-slate-500 mt-1">بررسی جامع نسبت واریزی، نرخ دستمزد ساعتی، توزیع بار کاری و بهای تمامشده نفر-ساعت</p>
|
||
</div>
|
||
<div class="flex items-center gap-3">
|
||
<button onclick="window.print()" class="px-4 py-2 bg-slate-100 hover:bg-slate-200 text-slate-700 rounded-lg text-sm font-medium transition flex items-center gap-1.5">
|
||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 17h2a2 2 0 002-2v-4a2 2 0 00-2-2H5a2 2 0 00-2 2v4a2 2 0 002 2h2m2 4h6a2 2 0 002-2v-4a2 2 0 00-2-2H9a2 2 0 00-2 2v4a2 2 0 002 2zm8-12V5a2 2 0 00-2-2H9a2 2 0 00-2 2v4h10z"></path></svg>
|
||
چاپ / خروجی PDF
|
||
</button>
|
||
</div>
|
||
</header>
|
||
|
||
<!-- KPI Summary Cards -->
|
||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4">
|
||
<div class="card p-5 border-t-4 border-t-blue-500">
|
||
<div class="text-slate-500 text-xs font-semibold">مجموع کل حقوق پرداختی</div>
|
||
<div class="text-2xl font-black text-slate-900 mt-2 tnum">۱۰۲,۰۰۰,۰۰۰ <span class="text-sm font-normal text-slate-500">تومان</span></div>
|
||
<div class="text-xs text-blue-600 mt-2 font-medium">۴ پرسنل عملیاتی</div>
|
||
</div>
|
||
|
||
<div class="card p-5 border-t-4 border-t-emerald-500">
|
||
<div class="text-slate-500 text-xs font-semibold">مجموع ساعات کاری ثبتشده</div>
|
||
<div class="text-2xl font-black text-slate-900 mt-2 tnum">۹۲۲ <span class="text-sm font-normal text-slate-500">ساعت</span></div>
|
||
<div class="text-xs text-emerald-600 mt-2 font-medium">میانگین ۲۳۰.۵ ساعت به ازای هر نفر</div>
|
||
</div>
|
||
|
||
<div class="card p-5 border-t-4 border-t-violet-500">
|
||
<div class="text-slate-500 text-xs font-semibold">میانگین موزون نرخ ساعتی تیم</div>
|
||
<div class="text-2xl font-black text-slate-900 mt-2 tnum">۱۱۰,۶۲۹ <span class="text-sm font-normal text-slate-500">تومان/ساعت</span></div>
|
||
<div class="text-xs text-violet-600 mt-2 font-medium">بهای تمامشده هر ساعت کاری کل</div>
|
||
</div>
|
||
|
||
<div class="card p-5 border-t-4 border-t-amber-500">
|
||
<div class="text-slate-500 text-xs font-semibold">شکاف نرخ ساعتی (بیشترین / کمترین)</div>
|
||
<div class="text-2xl font-black text-slate-900 mt-2 tnum">۲.۵۸ <span class="text-sm font-normal text-slate-500">برابر</span></div>
|
||
<div class="text-xs text-amber-600 mt-2 font-medium">ارشادی (۲۱۲k) vs محمد (۸۲k)</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Primary Charts Row: Bar Chart of Salary vs Hours & Hourly Rate -->
|
||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
||
|
||
<!-- Chart 1: Salary & Hours Comparison -->
|
||
<div class="card p-6">
|
||
<div class="flex justify-between items-center mb-4">
|
||
<div>
|
||
<h3 class="text-lg font-bold text-slate-900">مقایسه حقوق و حجم ساعت کاری</h3>
|
||
<p class="text-xs text-slate-500">میزان دریافتی (میلیون تومان) در کنار ساعت کارکرد پرسنل</p>
|
||
</div>
|
||
</div>
|
||
<div class="relative h-80">
|
||
<canvas id="salaryHoursChart"></canvas>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Chart 2: Hourly Rate Analysis -->
|
||
<div class="card p-6">
|
||
<div class="flex justify-between items-center mb-4">
|
||
<div>
|
||
<h3 class="text-lg font-bold text-slate-900">نرخ دستمزد به ازای هر ساعت کار (تومان)</h3>
|
||
<p class="text-xs text-slate-500">هزینه تمامشده هر ساعت کارکرد پرسنل به تفکیک</p>
|
||
</div>
|
||
</div>
|
||
<div class="relative h-80">
|
||
<canvas id="hourlyRateChart"></canvas>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<!-- Secondary Charts Row: Distribution & Scatter -->
|
||
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||
|
||
<!-- Chart 3: Cost Share Donut -->
|
||
<div class="card p-6">
|
||
<h3 class="text-base font-bold text-slate-900 mb-1">سهم از کل هزینه حقوق (۱۰۲M)</h3>
|
||
<p class="text-xs text-slate-500 mb-4">درصد سهم مالی هر فرد از بودجه حقوق</p>
|
||
<div class="relative h-64">
|
||
<canvas id="costShareChart"></canvas>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Chart 4: Hours Share Donut -->
|
||
<div class="card p-6">
|
||
<h3 class="text-base font-bold text-slate-900 mb-1">سهم از کل ساعات کاری (۹۲۲h)</h3>
|
||
<p class="text-xs text-slate-500 mb-4">درصد زمان و انرژی اختصاصیافته توسط هر فرد</p>
|
||
<div class="relative h-64">
|
||
<canvas id="hoursShareChart"></canvas>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Chart 5: Rate vs Hours Scatter / Efficiency Quadrant -->
|
||
<div class="card p-6">
|
||
<h3 class="text-base font-bold text-slate-900 mb-1">ماتریس نرخ ساعتی vs حجم ساعت کار</h3>
|
||
<p class="text-xs text-slate-500 mb-4">جایگاه پرسنل بر اساس فشردگی کاری و نرخ پرداخت</p>
|
||
<div class="relative h-64">
|
||
<canvas id="scatterChart"></canvas>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<!-- Detailed Audit Data Table -->
|
||
<div class="card overflow-hidden">
|
||
<div class="p-6 border-b border-slate-100 flex justify-between items-center">
|
||
<div>
|
||
<h3 class="text-lg font-bold text-slate-900">جدول تحلیلی و مقایسهای پرسنل</h3>
|
||
<p class="text-xs text-slate-500 mt-0.5">محاسبه دقیق سرانه دستمزد، سهم هزینه و ضریب کارایی زمانی</p>
|
||
</div>
|
||
</div>
|
||
<div class="overflow-x-auto">
|
||
<table class="w-full text-right text-sm">
|
||
<thead class="bg-slate-50 text-slate-600 font-semibold border-b border-slate-200">
|
||
<tr>
|
||
<th class="py-3.5 px-6">نام پرسنل</th>
|
||
<th class="py-3.5 px-6">حقوق دریافتی (تومان)</th>
|
||
<th class="py-3.5 px-6">ساعات کارکرد (ساعت)</th>
|
||
<th class="py-3.5 px-6">نرخ هر ساعت کار (تومان)</th>
|
||
<th class="py-3.5 px-6">سهم از بودجه حقوق</th>
|
||
<th class="py-3.5 px-6">سهم از کل ساعات</th>
|
||
<th class="py-3.5 px-6">نسبت سهم حقوق به سهم ساعت</th>
|
||
<th class="py-3.5 px-6">وضعیت کارکرد</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody class="divide-y divide-slate-100 text-slate-800">
|
||
<tr class="hover:bg-slate-50 transition">
|
||
<td class="py-4 px-6 font-bold flex items-center gap-2">
|
||
<span class="w-2.5 h-2.5 rounded-full bg-rose-500"></span>
|
||
ارشادی
|
||
</td>
|
||
<td class="py-4 px-6 font-semibold tnum">۲۸,۰۰۰,۰۰۰</td>
|
||
<td class="py-4 px-6 font-semibold tnum">۱۳۲</td>
|
||
<td class="py-4 px-6 font-bold text-rose-600 tnum">۲۱۲,۱۲۱</td>
|
||
<td class="py-4 px-6 tnum">۲۷.۴۵٪</td>
|
||
<td class="py-4 px-6 tnum">۱۴.۳۲٪</td>
|
||
<td class="py-4 px-6 font-bold text-rose-600 tnum">۱.۹۲x</td>
|
||
<td class="py-4 px-6"><span class="px-2 py-0.5 bg-rose-100 text-rose-700 text-xs rounded-full font-medium">تخصصی / پارهوقت فشرده</span></td>
|
||
</tr>
|
||
<tr class="hover:bg-slate-50 transition">
|
||
<td class="py-4 px-6 font-bold flex items-center gap-2">
|
||
<span class="w-2.5 h-2.5 rounded-full bg-blue-500"></span>
|
||
حسین
|
||
</td>
|
||
<td class="py-4 px-6 font-semibold tnum">۲۷,۰۰۰,۰۰۰</td>
|
||
<td class="py-4 px-6 font-semibold tnum">۳۰۰</td>
|
||
<td class="py-4 px-6 font-bold text-blue-600 tnum">۹۰,۰۰۰</td>
|
||
<td class="py-4 px-6 tnum">۲۶.۴۷٪</td>
|
||
<td class="py-4 px-6 tnum">۳۲.۵۴٪</td>
|
||
<td class="py-4 px-6 font-bold text-blue-600 tnum">۰.۸۱x</td>
|
||
<td class="py-4 px-6"><span class="px-2 py-0.5 bg-blue-100 text-blue-700 text-xs rounded-full font-medium">بیشترین حجم حضور (فوقالعاده)</span></td>
|
||
</tr>
|
||
<tr class="hover:bg-slate-50 transition">
|
||
<td class="py-4 px-6 font-bold flex items-center gap-2">
|
||
<span class="w-2.5 h-2.5 rounded-full bg-emerald-500"></span>
|
||
محمد
|
||
</td>
|
||
<td class="py-4 px-6 font-semibold tnum">۲۱,۰۰۰,۰۰۰</td>
|
||
<td class="py-4 px-6 font-semibold tnum">۲۵۵</td>
|
||
<td class="py-4 px-6 font-bold text-emerald-600 tnum">۸۲,۳۵۳</td>
|
||
<td class="py-4 px-6 tnum">۲۰.۵۹٪</td>
|
||
<td class="py-4 px-6 tnum">۲۷.۶۶٪</td>
|
||
<td class="py-4 px-6 font-bold text-emerald-600 tnum">۰.۷۴x</td>
|
||
<td class="py-4 px-6"><span class="px-2 py-0.5 bg-emerald-100 text-emerald-700 text-xs rounded-full font-medium">اقتصادیترین نرخ ساعتی</span></td>
|
||
</tr>
|
||
<tr class="hover:bg-slate-50 transition">
|
||
<td class="py-4 px-6 font-bold flex items-center gap-2">
|
||
<span class="w-2.5 h-2.5 rounded-full bg-amber-500"></span>
|
||
سپهر
|
||
</td>
|
||
<td class="py-4 px-6 font-semibold tnum">۲۶,۰۰۰,۰۰۰</td>
|
||
<td class="py-4 px-6 font-semibold tnum">۲۳۵</td>
|
||
<td class="py-4 px-6 font-bold text-amber-600 tnum">۱۱۰,۶۳۸</td>
|
||
<td class="py-4 px-6 tnum">۲۵.۴۹٪</td>
|
||
<td class="py-4 px-6 tnum">۲۵.۴۹٪</td>
|
||
<td class="py-4 px-6 font-bold text-amber-600 tnum">۱.۰۰x</td>
|
||
<td class="py-4 px-6"><span class="px-2 py-0.5 bg-amber-100 text-amber-700 text-xs rounded-full font-medium">تعادل کامل حقوق و ساعت</span></td>
|
||
</tr>
|
||
</tbody>
|
||
<tfoot class="bg-slate-100 font-extrabold text-slate-900 border-t-2 border-slate-300">
|
||
<tr>
|
||
<td class="py-3.5 px-6">مجموع کل / میانگین</td>
|
||
<td class="py-3.5 px-6 tnum">۱۰۲,۰۰۰,۰۰۰</td>
|
||
<td class="py-3.5 px-6 tnum">۹۲۲</td>
|
||
<td class="py-3.5 px-6 tnum">۱۱۰,۶۲۹ (میانگین)</td>
|
||
<td class="py-3.5 px-6 tnum">۱۰۰٪</td>
|
||
<td class="py-3.5 px-6 tnum">۱۰۰٪</td>
|
||
<td class="py-3.5 px-6 tnum">۱.۰۰x</td>
|
||
<td class="py-3.5 px-6">-</td>
|
||
</tr>
|
||
</tfoot>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Strategic Analytical Insights -->
|
||
<div class="card p-6 bg-gradient-to-br from-white to-slate-50">
|
||
<h3 class="text-lg font-bold text-slate-900 mb-3 flex items-center gap-2">
|
||
<svg class="w-5 h-5 text-indigo-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||
تحلیلهای کلیدی مدیریتی و مالی
|
||
</h3>
|
||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 text-sm text-slate-600">
|
||
<div class="p-4 rounded-lg bg-rose-50/60 border border-rose-100">
|
||
<h4 class="font-bold text-rose-800 mb-1">۱. تمرکز هزینه ارشادی</h4>
|
||
<p class="leading-relaxed">ارشادی با تنها ۱۴.۳٪ از کل ساعات کاری، ۲۷.۵٪ از کل بودجه حقوق را به خود اختصاص داده است (نرخ ساعتی ۲۱۲ هزار تومان که ۲.۴ برابر میانگین سایر پرسنل است).</p>
|
||
</div>
|
||
<div class="p-4 rounded-lg bg-blue-50/60 border border-blue-100">
|
||
<h4 class="font-bold text-blue-800 mb-1">۲. بار اجرایی بالا روی دوش حسین و محمد</h4>
|
||
<p class="leading-relaxed">حسین و محمد در مجموع ۵۵۵ ساعت (۶۰.۲٪ کل ساعات ماه) را پوشش دادهاند در حالی که مجموع دریافتی آنها ۴۷٪ کل بودجه است. نرخ ساعتی این دو نفر زیر ۹۰ هزار تومان است.</p>
|
||
</div>
|
||
<div class="p-4 rounded-lg bg-amber-50/60 border border-amber-100">
|
||
<h4 class="font-bold text-amber-800 mb-1">۳. شاخص تعادل سپهر</h4>
|
||
<p class="leading-relaxed">سپهر دقیقاً ۲۵.۴۹٪ از ساعات کار را پوشش داده و دقیقاً ۲۵.۴۹٪ از بودجه پرداختی را دریافت کرده است (نرخ ساعتی ۱۱۰.۶ هزار تومان منطبق بر میانگین وزنی سیستم).</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<!-- Charts Initialization Script -->
|
||
<script>
|
||
const staffNames = ['ارشادی', 'حسین', 'محمد', 'سپهر'];
|
||
const salariesM = [28, 27, 21, 26]; // in Millions
|
||
const hours = [132, 300, 255, 235];
|
||
const hourlyRatesK = [212.121, 90.000, 82.353, 110.638]; // in Thousands Toman
|
||
const colors = ['#f43f5e', '#3b82f6', '#10b981', '#f59e0b'];
|
||
|
||
// Chart 1: Salary vs Hours
|
||
new Chart(document.getElementById('salaryHoursChart'), {
|
||
type: 'bar',
|
||
data: {
|
||
labels: staffNames,
|
||
datasets: [
|
||
{
|
||
label: 'حقوق (میلیون تومان)',
|
||
data: salariesM,
|
||
backgroundColor: '#6366f1',
|
||
borderRadius: 6,
|
||
yAxisID: 'ySalary'
|
||
},
|
||
{
|
||
label: 'ساعات کارکرد (ساعت)',
|
||
data: hours,
|
||
backgroundColor: '#94a3b8',
|
||
borderRadius: 6,
|
||
yAxisID: 'yHours'
|
||
}
|
||
]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: { position: 'top', labels: { font: { family: 'Vazirmatn' } } },
|
||
tooltip: { rtl: true, bodyFont: { family: 'Vazirmatn' }, titleFont: { family: 'Vazirmatn' } }
|
||
},
|
||
scales: {
|
||
x: { ticks: { font: { family: 'Vazirmatn' } } },
|
||
ySalary: {
|
||
type: 'linear',
|
||
position: 'right',
|
||
title: { display: true, text: 'میلیون تومان', font: { family: 'Vazirmatn' } },
|
||
ticks: { font: { family: 'Vazirmatn' } }
|
||
},
|
||
yHours: {
|
||
type: 'linear',
|
||
position: 'left',
|
||
grid: { drawOnChartArea: false },
|
||
title: { display: true, text: 'ساعت', font: { family: 'Vazirmatn' } },
|
||
ticks: { font: { family: 'Vazirmatn' } }
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
// Chart 2: Hourly Rate
|
||
new Chart(document.getElementById('hourlyRateChart'), {
|
||
type: 'bar',
|
||
data: {
|
||
labels: staffNames,
|
||
datasets: [{
|
||
label: 'نرخ هر ساعت کار (هزار تومان)',
|
||
data: hourlyRatesK,
|
||
backgroundColor: colors,
|
||
borderRadius: 6
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: { display: false },
|
||
tooltip: {
|
||
rtl: true,
|
||
callbacks: {
|
||
label: function(ctx) {
|
||
return ctx.raw.toLocaleString('fa-IR', {maximumFractionDigits: 1}) + ' هزار تومان در ساعت';
|
||
}
|
||
},
|
||
bodyFont: { family: 'Vazirmatn' },
|
||
titleFont: { family: 'Vazirmatn' }
|
||
}
|
||
},
|
||
scales: {
|
||
x: { ticks: { font: { family: 'Vazirmatn' } } },
|
||
y: {
|
||
title: { display: true, text: 'هزار تومان به ازای هر ساعت', font: { family: 'Vazirmatn' } },
|
||
ticks: { font: { family: 'Vazirmatn' } }
|
||
}
|
||
}
|
||
}
|
||
});
|
||
|
||
// Chart 3: Cost Share Donut
|
||
new Chart(document.getElementById('costShareChart'), {
|
||
type: 'doughnut',
|
||
data: {
|
||
labels: staffNames,
|
||
datasets: [{
|
||
data: salariesM,
|
||
backgroundColor: colors,
|
||
borderWidth: 2,
|
||
borderColor: '#ffffff'
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: { position: 'bottom', labels: { font: { family: 'Vazirmatn' } } },
|
||
tooltip: {
|
||
rtl: true,
|
||
callbacks: {
|
||
label: function(ctx) {
|
||
let total = salariesM.reduce((a,b)=>a+b,0);
|
||
let pct = ((ctx.raw/total)*100).toFixed(1);
|
||
return `${ctx.label}: ${ctx.raw} میلیون تومان (${pct}٪)`;
|
||
}
|
||
},
|
||
bodyFont: { family: 'Vazirmatn' }
|
||
}
|
||
},
|
||
cutout: '65%'
|
||
}
|
||
});
|
||
|
||
// Chart 4: Hours Share Donut
|
||
new Chart(document.getElementById('hoursShareChart'), {
|
||
type: 'doughnut',
|
||
data: {
|
||
labels: staffNames,
|
||
datasets: [{
|
||
data: hours,
|
||
backgroundColor: colors,
|
||
borderWidth: 2,
|
||
borderColor: '#ffffff'
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: { position: 'bottom', labels: { font: { family: 'Vazirmatn' } } },
|
||
tooltip: {
|
||
rtl: true,
|
||
callbacks: {
|
||
label: function(ctx) {
|
||
let total = hours.reduce((a,b)=>a+b,0);
|
||
let pct = ((ctx.raw/total)*100).toFixed(1);
|
||
return `${ctx.label}: ${ctx.raw} ساعت (${pct}٪)`;
|
||
}
|
||
},
|
||
bodyFont: { family: 'Vazirmatn' }
|
||
}
|
||
},
|
||
cutout: '65%'
|
||
}
|
||
});
|
||
|
||
// Chart 5: Scatter / Matrix
|
||
new Chart(document.getElementById('scatterChart'), {
|
||
type: 'scatter',
|
||
data: {
|
||
datasets: staffNames.map((name, i) => ({
|
||
label: name,
|
||
data: [{ x: hours[i], y: hourlyRatesK[i] }],
|
||
backgroundColor: colors[i],
|
||
pointRadius: 10,
|
||
pointHoverRadius: 13
|
||
}))
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: { position: 'bottom', labels: { font: { family: 'Vazirmatn' } } },
|
||
tooltip: {
|
||
rtl: true,
|
||
callbacks: {
|
||
label: function(ctx) {
|
||
return `${ctx.dataset.label}: ${ctx.raw.x} ساعت | نرخ: ${ctx.raw.y.toFixed(0)}k تومان/ساعت`;
|
||
}
|
||
},
|
||
bodyFont: { family: 'Vazirmatn' }
|
||
}
|
||
},
|
||
scales: {
|
||
x: {
|
||
title: { display: true, text: 'ساعات کارکرد', font: { family: 'Vazirmatn' } },
|
||
ticks: { font: { family: 'Vazirmatn' } }
|
||
},
|
||
y: {
|
||
title: { display: true, text: 'نرخ ساعتی (هزار تومان)', font: { family: 'Vazirmatn' } },
|
||
ticks: { font: { family: 'Vazirmatn' } }
|
||
}
|
||
}
|
||
}
|
||
});
|
||
</script>
|
||
</body>
|
||
</html>
|