Commit 7300368e authored by Jan Kiene's avatar Jan Kiene
Browse files

fix scaling of bar graph y axis

parent 3c3bf5e4
Loading
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -740,7 +740,19 @@ function WMOPS_perOP() {

    $(document).ready(function () {
        // need to get worst case of enc + dec combined, because values are stacked in the graph
        var max = get_max_y_val_for_plotting(Graphs_WMOPS.wmops_worstcase.displays, 50);
        var displays = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays;
        var encData, decData;
        if (displays.length == 2) {
            encData = [displays[0]];
            decData = [displays[1]];
        }
        else if (displays.length == 4) {
            encData = [displays[0], displays[2]];
            decData = [displays[1], displays[3]];
        }
        var max_enc = get_max_y_val_for_plotting(encData, 1);
        var max_dec = get_max_y_val_for_plotting(decData, 1);
        var max = Math.ceil( (max_enc + max_dec ) / 50) * 50;
        drawGraph($("#wmops_per_op-graph"), Graphs_WMOPS_perOP.wmops_worstcase_per_op, max);
    });