Apple Health Frameworks

Nov 29 2022 Swift 5, iOS 15, Xcode 13

Part 3: Take Advantage of CareKit & ResearchKit

14. Show Data in Different Charts

Episode complete

Play next episode

Next
Save for later
About this episode
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 13. Create OCKDataSeriesConfiguration Next episode: 15. Learn More About HealthKit

This video Show Data in Different Charts was last updated on Nov 29 2022

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

You can unlock the rest of this video course, and our entire catalogue of books and videos, with a kodeco.com Professional subscription.

Part 3, Episode 15, Show Data in Different Charts

In this episode, I want to show you how to use different OCKDataSeriesConfiguration to show data in charts.

    let barChart = OCKCartesianChartViewController(
      plotType: .bar,
      selectedDate: Date(),
      configurations: [muscleSeries, headacheSeries],
      storeManager: storeManager
    )
    appendViewController(barChart, animated: false)
makeChart1()
    let barChart2 = OCKCartesianChartViewController(
      plotType: .bar,
      selectedDate: Date(),
      configurations: [tirednessSeries],
      storeManager: storeManager
    )

    appendViewController(barChart2, animated: false)
makeChart2()
    let lineChart = OCKCartesianChartViewController(
      plotType: .line,
      selectedDate: Date(),
      configurations: [feverSeries],
      storeManager: storeManager
    )

    appendViewController(lineChart, animated: false)
makeChart3()
    let scatterChart = OCKCartesianChartViewController(
      plotType: .scatter,
      selectedDate: Date(),
      configurations: [rangeSeries],
      storeManager: storeManager
    )

    appendViewController(scatterChart, animated: false)
makeChart4()