Chart.js won't do date formatting for you - the amount of possibilities and locales are so vast it fits well beyond the scope of the project - in face there are libraries just for different formatting of javascript dates. One good example could be something like

For plotting data you should use seconds/minutes/hours as most appropriate for your data. You can customise how you format this in your interpolated JS string for labels - scaleLabel. For chart labels, you should just use formatted strings as you see most fit.



You must include your moment locale file on your page:

Ex.: You can find your locale using CDN

Ex.: Bower

<script src="/bower_components/moment/moment.js"></script>
<script src="/bower_components/moment/locale/de.js"></script>


Moment's locale must be set before the chart load else the chart must be updated with update().

Related Query