Browse Source

[WebUI] Put total in the center of pie charts

tags/3.3
moisseev 1 year ago
parent
commit
8bb998f26c

+ 8
- 0
interface/css/d3pie.css View File

line-height: normal; line-height: normal;
} }


.d3pie .total-text {
text-anchor: middle;
dominant-baseline: central;
}
.d3pie .total-value {
font-family: Arial, sans-serif;
}

.d3pie .inner-label { .d3pie .inner-label {
fill: #eeeeee; fill: #eeeeee;
pointer-events: none; pointer-events: none;

+ 0
- 3
interface/css/rspamd.css View File

text-align: left; text-align: left;
font-size: 12px; font-size: 12px;
} }
#rrd-pie {
font-size: 10px;
}


/* Throughput graph controls */ /* Throughput graph controls */
#graph_controls select { #graph_controls select {

+ 7
- 2
interface/js/app/graph.js View File

size: { size: {
canvasWidth: 400, canvasWidth: 400,
canvasHeight: 180, canvasHeight: 180,
pieInnerRadius: "50%",
pieOuterRadius: "80%" pieOuterRadius: "80%"
}, },
labels: { labels: {
format: "none" format: "none"
}, },
inner: { inner: {
hideWhenLessThanPercentage: 8
hideWhenLessThanPercentage: 8,
offset: 0
}, },
}, },
padAngle: 0.02, padAngle: 0.02,
pieCenterOffset: { pieCenterOffset: {
x: -120, x: -120,
y: 10, y: 10,
}
},
total: {
enabled: true
},
}; };


var ui = {}; var ui = {};

+ 11
- 1
interface/js/app/stats.js View File

if (!graphs.chart) { if (!graphs.chart) {
graphs.chart = new D3Pie("chart", { graphs.chart = new D3Pie("chart", {
labels: { labels: {
inner: {
offset: 0
},
outer: { outer: {
collideHeight: 18, collideHeight: 18,
} }
}, },
title: "Rspamd filter stats"
size: {
pieInnerRadius: "50%"
},
title: "Rspamd filter stats",
total: {
enabled: true,
label: "Scanned"
}
}); });
} }



+ 2
- 2
interface/js/lib/d3pie.min.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save