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

Support for Date Range? #1

Open
EstiT opened this issue Nov 5, 2022 · 3 comments
Open

Support for Date Range? #1

EstiT opened this issue Nov 5, 2022 · 3 comments

Comments

@EstiT
Copy link

EstiT commented Nov 5, 2022

Hi! Looks like a really great package, exactly what I was looking for.

Can you add support for Date ranges? For when the x-axis has Date values. When I try with Double, I get:

The scale domain configuration type (Date) doesn\'t match encoded value type for channel Channel(type: Charts.EncodableProperty.x, scaleID: Charts.Spec.ScaleID.primary)

Thanks!

@MichaelLorms
Copy link

Hi EstiT, did you solve the problem? I'm hanging by putting measured data timebased to a chart and I want to zoom in... (means not the scale things in swift, but changing the x axis domain)

@levitatingpineapple
Copy link
Owner

Hi @MichaelLorms!
I have a newer version that does support generic bounds - including Date.
Just pushed 2.0.0 to this repo.
The API is also a bit simpler: .gesture(DomainXGesture(domain: $domain))
The minimum platform version is .iOS18 though.

@MichaelLorms
Copy link

Ah, thats why I was totally irritated…
As I looked in Github, I found the example on the first page containing date, and I asked myself, how blind I was two days ago ;-)
But really absolutely cool, I’ll give it a try...
And thanks a lot for extremely fast response!!
Best regards

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

No branches or pull requests

3 participants