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

Make DataCurve.abscissas an NumArray #1356

Closed
PeterC-DLS opened this issue Jan 24, 2023 · 0 comments · Fixed by #1357
Closed

Make DataCurve.abscissas an NumArray #1356

PeterC-DLS opened this issue Jan 24, 2023 · 0 comments · Fixed by #1357

Comments

@PeterC-DLS
Copy link
Contributor

Is your feature request related to a problem?

I'm passing ndarrays about for x/y values before calling DataCurve and restricting x values to be number[] seems odd as DataCurve.ordinates is a NumArray.

Requested solution or feature

Change DataCurve.abscissas to a NumArray.

Alternatives you've considered

Use useToArray to convert but that's implemented as a spread in vis/utils and does not scale well.

Additional context

Scanning through the code, I see lodash.toArray is also used in ScatterVis.tsx. Also, range is used from lodash and d3-array - is this worth rationalising?

PeterC-DLS added a commit to DiamondLightSource/h5web that referenced this issue Jan 24, 2023
Avoid converting to number[] if possible, remove useToArray hook
axelboc added a commit that referenced this issue Jan 25, 2023
Broaden arguments and props to use NumArray for #1356
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant