Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that when the time axis accesses data.labels it actually exists #5750

Merged
merged 1 commit into from Oct 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/scales/scale.time.js
Expand Up @@ -534,10 +534,11 @@ module.exports = function() {
var datasets = [];
var labels = [];
var i, j, ilen, jlen, data, timestamp;
var dataLabels = chart.data.labels || [];

// Convert labels to timestamps
for (i = 0, ilen = chart.data.labels.length; i < ilen; ++i) {
labels.push(parse(chart.data.labels[i], me));
for (i = 0, ilen = dataLabels.length; i < ilen; ++i) {
labels.push(parse(dataLabels[i], me));
}

// Convert data to timestamps
Expand Down