1👍
The full chart context is unavailable in the Community version of QuickChart at this time for security reasons. You’ll either have to upgrade to Professional or self-host the service.
However, there is a built-in function getGradientFillHelper
that wraps some of this access and may achieve the desired effect.
Here’s an exmaple:
{
type: 'line',
data: {
labels: [2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020],
datasets: [
{
data: [12, 6, 5, 18, 12, 20, 50, 80, 90],
fill: false,
borderColor: getGradientFillHelper('vertical', [
'#eb3639',
'#a336eb',
'#36a2eb',
]),
borderWidth: 5,
pointRadius: 0,
},
],
},
options: {
legend: {
display: false,
},
},
}
- [Chartjs]-React with chart js, labelling problems in multiple datasets for doughnut chart
- [Chartjs]-Chart.js adjust height in mobile view
Source:stackexchange.com