Using Chart.js (v.2.3.0) and Moment.js (v.2.9.0), I am rendering a Chart.js bubble chart in a lightning component and I am setting a custom tooltip and the x-axis labels to formatted dates.
sample configuration:
... tooltips: { enabled: true, callbacks: { title: function(tooltipItems, data) { var dataIndex = tooltipItems[0].index; var datasetIndex = tooltipItems[0].datasetIndex; return moment(data.datasets[datasetIndex].data[dataIndex].x).format('MMM Do, YYYY'); }, ...
Up until Spring 17 - Patch 5.5 this seemed to work as expected:
As of Spring 17 - Patch 6.0, the function is rendered instead of its' executed result:
Is this a platform (Spring 17) bug? Has anyone else experienced anything similar with moment.js date formatting?