رفع مشکل اورفلو افقی Plotly RTL و بهبود ویژوال چارت‌های صدف

This commit is contained in:
parastoo 2026-11-11 15:23:07 +00:00
parent d59eda9fb9
commit d42871d9a1
2 changed files with 44 additions and 16 deletions

View file

@ -16,6 +16,17 @@
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap" rel="stylesheet">
<style>
html, body {
overflow-x: hidden !important;
max-width: 100%;
}
#js-plotly-tester {
position: fixed !important;
left: 0 !important;
top: 0 !important;
opacity: 0 !important;
pointer-events: none !important;
}
body {
font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background-color: #F8FAFC;
@ -957,29 +968,32 @@
marker: {
colors: ['#E11D48', '#DC2626', '#0284C7']
},
textinfo: 'percent+label',
textinfo: 'percent',
textposition: 'inside',
insidetextfont: { family: 'Vazirmatn', size: 11, color: '#FFFFFF' }
insidetextfont: { family: 'Vazirmatn', size: 12, color: '#FFFFFF', weight: 'bold' }
}], {
margin: { l: 20, r: 20, t: 10, b: 20 },
showlegend: false,
margin: { l: 20, r: 20, t: 15, b: 50 },
showlegend: true,
legend: { orientation: 'h', y: -0.1, x: 0.5, xanchor: 'center', font: { family: 'Vazirmatn', size: 11 } },
paper_bgcolor: 'transparent',
plot_bgcolor: 'transparent'
}, { responsive: true, displayModeBar: false });
// Chart 2: Revenue Waterfall / Comparison
Plotly.newPlot('chart-revenue-comparison', [{
x: ['هزینه قرارداد (پرداخت شده)', 'فروش محقق‌شده (GMV)', 'کسری بازگشت مستقیم', 'زیان فروش از دست رفته باگ', 'پتانسیل کل بدون باگ'],
x: ['هزینه قرارداد', 'فروش محقق‌شده', 'تراز بازگشت', 'زیان باگ لاگین', 'پتانسیل کل'],
y: [18000000, 13880000, -4120000, 42000000, 55880000],
type: 'bar',
marker: {
color: ['#E11D48', '#10B981', '#F59E0B', '#EF4444', '#6366F1']
},
text: ['۱۸ م ت', '۱۳.۸۸ م ت', '۴.۱۲- م ت', '۴۲ م ت', '۵۵.۸۸ م ت'],
textposition: 'auto',
textfont: { family: 'Vazirmatn', size: 11 }
textposition: 'outside',
textfont: { family: 'Vazirmatn', size: 11, color: '#0F172A' }
}], {
margin: { l: 40, r: 20, t: 20, b: 60 },
margin: { l: 50, r: 20, t: 25, b: 50 },
xaxis: { tickangle: 0, font: { family: 'Vazirmatn', size: 11 } },
yaxis: { range: [-12000000, 68000000], gridcolor: '#F1F5F9' },
paper_bgcolor: 'transparent',
plot_bgcolor: 'transparent',
yaxis: {

View file

@ -16,6 +16,17 @@
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap" rel="stylesheet">
<style>
html, body {
overflow-x: hidden !important;
max-width: 100%;
}
#js-plotly-tester {
position: fixed !important;
left: 0 !important;
top: 0 !important;
opacity: 0 !important;
pointer-events: none !important;
}
body {
font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background-color: #F8FAFC;
@ -957,29 +968,32 @@
marker: {
colors: ['#E11D48', '#DC2626', '#0284C7']
},
textinfo: 'percent+label',
textinfo: 'percent',
textposition: 'inside',
insidetextfont: { family: 'Vazirmatn', size: 11, color: '#FFFFFF' }
insidetextfont: { family: 'Vazirmatn', size: 12, color: '#FFFFFF', weight: 'bold' }
}], {
margin: { l: 20, r: 20, t: 10, b: 20 },
showlegend: false,
margin: { l: 20, r: 20, t: 15, b: 50 },
showlegend: true,
legend: { orientation: 'h', y: -0.1, x: 0.5, xanchor: 'center', font: { family: 'Vazirmatn', size: 11 } },
paper_bgcolor: 'transparent',
plot_bgcolor: 'transparent'
}, { responsive: true, displayModeBar: false });
// Chart 2: Revenue Waterfall / Comparison
Plotly.newPlot('chart-revenue-comparison', [{
x: ['هزینه قرارداد (پرداخت شده)', 'فروش محقق‌شده (GMV)', 'کسری بازگشت مستقیم', 'زیان فروش از دست رفته باگ', 'پتانسیل کل بدون باگ'],
x: ['هزینه قرارداد', 'فروش محقق‌شده', 'تراز بازگشت', 'زیان باگ لاگین', 'پتانسیل کل'],
y: [18000000, 13880000, -4120000, 42000000, 55880000],
type: 'bar',
marker: {
color: ['#E11D48', '#10B981', '#F59E0B', '#EF4444', '#6366F1']
},
text: ['۱۸ م ت', '۱۳.۸۸ م ت', '۴.۱۲- م ت', '۴۲ م ت', '۵۵.۸۸ م ت'],
textposition: 'auto',
textfont: { family: 'Vazirmatn', size: 11 }
textposition: 'outside',
textfont: { family: 'Vazirmatn', size: 11, color: '#0F172A' }
}], {
margin: { l: 40, r: 20, t: 20, b: 60 },
margin: { l: 50, r: 20, t: 25, b: 50 },
xaxis: { tickangle: 0, font: { family: 'Vazirmatn', size: 11 } },
yaxis: { range: [-12000000, 68000000], gridcolor: '#F1F5F9' },
paper_bgcolor: 'transparent',
plot_bgcolor: 'transparent',
yaxis: {