INNER CODE UNIT · JavaScript

line

sirius-ms/sirius · lcms2/viewer/viewer.js:189

  const line = d3.line().x(d=>x(d.x)).y(d=>y(d.y))

  const isoLine = d3.line().x(d=>x(d.x)).y(d=>y(-d.y))
  

  const seg = d3.line().x(d=>d[0]).y(d=>d[1])
  let segs=[]
  const segments = svg; 
  for (var i=0; i < data.segments.length; ++i) {
    let s = data.segments[i];
    let a = data.rt[s.left];
    let b = data.rt[s.right];
    segments.append("rect").attr("x", x(a)).attr("y", y(parentMax)).attr("width", x(b)-x(a)).attr("height", y(0)-y(parentMax)).attr("stroke","black").attr("fill","gray").attr("fill-opacity","5%").classed("region",true);
  }

  // Append a path for the line.
  svg.append("path")
      .attr("id", "noisePath")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…