Improve clients graphic colors

- add the ability to select colors for the chart, per theme;
- improve contrast between bar colors and background color;
- move color definitions to CSS and use a javascript function to
  read the colors.

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
RD WebDesign
2023-04-19 16:53:14 -03:00
parent fb59d64c43
commit c36cbb2017
+4 -18
View File
@@ -11,24 +11,10 @@
var timeLineChart, clientsChart;
var queryTypePieChart, forwardDestinationPieChart;
var THEME_COLORS = [
"#f56954",
"#3c8dbc",
"#00a65a",
"#00c0ef",
"#f39c12",
"#0073b7",
"#001f3f",
"#39cccc",
"#3d9970",
"#01ff70",
"#ff851b",
"#f012be",
"#8e24aa",
"#d81b60",
"#222222",
"#d2d6de",
];
var THEME_COLORS = [];
for (var i = 1; i <= 20; i++) {
THEME_COLORS[i - 1] = $(":root").css("--graph-color" + i);
}
var customTooltips = function (context) {
var tooltip = context.tooltip;