Update
From the @AndyHolmes question on Can I add a shadow to chart.js?
An initial solution (extension) is not required. All it takes is just
... pointColor: gradientstroke ...
Original solution
Just stretch the line and refresh the colors of the dots. You can do this in the draw function, but it would be effective (when you turned on the animation) to do this when the function was initialized
Chart.types.Line.extend({ name: "LineAlt", initialize: function (data) { Chart.types.Line.prototype.initialize.apply(this, arguments); var ctx = this.chart.ctx;
The ColorColor and pointStrokeColor in the ChartData string are not actually required. Note that you can also override pointHighlightStroke and pointHighlightFill if you wish.
You call it that
new Chart(ctx).LineAlt(...
Fiddle - http://jsfiddle.net/w2nh153d/

source share