I'm using Chart.js in client-side HTML with the date-fns adapter (https://github.com/chartjs/chartjs-adapter-date-fns) to allow a time cartesian axis (https://www.chartjs.org/docs/latest/axes/cartesian/time.html).
I'm loading chartjs-adapter-date-fns from the CDN - i.e. my page loads chartjs-adapter-date-fns.bundle.min.js. (I'm not using the import and webpack.)
Is it still possible to configure locale support as per https://github.com/chartjs/chartjs-adapter-date-fns#locale-support-via-scale-options? If so, please can you give me an example of how to access the locale class to pass to adapters.date.locale in the scale options.
Documentation states:
// import date-fns locale:
import {de} from 'date-fns/locale';
// scale options:
{
adapters: {
date: {
locale: de
}
}
}
... but import doesn't work in the browser - so how do I get hold of a locale like de?