Fix null pointer in chart JS [skip ci]

This commit is contained in:
James Cole
2018-03-11 18:40:08 +01:00
parent dd6a6a565f
commit 93aa5b7753

View File

@@ -294,6 +294,7 @@ function drawAChart(URI, container, chartType, options, colorData) {
lineAtIndex: [],
annotation: {},
};
if (typeof drawVerticalLine !== 'undefined') {
if (drawVerticalLine !== '') {
// draw line using annotation plugin.
console.log('Will draw line');
@@ -320,6 +321,7 @@ function drawAChart(URI, container, chartType, options, colorData) {
}]
};
}
}
allCharts[container] = new Chart(ctx, chartOpts);
}