|
|
|
@ -72,7 +72,7 @@ const customLabelsPlugin = { |
|
|
|
ctx.save(); |
|
|
|
|
|
|
|
labels.forEach((label, i) => { |
|
|
|
const p = r.getPointPosition(i, r.drawingArea + 50); |
|
|
|
const p = r.getPointPosition(i, r.drawingArea + 40); |
|
|
|
const align = getTextAlignByPoint(p, r); |
|
|
|
|
|
|
|
const lines = Array.isArray(label) ? label : [label]; |
|
|
|
@ -160,7 +160,7 @@ function generateChartData(d) { |
|
|
|
responsive: false, |
|
|
|
maintainAspectRatio: false, |
|
|
|
layout: { |
|
|
|
padding: 110 |
|
|
|
padding: 130 |
|
|
|
}, |
|
|
|
plugins: { |
|
|
|
legend: { |
|
|
|
@ -217,4 +217,5 @@ function test() { |
|
|
|
out.on('finish', () => console.log('The chart image was saved.')); |
|
|
|
} |
|
|
|
|
|
|
|
//test()
|
|
|
|
if (process.env.TEST) |
|
|
|
test() |
|
|
|
|