Wednesday, 7 November 2018

d3.js labelled horizontal bar chart with animation capabilities

I've created various vertical bar charts - but need to rejig this to work in horizontal mode.

//static vertical chart http://jsfiddle.net/pg886/201/

//animated vertical chart http://jsfiddle.net/Qh9X5/12073/

this will swap the axis around.

  var x = d3.scaleBand()
    .rangeRound([0, width]).padding(0.1);

  var y = d3.scaleLinear()
    .range([height, 0]);

  var xAxis = d3.axisBottom(y);
  var yAxis = d3.axisLeft(x);

but may also need to need rebuild it to look like the following wireframe concept

enter image description here



from d3.js labelled horizontal bar chart with animation capabilities

No comments:

Post a Comment