Comments (3)
Hello! Which version of CareKit are you using, and are you building out your view in SwiftUI or UIKit? If you're interested in trying out the 3.0 beta release, we've introduced some new SwiftUI APIs that will make it really easy to map event data to a chart -
struct MonthlyChartView: View {
private static var query: OCKEventQuery {
let monthInterval = Calendar.current.dateInterval(of: .month, for: Date())!
let query = OCKEventQuery(dateInterval: monthInterval)
}
@CareStoreFetchRequest(query: Self.query)
private var events
var body: some View {
buildChartView(using: events)
}
}
Alongside that, you can also make use of the CareTaskProgress
API to aggregate the progress for multiple events and display the resulting value in the chart.
from carekit.
from carekit.
Hey Dave apologies for the late response here.
You can also stream outcomes over a date range. The CareStoreFetchRequest
can be initialized with each type of care store query:
@CareStoreFetchRequest(query: OCKOutcomeQuery(dateInterval: someInterval))
private var outcomes
The decision between querying for outcomes or events will depend on what you plan to do with the data. Querying for just outcomes is probably a little bit faster, but is missing some perhaps useful information (task, event start, event end, etc.). You also won't have access to the progress computation methods available on an event. Though, it might be useful for us to provide that progress method on the outcome level as well one day.
Does that help clear up the differences?
from carekit.
Related Issues (20)
- Auto Scheduling Events HOT 3
- Warning when uploading App HOT 7
- Occurrence circles HOT 29
- Error when building on latest Xcode and macOS Ventura HOT 1
- Carekit_CareKitStore emitted errors HOT 1
- Compile Errors HOT 1
- How do you save an CareKit OCKOutcomeValue for an array of ResearchKit ORKChoiceQuestionResults HOT 12
- ORKTextChoice + ORKPredicateStepNavigationRule + CareKit + ResearchKit HOT 10
- Bar chart changes every time i close and reopen the application HOT 9
- Problems integrating HealthKit data into an OCKCartesianChartViewController HOT 1
- CareKitStore-CoreData-NSReadOnlyPersistentStoreOption-ErrorMessage HOT 1
- Trying to schedule a notification based on the caloriesBurned only if they are less than a certain amount (with query to the health store) HOT 6
- Creating PDF with charts and data from more than one View HOT 1
- Sample app for v3? HOT 1
- CareKit live streaming crashes with multithreaded violations HOT 4
- Updated Content HOT 16
- Watch remote synchronization fails with duplicate Outcome.
- CareKit cannot compile with Xcode 15(beta 2) HOT 1
- Adding a detailed description to the nausea card HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carekit.