kurkle / chartjs-chart-sankey

Chart.js module for creating sankey diagrams
MIT License
152 stars 29 forks source link

Set style should be customizable , due to alpha 0.5 , I am not able to customize UI #103

Closed siddhant235 closed 1 month ago

siddhant235 commented 1 year 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; }`

kurkle commented 1 month ago

This has been fixed (though not released yet). Will be in 0.14.0 version,