diff --git a/data/demo.mv.db b/data/demo.mv.db index 2035600e8f6a6054a336c3d8b089cb45303629bb..e950cdab15a247ad6e1b1e41e4d52d201e548ddd 100644 Binary files a/data/demo.mv.db and b/data/demo.mv.db differ diff --git a/src/main/resources/templates/statistics.html b/src/main/resources/templates/statistics.html index 3752918cf934dc50edca00e853fb3ba2f34a1af7..c67679e0c64615493264bf5a8ba67b0988b2309e 100644 --- a/src/main/resources/templates/statistics.html +++ b/src/main/resources/templates/statistics.html @@ -135,7 +135,9 @@ hole: 0.3, marker: { colors: ['#1c375e', '#d4af37', '#66ccff', '#ffff66'] - } + }, + textinfo: 'label+percent+value', // názov, percentá aj počet + textposition: 'inside' }; const pieLayout = { @@ -143,7 +145,7 @@ paper_bgcolor: '#6780a3', font: { color: '#ffffff' } }; - +/* Plotly.newPlot('statusChart', [pieTrace], pieLayout, { responsive: true }) .then(() => { let step = 0; @@ -161,6 +163,23 @@ animate(); }); +*/ + Plotly.newPlot('statusChart', [{ + type: 'pie', + labels: statusLabels, + values: statusValues, + hole: 0.3, + marker: { + colors: ['#1c375e', '#d4af37', '#66ccff', '#ffff66'] + }, + textinfo: 'label+percent+value', + textposition: 'inside' + }], { + title: 'Documents by Status', + paper_bgcolor: '#6780a3', + font: { color: '#ffffff' } + }, { responsive: true }); + // 🔵 BAR chart (animated) const maxY = Math.max(...categoryValues);