title: Is it possible to set border color for segment as gradient?
body: <p>I have different color for each data point and want to set border color of each segment as gradient between point colors. I wrote this code, but it doesn't work:</p>
  <pre><code>segment: {
    borderColor: (context) =&gt; {
      const gradient = this.chart.chart.ctx.createLinearGradient(
        context.p0.x,
        context.p0.y,
        context.p1.x,
        context.p1.y
      );
      gradient.addColorStop(0, context.p0.options.backgroundColor);
      gradient.addColorStop(1, context.p1.options.backgroundColor);
      return gradient;
    }
  },
  </code></pre>