mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 01:49:05 +08:00
fix: color for the graph is updated (#305)
This commit is contained in:
parent
93b5a945a4
commit
da653681cf
@ -23,11 +23,9 @@ const getChartData = ({ queryData }: GetChartDataProps): ChartData => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const color = colors[index] || 'red';
|
|
||||||
return {
|
return {
|
||||||
label: labelNames,
|
label: labelNames,
|
||||||
first: dataValue.map((e) => e.first),
|
first: dataValue.map((e) => e.first),
|
||||||
borderColor: color,
|
|
||||||
second: dataValue.map((e) => e.second),
|
second: dataValue.map((e) => e.second),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -37,10 +35,6 @@ const getChartData = ({ queryData }: GetChartDataProps): ChartData => {
|
|||||||
.map((e) => e.map((e) => e.label))
|
.map((e) => e.map((e) => e.label))
|
||||||
.reduce((a, b) => [...a, ...b], []);
|
.reduce((a, b) => [...a, ...b], []);
|
||||||
|
|
||||||
const allColor = response
|
|
||||||
.map((e) => e.map((e) => e.borderColor))
|
|
||||||
.reduce((a, b) => [...a, ...b], []);
|
|
||||||
|
|
||||||
const alldata = response
|
const alldata = response
|
||||||
.map((e) => e.map((e) => e.second))
|
.map((e) => e.map((e) => e.second))
|
||||||
.reduce((a, b) => [...a, ...b], []);
|
.reduce((a, b) => [...a, ...b], []);
|
||||||
@ -53,7 +47,7 @@ const getChartData = ({ queryData }: GetChartDataProps): ChartData => {
|
|||||||
borderWidth: 1.5,
|
borderWidth: 1.5,
|
||||||
spanGaps: true,
|
spanGaps: true,
|
||||||
animations: false,
|
animations: false,
|
||||||
borderColor: allColor[index],
|
borderColor: colors[index] || 'red',
|
||||||
showLine: true,
|
showLine: true,
|
||||||
pointRadius: 0,
|
pointRadius: 0,
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user