---
title: "init(plotType:selectedDate:)"
framework: CareKit
role: symbol
role_heading: Initializer
platforms: [iOS 13.0+, Mac Catalyst 13.0+, watchOS 7.0+]
path: "carekit/ockcartesianchartviewsynchronizer/init(plottype:selecteddate:)"
---

# init(plotType:selectedDate:)

Creates a new chart synchronizer with a specific plot type, and selected date.

## Declaration

```swift
required init(plotType: OCKCartesianGraphView.PlotType, selectedDate: Date)
```

## Parameters

- `plotType  `: The visual way the chart plots data, such as a bar, line, or scatter.
- `selectedDate      `: The date you or your user selects in the chart.
