SingleStackedBar

SingleStackedBar

d3.js single stacked bar chart

Constructor

new SingleStackedBar()

Source:

Methods

createDataVis()

Source:

Called the first time the page is loaded to setup the visualisation

drawDataVis()

Source:

Animate the rendering of the stack bar chart, the legend and the percentage values within the legend

initialiseDataVis()

Source:

Setup the wrapper and the bounds for the visualisation

redrawDataVis()

Source:

Animate the bars transitioning to the updated data set and change the percentage values in the legend

setScales()

Source:

Setup the scales for the visualisation

updateDataVis()

Source:

When the data set is updated this will cause the visualisation to animate