-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Legends Data Override not functional #1955
Comments
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you! |
When using Nivo Legends, I am trying to specify which data I want to use in the legend by using the data prop, however it cannot be overridden. I have troubleshooted this issue fairly extensively and am sure that it is an issue with the data override, as the data I am passing is valid.
const beginningData = scatterPlotData
.slice(0, Math.floor(scatterPlotData.length / 2));
const endingData = scatterPlotData
.slice(Math.floor(scatterPlotData.length / 2));
legends={
scatterPlotData && scatterPlotData.length <= 6
? [
{
...legendProps,
translateX: -225,
symbolSize: 18,
itemsSpacing: 0,
},
]
: [
{
data: beginningData,
...legendProps,
symbolSize: 10,
itemsSpacing: 0,
translateX: -250,
},
{
data: endingData[1],
...legendProps,
symbolSize: 10,
itemsSpacing: 0,
translateX: 70,
},
]
}
The text was updated successfully, but these errors were encountered: