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

Rename flatData -> dataForExtents? #57

Closed
mhkeller opened this issue Dec 20, 2021 · 3 comments
Closed

Rename flatData -> dataForExtents? #57

mhkeller opened this issue Dec 20, 2021 · 3 comments
Labels
discussion Talk about implementation of different chart types. question Further information is requested

Comments

@mhkeller
Copy link
Owner

Per, #53 (comment), would it make more sense to rename the flatData to dataForExtents? It speaks more to what it's used for, which is a little less mysterious than describing what it must be.

This would be a breaking change but we can still support flatData for a little bit so things wouldn't actually break. I'm just about ready to publish version 6.0.0, which is the svelte-kit version. There are no other changes though – just figured it would be good to bump the major version in case it breaks a build process or something.

@mhkeller mhkeller added question Further information is requested discussion Talk about implementation of different chart types. labels Dec 20, 2021
@mhkeller mhkeller changed the title Rename flatData -> dataForExtents Rename flatData -> dataForExtents? Dec 20, 2021
@techniq
Copy link
Contributor

techniq commented Dec 20, 2021

I like the explicitness, although I have used flatData in other contexts beyond extents within LayerChart / my projects. It's useful to know you have long vs wide data in those contexts like Tooltips (there might also be some opportunity to use $data vs $flatData though).

I would need to refactor my use of flatData if so. I kind of prefer how it is now, but also understand the potential confusion and would be fine with the change either way.

@albertsun
Copy link

flatData feels better to me I think, it's the data but passed through flatten or something like that. And while it's used for extents it could also be used for other things, whereas if it were called dataForExtents it might suggest that it's an array with just the four min/max points.

@mhkeller
Copy link
Owner Author

Good points @techniq and @albertsun! Let's keep flatData! Thanks for weighing in!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Talk about implementation of different chart types. question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants