0👍
Not a perfect solution because it uses a cast to any
but as a quick fix, you can try the following:
import { ChartConfiguration, TimeScaleOptions } from 'chart.js';
...
ngOnInit() {
const xScaleOptions: TimeScaleOptions = <any>this.chartConfig.options.scales.x;
xScaleOptions.time.unit = 'week';
}
Source:stackexchange.com