GUI billing reports: barchart-data-label-plugin minor fix
@@ -135,6 +135,7 @@ const plugin = {
} = dataset;
const color = textColor || borderColor;
const {position, text} = config;
+ if (position) {
ctx.save();
ctx.fillStyle = color;
ctx.font = `${textBold ? 'bold ' : ''}9pt sans-serif`;
@@ -142,6 +143,7 @@ const plugin = {
ctx.textBaseline = 'bottom';
ctx.fillText(text, position.x + position.width / 2.0, position.y + position.height);
}
+ }
},
getInitialLabelConfig: function (dataset, element, index, meta, chart, valueFormatter) {
const {
