काठमाडौँ । नेपालमा भित्रिने मोबाइलको संख्या कम भएको छ । भन्सार विभागको पछिल्लो तथ्याङ्क अनुसार चालु आर्थिक वर्ष २०८१/०८२ को साउनदेखि वैशाख मसान्त सम्ममा गत आवको तुलनामा २ लाख ५७ हजार थान मोबाइल फोन  कम भित्रिएका छन् ।
तथ्याङ्क अनुसार चालु आर्थिक वर्षमा १५ लाख २८ हजार थान मोबाइल भित्रिएका छन् । जबकी गत आव २०८०/०८१ को वैशाख मसान्त सम्ममा १७  लाख ८५ थान मोबाइल नेपाल भित्रिएको थियो ।
चालु आर्थिक वर्षमा सो मोबाइल आयात हुँदा २४ अर्ब १ करोड रूपैयाँ भन्सार शुल्क उठेको छ भने ४ अर्ब ४७ करोड राजस्व सङ्कलन भएको छ । गत आर्थिक वर्षको सोही अवधीमा २८ अर्ब ७६ करोड भन्सार शुल्क उठ्दा ५ अर्ब ३६ करोड रूपैयाँ राजस्व सङ्कलन भएको थियो ।
पछिल्लो १० वर्षको विभागको तथ्याङ्क हेर्ने हो भने मोबाइल आयातबाट भन्सार शुल्क निरन्तर बढ्दै गएको देख्न सकिन्छ । आर्थिक वर्ष २०७२/०७३ मा नेपालमा ३२ लाख ४३ थान मोबाइल भित्रिँदा ४४ करोड रूपैयाँ भन्सार शुल्क उठेको थियो । सो वर्ष ४ करोड रुपैयाँ राजस्व सङ्कलन भएको थियो ।
विभागको तथ्याङ्क हेर्दा वार्षिक रुपमा मोबाइल आयात दर थपघट भइरहेको देखिएपनि राजस्व सङ्कलन भने निरन्तर बढिरहेको देखिन्छ । कोरोनाको समयमा आर्थिक वर्ष २०७८/०७९ मा सबैभन्दा कम १ लाख २३ हजार थान मोबाइल फोन भित्रिएको थियो । सो समयमा २० करोड रुपैयाँ भन्सार शुल्क उठ्दा ५ करोड रुपैयाँ राजस्व सङ्कलन भएको थियो ।
कोरोनाको समयलाई अपवाद मान्ने हो भने पछिल्लो १० वर्षमा नेपालमा भित्रिने मोबाइलबाट उठ्ने राजश्वको कम भएको यो पहिलो पटक हो ।
नेपाल मोबाइल वितरक सङ्घ (एनएमडीए) का अध्यक्ष रघु त्रिपाठी नेपालमा अवैध रुपमा मोबाइल भित्रिने क्रम घट्नुको पछाडी अवैध मोबाइल आयात बढ्नु रहेको बताउँछन् । नेपाल दूरसञ्चार प्राधिकरणले नेपालमा दर्ता भएका मोबाइलको विवरण राख्दै आएको छ । तर, दर्ता नभएका मोबाइल पनि चलिरहेको उनले बताए ।
वैदेशिक रोजगारीबाट फर्किने क्रममा ल्याएका मोबाइल तथा भन्सार छलेर ल्याउने मोबाइल बढ्दा भन्सार तिरेर मोबाइल आयात हुने सङ्ख्यामा कमि आएको त्रिपाठी बताउँछन् । उनी भन्छन्, “दूरसञ्चार प्राधिकरणको तथ्याङ्कअनुसार नेपालमा २० प्रतिशतभन्दा बढी अवैध रुपमा आएका मोबाइल सञ्चालन भइरहेका छन् ।”
अवैध रुपमा आएका मोबाइल बजारमा सस्तो मूल्यमा बिक्री हुँदा मोबाइल व्यवसायीलाई समेत समस्या भएको उनले बताए । त्रिपाठीले भने, “व्यापार कम हुँदा बरु व्यवसायीले कर्मचारी घटाएर वा अरू नै केही गरेर आफ्नो व्यवसाय सम्हाल्न सक्छन् । तर यसले राज्यलाई नै असर गरेको छ । करोडौँ राजस्व घटेको छ ।” यसका लागि एमडीएमएस प्रणालीलाई राम्रोसँग सञ्चालनमा ल्याउनुपर्ने उनले बताए ।
चोरी पैठारी बढ्दा भन्सार विभागको तथ्याङ्कमा मोबाइल फोन आयातको दर कम देखिएको मोबाइल फोन इम्पोर्टस एसाेसियशन नेपालका अध्यक्ष दिपक मल्होत्रा बताउँछन् । गत वर्ष सरकारले एक दिनको लागि मात्र एमडीएमएस प्रणाली लागु गरेको र यसलाई सँधैको लागि कार्यान्वयमा ल्याउन नसक्दा उक्त समस्या देखिएको उनले सुनाए ।
मल्होत्रा भन्छन्, “सरकारले एमडीएमएस प्रणाली लागु गर्छौँ भनेपनि कार्यान्वयमा ल्याएको छैन । मोबाइलको चोरी पैठारी रोक्न एमडीएमएस प्रणाली छिटो सञ्चालनमा ल्याउनुपर्‍यो ।”
Set language to Nepali
Added a title
@import url('https://fonts.googleapis.com/css2?family=Mukta:wght@400;700&display=swap');

#newsportal-data-chart-container {
font-family: 'Mukta', Arial, sans-serif;
max-width: 900px;
margin: 20px auto;
padding: 20px;
border: 1px solid #ddd;
border-radius: 8px;
background-color: #f9f9f9;
box-sizing: border-box;
overflow: hidden;
position: relative; /* Needed for absolute positioning of footer elements and tooltip containment */
}

#newsportal-data-chart-container *,
#newsportal-data-chart-container *::before,
#newsportal-data-chart-container *::after {
box-sizing: inherit;
}

#newsportal-data-chart-container h2 {
text-align: center;
color: #333;
margin-top: 0;
margin-bottom: 25px;
font-size: 1.7em;
font-weight: 700;
}

#newsportal-data-chart-container .metric-selector {
text-align: center;
margin-bottom: 25px;
}

#newsportal-data-chart-container .metric-selector label {
margin: 0 10px;
cursor: pointer;
font-size: 1em;
color: #555;
}

#newsportal-data-chart-container .metric-selector input[type="radio"] {
margin-right: 5px;
vertical-align: middle;
}

#newsportal-data-chart-container .chart-wrapper {
position: relative;
width: 100%;
height: 380px;
display: flex;
flex-direction: column;
margin-bottom: 40px; /* Space for footer, adjusted in media queries */
}

#newsportal-data-chart-container .y-axis {
position: absolute;
left: 0;
top: 0;
height: calc(100% - 50px); /* 50px reserved for x-axis labels area */
width: 75px;
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 0.85em;
color: #666;
padding-right: 8px;
border-right: 1px solid #ccc;
}

#newsportal-data-chart-container .y-axis-label {
text-align: right;
}

#newsportal-data-chart-container .y-axis-title {
position: absolute;
left: -60px;
top: 50%;
transform: translateY(-50%) rotate(-90deg);
font-size: 0.95em;
color: #333;
white-space: nowrap;
font-weight: 700;
}

#newsportal-data-chart-container .chart-area {
position: relative;
display: flex;
align-items: flex-end;
justify-content: space-around;
width: calc(100% - 75px); /* Adjust based on y-axis width */
height: calc(100% - 50px); /* 50px reserved for x-axis labels area */
margin-left: 75px; /* Match y-axis width */
padding: 0 10px;
border-bottom: 1px solid #ccc;
}

#newsportal-data-chart-container .bar-group {
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
flex: 1; /* Allows groups to share space */
position: relative;
min-width: 25px; /* Minimum width for a bar group */
}

#newsportal-data-chart-container .bar {
width: 70%; /* Percentage of its group */
max-width: 45px; /* Max pixel width */
transition: background-color 0.3s ease, height 0.5s ease-out;
cursor: pointer;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
}

#newsportal-data-chart-container .bar.quantity { background-color: #4CAF50; }
#newsportal-data-chart-container .bar.customs-duty { background-color: #2196F3; }
#newsportal-data-chart-container .bar.revenue { background-color: #ff9800; }

#newsportal-data-chart-container .bar:hover {
opacity: 0.75;
}

#newsportal-data-chart-container .fiscal-year-label {
font-size: 0.8em;
color: #333;
text-align: center;
margin-top: 8px; /* Space from bar (not really, due to absolute pos) */
white-space: nowrap;
position: absolute;
bottom: -35px; /* Position below the bar group */
left: 50%;
transform: translateX(-50%);
width: 100%; /* For text-align to work if text wraps (though nowrap is set) */
padding-top: 5px; /* Visual spacing if needed */
}

#newsportal-data-chart-container .tooltip {
position: absolute;
background-color: rgba(0, 0, 0, 0.85);
color: white;
padding: 10px 15px;
border-radius: 4px;
font-size: 0.9em;
line-height: 1.5;
white-space: nowrap;
z-index: 10000;
pointer-events: none;
visibility: hidden;
opacity: 0;
transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

#newsportal-data-chart-container .bar-value-on-hover {
position: absolute;
left: 50%;
transform: translateX(-50%);
background-color: rgba(50, 50, 50, 0.75);
color: white;
padding: 4px 8px;
border-radius: 3px;
font-size: 0.8em;
font-weight: 700;
white-space: nowrap;
z-index: 500;
visibility: hidden;
opacity: 0;
transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out, bottom 0.2s ease-in-out;
pointer-events: none;
}

/* Footer styles */
#newsportal-data-chart-container .chart-footer {
margin-top: 15px;
padding-top: 10px;
border-top: 1px solid #eee;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.75em;
color: #555;
width: 100%;
}

#newsportal-data-chart-container .chart-credits {
text-align: left;
}

#newsportal-data-chart-container .chart-logo img {
max-height: 25px;
width: auto;
display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
#newsportal-data-chart-container .chart-wrapper {
height: 320px;
margin-bottom: 50px; /* Ensure enough space for footer and rotated labels */
}
#newsportal-data-chart-container .y-axis {
width: 65px;
font-size: 0.8em;
}
#newsportal-data-chart-container .y-axis-title {
left: -50px;
font-size: 0.9em;
}
#newsportal-data-chart-container .chart-area {
width: calc(100% - 65px);
margin-left: 65px;
}
#newsportal-data-chart-container .fiscal-year-label {
font-size: 0.75em;
transform: translateX(-50%) rotate(-35deg);
transform-origin: center;
bottom: -40px; /* Adjust to fit rotated label within the 50px bottom area of chart-wrapper */
}
#newsportal-data-chart-container .bar-value-on-hover {
font-size: 0.7em;
padding: 3px 6px;
}
#newsportal-data-chart-container .chart-footer {
flex-direction: column;
align-items: flex-start;
}
#newsportal-data-chart-container .chart-logo {
margin-top: 8px;
align-self: flex-end;
}
}

@media (max-width: 480px) {
#newsportal-data-chart-container h2 {
font-size: 1.4em;
}
#newsportal-data-chart-container .metric-selector label {
display: block;
margin-bottom: 10px;
margin-right: 0;
margin-left: 0; /* Ensure it's centered */
font-size: 0.95em;
}
#newsportal-data-chart-container .chart-wrapper {
height: 300px;
margin-bottom: 60px; /* Increased margin for more rotated labels */
}
#newsportal-data-chart-container .y-axis {
width: 60px;
font-size: 0.75em;
}
#newsportal-data-chart-container .y-axis-title {
left: -45px;
font-size: 0.85em;
}
#newsportal-data-chart-container .chart-area {
width: calc(100% - 60px);
margin-left: 60px;
}
#newsportal-data-chart-container .fiscal-year-label {
font-size: 0.7em;
transform: translateX(-50%) rotate(-45deg);
bottom: -45px; /* Adjust for steeper rotation */
}
#newsportal-data-chart-container .bar {
width: 80%;
max-width: 35px;
}
#newsportal-data-chart-container .bar-value-on-hover {
font-size: 0.65em;
padding: 2px 5px;
}
#newsportal-data-chart-container .chart-footer {
font-size: 0.7em;
}
#newsportal-data-chart-container .chart-logo img {
max-height: 20px;
}
}

/* Styles for very small screens */
@media (max-width: 375px) {
#newsportal-data-chart-container {
padding: 10px;
margin: 10px auto;
}
#newsportal-data-chart-container h2 {
font-size: 1.2em; /* Smaller title */
margin-bottom: 15px;
}
#newsportal-data-chart-container .metric-selector label {
font-size: 0.9em;
margin-bottom: 8px;
}
#newsportal-data-chart-container .metric-selector input[type="radio"] {
margin-right: 3px;
}
#newsportal-data-chart-container .chart-wrapper {
height: 260px; /* Further reduce chart height */
margin-bottom: 65px; /* Increase margin if labels need more space below chart area */
}
#newsportal-data-chart-container .y-axis {
width: 45px; /* Narrower Y-axis */
font-size: 0.65em; /* Smaller Y-axis labels */
padding-right: 5px;
}
#newsportal-data-chart-container .y-axis-title {
left: -32px; /* Adjust Y-axis title position */
font-size: 0.75em; /* Smaller Y-axis title */
}
#newsportal-data-chart-container .chart-area {
width: calc(100% - 45px); /* Adjust chart area width */
margin-left: 45px; /* Adjust chart area margin */
padding: 0 5px; /* Reduce padding inside chart area */
}
#newsportal-data-chart-container .fiscal-year-label {
font-size: 0.6em; /* Smaller fiscal year labels */
transform: translateX(-50%) rotate(-60deg); /* Steeper rotation */
bottom: -50px; /* Adjust bottom position due to rotation/size */
}
#newsportal-data-chart-container .bar {
width: 85%; /* Allow bars to be slightly wider percentage-wise in narrower groups */
max-width: 30px; /* But cap their max width */
}
#newsportal-data-chart-container .bar-group {
min-width: 20px; /* Allow bar groups to be slightly narrower if many */
}
#newsportal-data-chart-container .bar-value-on-hover {
font-size: 0.6em;
padding: 2px 4px;
}
#newsportal-data-chart-container .chart-footer {
font-size: 0.65em; /* Smaller footer text */
padding-top: 5px;
margin-top: 10px;
}
#newsportal-data-chart-container .chart-logo img {
max-height: 18px; /* Smaller logo */
}
}

घट्दैछ मोबाइलको आयात

परिणाम
भन्सार (रु)
राजश्व (रु)
Value
स्रोतः भन्सार विभाग, चार्टः रञ्जिता उप्रेति
Added alt text to logo
Tooltip is appended by JS into chartContainerElement
(function() {
'use strict';

const chartContainerId = 'newsportal-data-chart-container';
const chartContainerElement = document.getElementById(chartContainerId);

if (!chartContainerElement) {
// console.warn(`Chart container with ID "${chartContainerId}" not found.`);
return;
}

const fiscalData = [
{ "S.N.": 1, "Fiscal Year": "2081/082", "Quantity": 1528000, "Customs Duty (Rs)": 240100000000, "Revenue (Rs)": 44700000000 },
{ "S.N.": 2, "Fiscal Year": "2080/081", "Quantity": 1785000, "Customs Duty (Rs)": 287600000000, "Revenue (Rs)": 53600000000 },
{ "S.N.": 3, "Fiscal Year": "2079/080", "Quantity": 1309000, "Customs Duty (Rs)": 204100000000, "Revenue (Rs)": 38100000000 },
{ "S.N.": 4, "Fiscal Year": "2078/079", "Quantity": 123000, "Customs Duty (Rs)": 2000000000, "Revenue (Rs)": 500000000 },
{ "S.N.": 5, "Fiscal Year": "2077/078", "Quantity": 3322000, "Customs Duty (Rs)": 24000000000, "Revenue (Rs)": 4600000000 },
{ "S.N.": 6, "Fiscal Year": "2076/077", "Quantity": 1992000, "Customs Duty (Rs)": 22800000000, "Revenue (Rs)": 4100000000 },
{ "S.N.": 7, "Fiscal Year": "2075/076", "Quantity": 3684000, "Customs Duty (Rs)": 12100000000, "Revenue (Rs)": 2200000000 },
{ "S.N.": 8, "Fiscal Year": "2074/075", "Quantity": 4115000, "Customs Duty (Rs)": 7800000000, "Revenue (Rs)": 1400000000 },
{ "S.N.": 9, "Fiscal Year": "2073/074", "Quantity": 6345000, "Customs Duty (Rs)": 6400000000, "Revenue (Rs)": 1100000000 },
{ "S.N.": 10,"Fiscal Year": "2072/073", "Quantity": 3243000, "Customs Duty (Rs)": 4400000000, "Revenue (Rs)": 700000000 }
];

const metricDisplayNamesNe = {
"Quantity": "परिणाम",
"Customs Duty (Rs)": "भन्सार (रु)",
"Revenue (Rs)": "राजश्व (रु)"
};

const chartArea = chartContainerElement.querySelector('#npdc-chartArea');
const yAxisElement = chartContainerElement.querySelector('#npdc-yAxis');
const yAxisTitleElement = chartContainerElement.querySelector('#npdc-yAxisTitle');
const metricRadios = chartContainerElement.querySelectorAll('.metric-selector input[name="npdc-metric"]');

const tooltip = document.createElement('div');
tooltip.className = 'tooltip';
chartContainerElement.appendChild(tooltip);

if (!chartArea || !yAxisElement || !yAxisTitleElement || metricRadios.length === 0) {
// console.error("Essential chart elements not found within container.");
return;
}

function convertToNepaliNumerals(input) {
if (input === null || input === undefined) return '';
const inputStr = String(input);
const nepaliDigits = ['०', '१', '२', '३', '४', '५', '६', '७', '८', '९'];
let nepaliString = '';
for (let i = 0; i < inputStr.length; i++) {
const char = inputStr[i];
if (char >= '0' && char <= '9') {
nepaliString += nepaliDigits[parseInt(char)];
} else if (char === '.' || char === '/' || char === ',') { // Keep common separators
nepaliString += char;
} else {
nepaliString += char; // Keep other characters as is (e.g., currency symbols if any)
}
}
return nepaliString;
}

function formatAxisNumber(num) {
if (num === 0) return convertToNepaliNumerals('0');
if (Math.abs(num) < 1000) return convertToNepaliNumerals(num.toString());

const suffixes = ["", "K", "M", "B", "T"];
const i = Math.floor(Math.log10(Math.abs(num)) / 3);
const scaledValue = (num / Math.pow(1000, i));

let precision = 0;
if (i > 0 && scaledValue % 1 !== 0) {
precision = (scaledValue < 10) ? 2 : 1;
} else if (scaledValue % 1 !== 0) {
precision = (scaledValue < 10) ? 2 : (scaledValue < 100 ? 1 : 0);
}
// Suffixes are English, if Nepali suffixes are needed, they should be provided.
// For now, let's assume K, M, B, T are acceptable with Nepali numerals.
return convertToNepaliNumerals(scaledValue.toFixed(precision)) + suffixes[i];
}

function formatTooltipNumber(num) {
// Using 'ne-NP' locale for nepali grouping, if available and supported by browser.
// Fallback to 'en-US' for basic grouping.
let formattedNum;
try {
formattedNum = num.toLocaleString('ne-NP', { useGrouping: true });
} catch (e) { // Fallback if ne-NP is not supported or causes issues
formattedNum = num.toLocaleString('en-US', { useGrouping: true });
}
return convertToNepaliNumerals(formattedNum);
}

function renderChart(selectedMetricKey) {
chartArea.innerHTML = '';
yAxisElement.innerHTML = '';

const values = fiscalData.map(item => item[selectedMetricKey]);
const maxValue = Math.max(0, ...values.filter(v => typeof v === 'number' && !isNaN(v))); // Ensure only valid numbers

yAxisTitleElement.textContent = metricDisplayNamesNe[selectedMetricKey] || selectedMetricKey;

const numTicks = 5;
for (let i = numTicks; i >= 0; i--) {
const tickValue = (maxValue / numTicks) * i;
const labelDiv = document.createElement('div');
labelDiv.classList.add('y-axis-label');
labelDiv.textContent = formatAxisNumber(tickValue);
if (i === numTicks) labelDiv.style.paddingTop = '0px';
if (i === 0) labelDiv.style.paddingBottom = '0px';
yAxisElement.appendChild(labelDiv);
}

fiscalData.forEach(item => {
const barGroup = document.createElement('div');
barGroup.classList.add('bar-group');

const bar = document.createElement('div');
bar.classList.add('bar');

if (selectedMetricKey === "Quantity") bar.classList.add('quantity');
else if (selectedMetricKey === "Customs Duty (Rs)") bar.classList.add('customs-duty');
else if (selectedMetricKey === "Revenue (Rs)") bar.classList.add('revenue');

const itemValue = typeof item[selectedMetricKey] === 'number' ? item[selectedMetricKey] : 0;
const barHeightPercentage = maxValue > 0 ? (itemValue / maxValue) * 100 : 0;
bar.style.height = `${Math.max(0, Math.min(100, barHeightPercentage))}%`;

bar.dataset.metricKey = selectedMetricKey;
bar.dataset.value = itemValue;
bar.dataset.year = item["Fiscal Year"];

const barValueDisplay = document.createElement('div');
barValueDisplay.classList.add('bar-value-on-hover');
barValueDisplay.textContent = formatTooltipNumber(parseFloat(itemValue));

// Adjust position based on bar height, ensuring visibility
let valueDisplayBottom = barHeightPercentage + 2; // Default position above bar
if (barHeightPercentage < 10) { // If bar is too short, place value higher or adapt
valueDisplayBottom = 5; // Place it a bit above the baseline
if (barHeightPercentage < 2) { // If bar is extremely short, it might look better inside or at a fixed low position
barValueDisplay.style.bottom = '2px'; // Or adjust as needed
barValueDisplay.style.color = '#333'; // Change color for contrast if on background
barValueDisplay.style.backgroundColor = 'rgba(255,255,255,0.7)';
} else {
barValueDisplay.style.bottom = `calc(${barHeightPercentage}% + 5px)`;
}
} else if (barHeightPercentage > 90) { // If bar is very tall, place value inside near top
valueDisplayBottom = barHeightPercentage - 5; // Adjust to be inside
barValueDisplay.style.bottom = `${valueDisplayBottom}%`;
barValueDisplay.style.transform = 'translateX(-50%) translateY(100%)'; // Shift it down
} else {
barValueDisplay.style.bottom = `calc(${barHeightPercentage}% + 5px)`;
}

bar.addEventListener('mousemove', (e) => {
tooltip.style.visibility = 'visible';
tooltip.style.opacity = '1';
barValueDisplay.style.visibility = 'visible';
barValueDisplay.style.opacity = '1';

const nepaliYear = convertToNepaliNumerals(bar.dataset.year);
const nepaliMetricName = metricDisplayNamesNe[bar.dataset.metricKey];
const nepaliValue = formatTooltipNumber(parseFloat(bar.dataset.value));

tooltip.innerHTML = `<strong>आर्थिक वर्ष: ${nepaliYear}</strong><br>
${nepaliMetricName}: ${nepaliValue}`;

const containerRect = chartContainerElement.getBoundingClientRect();
let mouseXInContainer = e.clientX - containerRect.left;
let mouseYInContainer = e.clientY - containerRect.top;

// Dynamic tooltip positioning to stay within container bounds
const tooltipRect = tooltip.getBoundingClientRect(); // Get its dimensions after content is set

let tipX = mouseXInContainer + 15; // Default position: right of cursor
let tipY = mouseYInContainer - 10; // Default position: above cursor

// Adjust if tooltip goes out of right boundary
if (tipX + tooltipRect.width > containerRect.width - 5) { // 5px buffer
tipX = mouseXInContainer - tooltipRect.width - 15; // Position left of cursor
}
// Adjust if tooltip goes out of left boundary (should be rare with above)
if (tipX < 5) { // 5px buffer
tipX = 5;
}
// Adjust if tooltip goes out of bottom boundary
if (tipY + tooltipRect.height > containerRect.height - 5) { // 5px buffer
tipY = containerRect.height - tooltipRect.height - 5;
}
// Adjust if tooltip goes out of top boundary
if (tipY < 5) { // 5px buffer
tipY = 5;
}

tooltip.style.left = `${tipX}px`;
tooltip.style.top = `${tipY}px`;
});

bar.addEventListener('mouseleave', () => {
tooltip.style.visibility = 'hidden';
tooltip.style.opacity = '0';
barValueDisplay.style.visibility = 'hidden';
barValueDisplay.style.opacity = '0';
});

const label = document.createElement('div');
label.classList.add('fiscal-year-label');
label.textContent = convertToNepaliNumerals(item["Fiscal Year"]);

barGroup.appendChild(barValueDisplay);
barGroup.appendChild(bar);
barGroup.appendChild(label);
chartArea.appendChild(barGroup);
});
}

metricRadios.forEach(radio => {
radio.addEventListener('change', (event) => {
renderChart(event.target.value);
});
});

let initiallyCheckedMetricKey = "Quantity";
const checkedRadio = chartContainerElement.querySelector('.metric-selector input[name="npdc-metric"]:checked');
if (checkedRadio) {
initiallyCheckedMetricKey = checkedRadio.value;
}
renderChart(initiallyCheckedMetricKey);

})();