Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(".bargraph").each(function(graphIdx,graphEl){
- var graph = $(graphEl);
- console.group("Graph: %o", graph);
- var graphHeight = graph.height();
- console.info("height: %s", graphHeight);
- var maxValue = parseInt(graph.find(".barNotches li").first().text());
- console.log("maxValue: %s", maxValue);
- graph.find(".barColumnFill").each(function(columnIdx,columnEl){
- var column = $(columnEl);
- var barValue = 0;
- var barHeight = 0;
- console.group("column: %o", column);
- barValue = column.data('barvalue');
- console.log("barValue: %s", barValue);
- barHeight = (barValue/maxValue * 100) + "%";
- console.log("barHeight: %s", barHeight);
- column.height(barHeight);
- console.groupEnd();
- });
- console.groupEnd();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement