block by micahstubbs d66a1662fd64a08051dc473f0d1f956e

ES2015 X-Value Mouseover with Droplines

Full Screen

a ES2015 fork of @micahstubbs‘ bl.ock X-Value Mouseover with Droplines

this example also converts all CSS styles previously inside of the <style></style> HTML tags into inline styles applied in Javascript to d3 selections.

this CSS that styles the droplines:

.focus line {
  fill: none;
  stroke: black;
  stroke-width: 1.5px;
  stroke-dasharray: 3 3;
}

becomes this Javascript that does the same thing:

    d3.selectAll('.focus line')
      .style({
        fill: 'none',
        'stroke': 'black',
        'stroke-width': '1.5px',
        'stroke-dasharray': '3 3'
      })

inline styles can make it easier to quickly include d3js examples like this into a larger Javascript project that is automatically built from many source files into one bundle file.

index.html