Closed siddhant235 closed 1 month ago
`function setStyle(ctx, {x, x2, options}) { let fill;
if (options.colorMode === 'from') { fill = color(options.colorFrom).alpha(0.5).rgbString(); } else if (options.colorMode === 'to') { fill = color(options.colorTo).alpha(0.5).rgbString(); } else { fill = ctx.createLinearGradient(x, 0, x2, 0); fill.addColorStop(0, color(options.colorFrom).alpha(0.5).rgbString()); fill.addColorStop(1, color(options.colorTo).alpha(0.5).rgbString()); }
ctx.fillStyle = fill; ctx.strokeStyle = fill; ctx.lineWidth = 0.5; }`
This has been fixed (though not released yet). Will be in 0.14.0 version,
`function setStyle(ctx, {x, x2, options}) { let fill;
if (options.colorMode === 'from') { fill = color(options.colorFrom).alpha(0.5).rgbString(); } else if (options.colorMode === 'to') { fill = color(options.colorTo).alpha(0.5).rgbString(); } else { fill = ctx.createLinearGradient(x, 0, x2, 0); fill.addColorStop(0, color(options.colorFrom).alpha(0.5).rgbString()); fill.addColorStop(1, color(options.colorTo).alpha(0.5).rgbString()); }
ctx.fillStyle = fill; ctx.strokeStyle = fill; ctx.lineWidth = 0.5; }`