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

@@ -14,6 +14,14 @@
line-height: normal;
}

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

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

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

@@ -345,9 +345,6 @@ table#symbolsTable input[type="number"] {
text-align: left;
font-size: 12px;
}
#rrd-pie {
font-size: 10px;
}

/* Throughput graph controls */
#graph_controls select {

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

@@ -34,6 +34,7 @@ define(["jquery", "d3evolution", "d3pie", "footable"],
size: {
canvasWidth: 400,
canvasHeight: 180,
pieInnerRadius: "50%",
pieOuterRadius: "80%"
},
labels: {
@@ -41,14 +42,18 @@ define(["jquery", "d3evolution", "d3pie", "footable"],
format: "none"
},
inner: {
hideWhenLessThanPercentage: 8
hideWhenLessThanPercentage: 8,
offset: 0
},
},
padAngle: 0.02,
pieCenterOffset: {
x: -120,
y: 10,
}
},
total: {
enabled: true
},
};

var ui = {};

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

@@ -226,11 +226,21 @@ define(["jquery", "d3pie"],
if (!graphs.chart) {
graphs.chart = new D3Pie("chart", {
labels: {
inner: {
offset: 0
},
outer: {
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