Simple Stacked Bar

This visualization provides a simple, all purpose, staked bar.

Invocation Example

SViz.loadViz("showStackedBar", "data.json", "#visualization", {title:false});

JSON Example

{ "calculated": {
    "cat1": 74,
    "cat2": 34,
    "cat3": 21
    ...
  }
}

Optional Parameters

You are free to customize the visualization through optional parameters.
Name Default Value Description
width 150 total width, including margins
height 150 total height, including margins
barHeight 30 bar height
title true show title
titleclass h4 css class for the title
legend true show legend
legendSelector the original selector the selector where the legend should be displayed