mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 07:59:35 +00:00
Fixes colors in dygraph plotters
This commit is contained in:
parent
7b8886ad37
commit
42e37fc41d
3 changed files with 12 additions and 2 deletions
|
|
@ -45,7 +45,11 @@ function formatSerieColors(palette_list) {
|
|||
let colors1 = d3v7.schemeCategory10;
|
||||
colors_list.forEach((s, index) => {
|
||||
if (s.palette == 0) {
|
||||
palette_list[index] = colors0[count0 % colors0.length];
|
||||
if(palette_list.find((element, j) => (element.color === s.color && j !== index))) {
|
||||
palette_list[index] = colors0[count0 % colors0.length];
|
||||
} else {
|
||||
palette_list[index] = s.color;
|
||||
}
|
||||
count0 += 1;
|
||||
} else if (s.palette == 1) {
|
||||
palette_list[index] = colors1[count1 % colors1.length];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue