🏘️

Statistici Imobiliare

Date actualizate și analize în timp real

📍

Brașov

Apartamente

💰

Preț mediu apartamente

€0/mp

-
🏠

Total imobile județ

0

Imobile înregistrate

📋

Ipoteci

0

Număr ipoteci

🏘️

Clasificare volum municipiul Brașov

Distribuția proprietăților vândute pe categorii

🏗️ Terenuri Intravilan

Cu construcții: 0
Fără construcții: 0

📋 Total Imobile

Unități individuale: 0
Total imobile: 0

Imobile vândute: -

💹

Evoluție preț mediu apartamente

€/mp - Comparație Noi vs Vechi

📊

Preț apartamente vechi după camere

€/mp - 1camera vs 2camere vs 3camere

📊

Imobile vândute pe tipuri în Municipiul Brașov

Înregistrări lunare - Volum tranzacții după categorii

function updateAnnualVariationChart() { const ctx = document.getElementById('annualVariationChart'); if (!ctx) return; if (charts.annualVariation) { charts.annualVariation.destroy(); } const sortedData = [...allData].sort((a, b) => { if (a.an !== b.an) return a.an - b.an; const monthOrder = ['Ianuarie', 'Februarie', 'Martie', 'Aprilie', 'Mai', 'Iunie', 'Iulie', 'August', 'Septembrie', 'Octombrie', 'Noiembrie', 'Decembrie']; return monthOrder.indexOf(a.luna) - monthOrder.indexOf(b.luna); }); const labels = sortedData.map(d => `${d.luna.substring(0, 3)} ${d.an}`); const varMediana = sortedData.map(d => d.variatie_anual_medie || 0); const varNoi = sortedData.map(d => d.variatie_anual_noi || 0); const varVechi = sortedData.map(d => d.variatie_anual_vechi || 0); charts.annualVariation = new Chart(ctx, { type: 'bar', data: { labels: labels, datasets: [{ label: 'Variație medie (%)', data: varMediana, backgroundColor: 'rgba(212, 175, 55, 0.7)', borderColor: '#d4af37', borderWidth: 2, borderRadius: 6 }, { label: 'Variație noi (%)', data: varNoi, backgroundColor: 'rgba(16, 185, 129, 0.7)', borderColor: '#10b981', borderWidth: 2, borderRadius: 6 }, { label: 'Variație vechi (%)', data: varVechi, backgroundColor: 'rgba(139, 92, 246, 0.7)', borderColor: '#8b5cf6', borderWidth: 2, borderRadius: 6 }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: true, position: 'top', labels: { usePointStyle: true, padding: 20, font: { size: 13, weight: '600' }, color: '#64748b' } }, tooltip: { backgroundColor: 'rgba(0, 0, 0, 0.9)', padding: 16, borderColor: '#d4af37', borderWidth: 2, callbacks: { label: function(context) { return context.dataset.label + ': ' + context.parsed.y.toFixed(2) + '%'; } } } }, scales: { y: { grid: { color: 'rgba(0, 0, 0, 0.05)' }, ticks: { font: { size: 12, weight: '600' }, color: '#64748b', callback: function(value) { return value.toFixed(1) + '%'; } } }, x: { grid: { display: false }, ticks: { font: { size: 11, weight: '600' }, color: '#64748b' } } } } }); } function updateVolumeTransactionChart() { const ctx = document.getElementById('volumTransactionChart'); if (!ctx) return; if (charts.volumeTransaction) { charts.volumeTransaction.destroy(); } const sortedData = [...allData].sort((a, b) => { if (a.an !== b.an) return a.an - b.an; const monthOrder = ['Ianuarie', 'Februarie', 'Martie', 'Aprilie', 'Mai', 'Iunie', 'Iulie', 'August', 'Septembrie', 'Octombrie', 'Noiembrie', 'Decembrie']; return monthOrder.indexOf(a.luna) - monthOrder.indexOf(b.luna); }); const labels = sortedData.map(d => `${d.luna.substring(0, 3)} ${d.an}`); const volumCuConstructii = sortedData.map(d => d.volum_teren_intravilan_cu_constructii || 0); const volumFaraConstructii = sortedData.map(d => d.volum_teren_intravilan_fara_constructii || 0); const volumUnitatiIndividuale = sortedData.map(d => d.volum_unitati_individuale || 0); charts.volumeTransaction = new Chart(ctx, { type: 'bar', data: { labels: labels, datasets: [{ label: 'Terenuri cu Construcții', data: volumCuConstructii, backgroundColor: 'rgba(245, 158, 11, 0.7)', borderColor: '#f59e0b', borderWidth: 2, borderRadius: 6 }, { label: 'Terenuri fără Construcții', data: volumFaraConstructii, backgroundColor: 'rgba(34, 197, 94, 0.7)', borderColor: '#22c55e', borderWidth: 2, borderRadius: 6 }, { label: 'Unități Individuale', data: volumUnitatiIndividuale, backgroundColor: 'rgba(59, 130, 246, 0.7)', borderColor: '#3b82f6', borderWidth: 2, borderRadius: 6 }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: true, position: 'top', labels: { usePointStyle: true, padding: 20, font: { size: 13, weight: '600' }, color: '#64748b' } }, tooltip: { backgroundColor: 'rgba(0, 0, 0, 0.9)', padding: 16, borderColor: '#d4af37', borderWidth: 2, callbacks: { label: function(context) { return context.dataset.label + ': ' + context.parsed.y.toLocaleString(); } } } }, scales: { y: { beginAtZero: true, grid: { color: 'rgba(0, 0, 0, 0.05)' }, ticks: { font: { size: 12, weight: '600' }, color: '#64748b', callback: function(value) { return value.toLocaleString(); } } }, x: { grid: { display: false }, ticks: { font: { size: 11, weight: '600' }, color: '#64748b' } } } } }); } // Config change handler async function onConfigChange(newConfig) { config = { ...defaultConfig, ...newConfig }; const cityNameEl = document.getElementById('city-name'); if (cityNameEl) { cityNameEl.textContent = config.city_name || defaultConfig.city_name; } const propertyTypeEl = document.getElementById('property-type'); if (propertyTypeEl) { propertyTypeEl.textContent = config.property_type || defaultConfig.property_type; } const dataSourceEl = document.getElementById('data-source'); if (dataSourceEl) { dataSourceEl.textContent = config.data_source || defaultConfig.data_source; } const dataCreditsEl = document.getElementById('data-credits'); if (dataCreditsEl) { dataCreditsEl.textContent = config.data_credits || defaultConfig.data_credits; } } // Map to capabilities function mapToCapabilities(cfg) { return { recolorables: [], borderables: [], fontEditable: undefined, fontSizeable: undefined }; } // Map to edit panel values function mapToEditPanelValues(cfg) { return new Map([ ['city_name', cfg.city_name || defaultConfig.city_name], ['property_type', cfg.property_type || defaultConfig.property_type], ['data_source', cfg.data_source || defaultConfig.data_source], ['data_credits', cfg.data_credits || defaultConfig.data_credits] ]); } // Initialize async function init() { // Initialize Data SDK if (window.dataSdk) { const initResult = await window.dataSdk.init(dataHandler); if (!initResult.isOk) { console.error('Failed to initialize data SDK'); } } // Initialize Element SDK if (window.elementSdk) { await window.elementSdk.init({ defaultConfig, onConfigChange, mapToCapabilities, mapToEditPanelValues }); } } init();