[IMP] web: fill area for unique line chart group

This commit is contained in:
Mathieu Duckerts-Antoine
2019-07-30 06:53:12 +00:00
committed by Vincent Schippefilt
parent 97efe4b4e7
commit c8f5cd71ed
@@ -847,6 +847,12 @@ return AbstractRenderer.extend({
dataset.pointBackgroundColor = dataset.borderColor;
dataset.pointBorderColor = 'rgba(0,0,0,0.2)';
});
if (data.datasets.length === 1) {
const dataset = data.datasets[0];
dataset.fill = 'origin';
dataset.backgroundColor = hexToRGBA(COLORS[0], 0.4);
}
// center the points in the chart (without that code they are put on the left and the graph seems empty)
data.labels = data.labels.length > 1 ?
data.labels :