graficas highcharts
This commit is contained in:
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user