fix: the legend and value issue (#3789)

Co-authored-by: Palash Gupta <palashgdev@gmail.com>
This commit is contained in:
Rajat Dabade 2023-10-25 21:13:15 +05:30 committed by GitHub
parent c55be0e392
commit 176d01544e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,10 +63,6 @@ const getChartData = ({
}),
);
const allLabels = response
.map((e) => e.map((e) => e.label))
.reduce((a, b) => [...a, ...b], []);
const modifiedData = response
.flat()
.sort((a, b) => {
@ -89,6 +85,8 @@ const getChartData = ({
? modifiedData.slice(0, limit)
: modifiedData;
const allLabels = modifiedData.map((e) => e.label);
const updatedDataSet = updatedSortedData.map((e, index) => {
const datasetBaseConfig = {
index,