{ "title":{ "text":"Stacked Bar Chart with Clickable Keys", "style":"{font-size:16px;}" }, "legend":{"position":"right"}, "elements":[ { "type": "bar_stack", "colours": ["#FF0000","#0000FF","#000000"], "id":1, "key-on-click":"toggle-visibility", "keys": [ {"colour":"#FF0000", "text":"Cost of Goods", "font-size": 12}, {"colour":"#0000FF", "text":"Labor Cost"}, {"colour":"#000000", "text":"Profit"} ], "font-size":12, "tip":"#key#
#val# / #total#", "values": [ [1000,{"val":500}, 200], [1400,{"val":600}, 300], [800,{"val":300}, 100], [1400,{"val":600}, 300, {"val":100, "text":"Bonus :)", "colour":"#00FF00"}], ] }, { "type": "bar", "id":2, "key-on-click":"toggle-visibility", "colour": "#9933CC", "text": "Contracts", "font-size": 12, "values" : [900,1600,null,1900] }, { "type":"tags", "id":2, "font":"Verdana", "font-size":10, "colour":"#000000", "pad-x":0, "pad-y":0, "rotate":0, "align-x":"center", "align-y":"above", "text":"$#y#", "values":[ {"x":0.2,"y":900,"text":"$900"}, {"x":1.2,"y":1600,"text":"$1,600"}, {"x":3.2,"y":1900,"text":"$1,900"} ], }, ], "x_axis":{ "labels": { "labels": ["January","February","March","April"] }, "stroke": 4, "tick-height": 4 }, "y_axis":{ "max": 3000, "min":0, "steps":250 } }