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
About this episode
Leave a rating/review
See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 13. Create OCKDataSeriesConfiguration Next episode: 15. Learn More About HealthKit

Get immediate access to this and 4,000+ other videos and books.

Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it's simply the best investment you can make in your development career.

Learn more Already a subscriber? Sign in.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Heads up... You’re accessing parts of this content for free, with some sections shown as obfuscated text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

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()