First, let's look at the data that we have available in our system, when it comes to project tasks. The created attribute is set to the timestamp at the moment when the task was created. If a task is marked as done, however, we currently don't save the timestamp of that moment. In order to produce the chart that we're looking for, we will need to know when a task was completed.
Let's introduce a new property on our task model for this purpose. Open up the model file, located in src/app/model.ts, and apply the following changes:
export interface Task { readonly id?: number; readonly projectId?: number; readonly title: string; readonly description?: string; readonly done: boolean; readonly order: number; readonly created: ...