Skip to content

Commit ea82aa4

Browse files
committed
Use matplotlib-inspired color cycle
1 parent 58c751b commit ea82aa4

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/components/ChartContainer.jsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,19 @@ export default function ChartContainer({
176176
}
177177
}, [parsedData, onXRangeChange]);
178178

179-
const colors = ['#ef4444', '#3b82f6', '#10b981', '#f59e0b', '#8b5cf6', '#f97316'];
179+
// Use a lower saturation palette inspired by matplotlib
180+
const colors = [
181+
'#1f77b4', // blue
182+
'#ff7f0e', // orange
183+
'#2ca02c', // green
184+
'#d62728', // red
185+
'#9467bd', // purple
186+
'#8c564b', // brown
187+
'#e377c2', // pink
188+
'#7f7f7f', // gray
189+
'#bcbd22', // olive
190+
'#17becf' // cyan
191+
];
180192
const createChartData = dataArray => ({
181193
datasets: dataArray.map((item, index) => {
182194
const color = colors[index % colors.length];

0 commit comments

Comments
 (0)