syntagmatic / parallel-coordinates

A d3-based parallel coordinates plot in canvas. This library is no longer actively developed.
http://syntagmatic.github.com/parallel-coordinates/
Other
510 stars 211 forks source link

Remove hardcoded canvas styles #83

Open syntagmatic opened 9 years ago

syntagmatic commented 9 years ago

This block of code in autoscale.js needs improvement. It wipes out the foreground line width when autoscale is called.

  // default styles, needs to be set when canvas width changes
  ctx.foreground.strokeStyle = __.color;
  ctx.foreground.lineWidth = 1.4;
  ctx.foreground.globalCompositeOperation = __.composite;
  ctx.foreground.globalAlpha = __.alpha;
  ctx.highlight.lineWidth = 3;
  ctx.shadows.strokeStyle = "#dadada";

lineWidth could go in the __ variable with color and alpha.

The intention here is to set the default/configured styles on the canvas context.