Преглед на файлове

[WebUI] Put total in the center of pie charts

tags/3.3
moisseev преди 1 година
родител
ревизия
8bb998f26c
променени са 5 файла, в които са добавени 28 реда и са изтрити 8 реда
  1. 8
    0
      interface/css/d3pie.css
  2. 0
    3
      interface/css/rspamd.css
  3. 7
    2
      interface/js/app/graph.js
  4. 11
    1
      interface/js/app/stats.js
  5. 2
    2
      interface/js/lib/d3pie.min.js

+ 8
- 0
interface/css/d3pie.css Целия файл

@@ -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 Целия файл

@@ -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 Целия файл

@@ -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 Целия файл

@@ -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
Файловите разлики са ограничени, защото са твърде много
Целия файл


Loading…
Отказ
Запис