graficas highcharts

This commit is contained in:
2021-07-30 23:56:33 -05:00
parent 2db1144834
commit 74b37c0dfe
16 changed files with 306 additions and 103 deletions

View File

@@ -10,7 +10,7 @@ export default {
type: Array,
default: () => [
'rgba(72,72,176,0.2)',
'rgba(72,72,176,0.0)',
'rgba(72,72,176,0.1)',
'rgba(119,52,169,0)'
],
validator: val => {
@@ -35,14 +35,17 @@ export default {
if (!chartData) return;
const ctx =
this.ctx || document.getElementById(this.chartId).getContext('2d');
const gradientStroke = ctx.createLinearGradient(0, 230, 0, 50);
const gradientStroke = ctx.createLinearGradient(0, 230, 20, 50);
this.gradientStops.forEach((stop, index) => {
gradientStroke.addColorStop(stop, this.gradientColors[index]);
});
chartData.datasets.forEach(set => {
if (!set.backgroundColor) {
console.log(ctx)
set.backgroundColor = gradientStroke;
}
});