Skip to content

Commit fcc6602

Browse files
committed
Use default colors for the User Agent chart instead of custom colors
1 parent 6493e96 commit fcc6602

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/dashboard/linkpreviews_chart.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,10 @@ function initUserAgentChart() {
103103
matrix.set(key, row.TotalAccesses);
104104
});
105105

106-
const datasets = agents.map((agent, index) => {
107-
const hue = Math.round((index * 360) / Math.max(agents.length, 1));
108-
return {
109-
label: agent,
110-
data: labels.map(day => matrix.get(`${day}::${agent}`) || 0),
111-
backgroundColor: `hsl(${hue}, 65%, 55%)`
112-
};
113-
});
106+
const datasets = agents.map(agent => ({
107+
label: agent,
108+
data: labels.map(day => matrix.get(`${day}::${agent}`) || 0)
109+
}));
114110

115111
return { labels, datasets };
116112
}

src/embedfs/static/dashboard.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)