Skip to content
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

Closed
sophiefoster3 opened this issue Mar 16, 2022 · 3 comments
Closed

Legends Data Override not functional #1955

sophiefoster3 opened this issue Mar 16, 2022 · 3 comments
Labels

Comments

@sophiefoster3
Copy link

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,
},
]
}

@tkonopka
Copy link
Contributor

Hi @sofo1413. I don't follow the technical details here, but the keywords (scatterplot, legend, data override) overlap with another issue #1962 and a tentative PR #2016. Does the PR address your question? Thanks

@stale
Copy link

stale bot commented Sep 20, 2022

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!

@stale stale bot added the stale label Sep 20, 2022
@stale
Copy link

stale bot commented Sep 27, 2022

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!

@stale stale bot closed this as completed Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants