Chart style
This commit is contained in:
parent
81ddd54bbf
commit
ba24d32233
|
@ -132,34 +132,14 @@ export default {
|
||||||
|
|
||||||
{
|
{
|
||||||
label: 'Média do sinal',
|
label: 'Média do sinal',
|
||||||
backgroundColor: context => {
|
|
||||||
const { ctx, chartArea } = context.chart
|
|
||||||
|
|
||||||
if (!chartArea) return null // This case happens on initial chart load
|
|
||||||
|
|
||||||
const gradient = ctx.createLinearGradient(
|
|
||||||
0,
|
|
||||||
chartArea.bottom,
|
|
||||||
0,
|
|
||||||
chartArea.top
|
|
||||||
)
|
|
||||||
|
|
||||||
const hexTransparency = '33'
|
|
||||||
|
|
||||||
gradient.addColorStop(1, colors.green.base + hexTransparency)
|
|
||||||
gradient.addColorStop(0.7, colors.green.base + hexTransparency)
|
|
||||||
gradient.addColorStop(0.5, colors.orange.base + hexTransparency)
|
|
||||||
gradient.addColorStop(0, colors.red.base + hexTransparency)
|
|
||||||
|
|
||||||
return gradient
|
|
||||||
},
|
|
||||||
borderColor: colors.blue.base,
|
borderColor: colors.blue.base,
|
||||||
data: this.stats.map(stat => stat.avgSignalStrength),
|
data: this.stats.map(stat => stat.avgSignalStrength),
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
pointRadius,
|
pointRadius,
|
||||||
cubicInterpolationMode: 'default',
|
cubicInterpolationMode: 'default',
|
||||||
tension,
|
tension
|
||||||
fill: true
|
// fill: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user